WordPress – How did they hack the WordPress sites

hackingWordpress

I have many wordpress sites hosted in a Bluehost shared hosting environment. Recently when I searched one of the sites in Google, it said "The site might be compromised".

I got alerts from Google Webmaster about a script in one of the WP sites.
When I checked the sites, I found some links in the footer, mentioning "myteenmovies.net" and one another site. Whois information showed, they were Russian sites.

I also found some other PHP files with weird names, wxwz.php,xypz.php etc… The PHP code was encrypted with some eval(gununcompress(base64_decode())) like that. There was ananother file which had a comment "#Web Shell by orb".

I understand that the hacker has got complete access to my server (with Webshell script). All the sites are quite old (about a year), WordPress 2.5. Permissions are 755. Can anyone guess or advise, how did the hacker upload the files? FTP/SSH/Cpanel passwords are quite strong. Any other ways?

Best Answer

That's your problem right there. Most of these attacks are carried out by automated scripts that look for known vulnerabilities in older wordpress systems. Since anyone can look at bug reports and changelogs, it's not too difficult to engineer a script to exploit a weakness.

Your best defense is to always have your wordpress version AND your themes/plugins up to date.

I used to have this problem with a few of my defunct blogs, but keeping them constantly updated fixed it.

Do a grep on your existing blogs and look for any iframes or eval method calls in your WP directory. Also check the DB. Once it's all clean, update your WP version and themes/plugins and keep it updated.

Next login to Google webmaster and, if you haven't already, prove ownership and ask for a review of your site. The warning should go away after awhile.

Related Topic