Alex Kovacic

Hacked sites and security

I clean up a hacked site, find out how they got in and close the hole. Then I keep it updated so it doesn't happen again.

The signs

A hacked site usually gives itself away with something odd: Google lists pages in Japanese under your domain, the browser warns that the site is dangerous, the hosting company suspends the account, your emails end up in spam.

What I do

  1. I save a copy of the site as it is, to work out what happened, and take it offline if needed.
  2. I compare the files with the original WordPress or Joomla and plugin files, and remove the ones that were added.
  3. I search the database for admin users and code that shouldn't be there.
  4. I find out how they got in: usually an old plugin or a stolen password.
  5. I change passwords and keys, update everything and ask Google to remove the warning, if there is one.

So it doesn't happen again

On WordPress nearly all published vulnerabilities are in plugins, and the update comes out before the attack. With maintenance I do the updates, and SitePing flags versions that no longer get security fixes, changed files and admin logins.

Problems I often solve