Michał Jonik
2013-03-16 · archive

I’ve been hacked!

Archived post from 2013, recovered from my old blog. The technology described here is probably out of date. Original at the Internet Archive.

A beautiful, sunny Morning in Innsbruck has been suddenly disturbed by a SiteMeter weekly traffic report indicating unusual drop in the number of visits on my blog last week. I nervously navigated to the site and got an empty page with PHP errors.

Page wp-content/plugins/wp-insert/includes/essentials.php could not found wp-content/plugins/wp-insert/includes/pages.php.

No way! It cannot be true. I don’t have any automatic updates enabled, haven’t touch the blog for months (oh yes, sad but true) so how come it just broke? A quick analysis of the files and their timestamps clearly indicates that:

  1. pages.php is missing indeed
  2. the essentials.php has been modified 10th of March afternoon
  3. there is a number of files modified at the same time
  4. apache logs shows a number of requests to the modified pages from a single IP address
  5. Geo IP Tool shows that the IP comes from New York
  6. there is another suspicious set of files modified on 2nd of May last year

I had a feeling similar to that when someone has been in your house while you were out. The plan was quick:

  1. do a backup of your site
  2. remove the touched files immediately – that actually fixed the site
  3. remove the failing wp-insert plugin from the disk
  4. upgrade WordPress and all the plugins
  5. install Wordfence, a security plugin for WordPress and configure it
  6. review Hardening WordPress article and implement some of the advices
  7. hide in bushes with a binocular and watch…..

An update: the first Wordfence scan report just arrived. Several critial issues have been found including a malicious code placed in PHP files. Files deleted. Back to the bushes….

securitywordpress