Global Attack on WordPress Sites

As I write this post, there is an on going and highly distributed, global attack on wordpress installations to crack open admin accounts and inject various malicious scripts.

To give you a little history, we recently heard from a major law enforcement agency about a massive attack on US financial institutions originating from our servers.

We did a detailed analysis of the attack pattern and found out that most of the attack was originating from CMSs (mostly wordpress). Further analysis revealed that the admin accounts had been compromised (in one form or the other) and malicious scripts were uploaded into the directories.

Today, this attack is happening at a global level and wordpress instances across hosting providers are being targeted. Since the attack is highly distributed in nature (most of the IP’s used are spoofed), it is making it difficult for us to block all malicious data.

To ensure that your customers’ websites are secure and safeguarded from this attack, we recommend the following steps: 

1. Update and upgrade your wordpress installation and all installed plugins.

2. Install the security plugin listed here.

3. Ensure that your admin password is secure and preferably randomly generated.

4. Other ways of Hardening a WordPress installation are shared at http://codex.wordpress.org/Hardening_WordPress

These additional steps can be taken to further secure wordpress websites:

  • Disable DROP command for the DB_USER .This is never commonly needed for any purpose in a wordpress setup.
  • Remove README and license files (important) since this exposes version information.
  • Move wp-config.php to one directory level up, and change its permission to 400.
  • Prevent world reading of the htaccess file.
  • Immediately change your passwords to the Wordpress admin area, FTP, any control panels, and all email accounts.
  • Your password should be at least 30 characters and MUST have all of: uppercase and lowercase letters, numbers, and special characters. A good way to come up with a strong password that you can still remember is take a long phrase, song lyrics, a poem, similar, and replace certain letters with uppercase, numbers, and special characters.
  • For example the relatively strong password: th1$l1ttl3p1ggy$3cur3dth31rW0rdpr3$$$1t3 is simply "thislittlepiggysecuredtheirWordpresssite" with i->1, s->$, e=3, and o->0 (zero).
  • Scan your computer for viruses, keyloggers, rootkits, and botnet software.
  • Restrict access to wp-admin only to specific IPs.
  • A few more plugins – wp-security-scan, wordpress-firewall, ms-user-management, wp-maintenance-mode, ultimate-security-scanner, wordfence, https://wordpress.org/plugins/better-wp-security/.

    These may help in several occasions.

Add this to the .htaccess file in your document root (public_html, www, htdocs, etc).

This is in order to stop direct automated attempts to log in to your site:

NOTE: Replace example.com below with your domain (leave the ?. before it and everything else).

<IfModule mod_rewrite.c>

RewriteEngine on


RewriteCond %{HTTP_REFERER} !^http://(.*)?.example.com [NC]

RewriteCond %{REQUEST_URI} ^/wp-login\.php(.*)$ [OR]

RewriteCond %{REQUEST_URI} ^/wp-admin$

RewriteRule ^(.*)$ - [R=403,L]

Also, we recommend using Cloudflare, which is available free with all our cPanel accounts, to prevent the attack from affecting the functionality of your site.


SSL Sale!

Buy Comodo SSL Certificate for just Rs.999/Year! Protect your website now!