Summary: A flaw in exists in sudo's -u option (aka sudoedit) in sudo version 1.6.8 that can give an attacker read permission to a file that would otherwise be unreadable.
All the information that you can find in this software were published for educational and didactic purpose only. The author published this program under the condition that is not in the intention of the reader to use them in order to bring to himself or others a profit or to bring to others damage.
!Respect the law!
How do I use this code ?
To exploit sudoedit you have to open with it the file "rosiello" as shown in the example.
EXAMPLE SCENARIO:
1) Open two shells (i) and (ii); 2) (i)$sudoedit rosiello; 3) (ii)$./sudoedit-exploit /etc/shadow; 4) (i) close sudoedit.
The file "rosiello" is now a copy of "/etc/shadow".