In early 2013 a global brute-force attack began hitting WordPress installations across almost every WP host server in existence around the world.
These attacks were caused by computer networks infected with malware and programmed to attack other vulnerable computers (called “botnets”).
How To Protect Your WordPress Site From A Brute-Force Attack
About Brute Force Attacks
A brute-force attack is a technique used to break an encryption or authentication system by trying all possibilities.
(Source: Chinese University Of Hong Kong)
There are many methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. To attempt this, hackers use scripts and tools that can work through hundreds of login combinations in minutes.
If you’re using obvious usernames and passwords, your site could be easily hacked by a malicious software’s repeated attempts to work out your site’s login details.
This is called a “brute force” login attack.
What Is A Botnet?
A botnet is a number of Internet-connected computers communicating with other similar machines in an effort to complete repetitive tasks and objectives. This can be as mundane as keeping control of an Internet Relay Chat (IRC) channel, or it could be used to send spam email or participate in distributed denial-of-service attacks. The word botnet is a combination of the words robot and network.
A “Botnet” is a network of private computers that have been compromised and infected with malicious code or scripts, which can then be controlled remotely as a group, often without the unsuspecting computer owners’ knowledge or awareness.
Botnets are typically used to blast out mass spam emails from the infected computers of compromised user accounts.
Below is a screenshot taken from an internet security monitoring site showing the locations of the command centers of ZeuS – a botnet that has been actively compromising computer networks all around the world since 2009 …
(ZeuS is a botnet that has been actively infecting computer networks all around the world since 2009. Image source: SecureList.com)
These were highly distributed and well organized attacks on WordPress. Over 90,000 IP addresses were identified by a number of hosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress site administration areas. The brute-force attacks continued after this, with over 30,000 WordPress blogs being hacked per day.
Coverage of this mass brute-force attack was reported by all of the major webhosting companies, as well as the leading technology publications, such as TechNews Daily, Forbes, PC Magazine, Tech Crunch, BBC News, and even on the official US Department of Homeland Security website …
(WordPress is the world’s most used content management system which makes it a frequent target for attempted hacking attacks)
Does This Mean We Should Stop Using WordPress?
No. In fact, there are many great reasons why you should continue using WordPress if you are concerned about the security of your website.
To learn what makes WordPress a very secure web platform, read this article: Are Open Source CMS Platforms Like WordPress Secure?
It’s important to understand that, in the case of April 2013 large-scale brute force attack described above, was no specific vulnerability in WordPress being exploited (the same script was also targeting sites built using other CMS applications like Joomla).
Mike Little, one of the co-founders of WordPress, said this about the brute-force attacks:
It is a “simple” script that attempts to login using the admin login and a generated password. So if your password is too short or based on dictionary words it will be guessed and then the script can login legitimately and do whatever it wants including installing scripts (as plugins) or editing files. The attack tries to guess your password, if it succeeds, the most secure site in the world is wide open because they have your password.
How To Prevent Your WordPress Site From Being Brute-Force Attacked – 10 Security Checks
You may think that your site has no value to hackers, but the reality is that to a hacker, every website provides an opportunity to gain some advantage at your expense.
If hackers can access and gain control of your website, your web site can then be used to target other valued sites.
Additional undesirable impacts of having your site hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links advertising things like online meds, cheap offers on brand names, etc. inserted into your content, malicious redirects to phishing sites and other websites, drive-by downloads (adding malicious software on your visitors’ computers), and lots of other nasty things.
The truth is that software-driven bots are most likely scouring for security exploits and trying to break into your website or blog at this very moment. Whether they can break in or not, will depend on how difficult or easy you have made things for hackers to continue persisting until they either find how to get access, or decide to look for a less secure target.
How Much Information Are You Broadcasting To Hackers About Your Site?
Do you own a WordPress site? If so, visit Hackertarget.com and run your website through their WordPress security check …
You will see that the scan returns various results and information about your site …
(Hackertarget – WP security check results. Screenshot source: Hackertarget.com)
It should be obvious after using the tool shown above that if you can access all of this information, so can hackers.
The ability to see what version of WordPress you are using, which plugins and themes you have installed on your site, and which files have been uploaded to certain directories can be potentially useful information to hackers, as these can inform them about any exploitable holes or weaknesses, especially where the owners haven’t updated their sites.
If your site or blog is driven by WordPress and you’re not preventive steps to toughen up your site, we can practically guarantee that, at some point, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically targeting WordPress sites worldwide!
Whenever a website is hacked, website owners will find themselves “locked out” of their own site, or notice that their files have been interfered with or even that their content has been completely wiped out. Often, most sites will become infected with malicious scripts without the owner’s knowledge or awareness.
To help avoid the heartache (and significant financial loss) that comes with discovering that your web site has been hacked into, we have listed below ten simple, yet essential and effective security checks that will help to prevent your WordPress site from being brute-force attacked.
Note: A few of the steps below need some technical skills to modify core WordPress or server files. If you lack these technical skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress service provider for help.
Security Measure #1 – Contact Your Host
Contact your webhosting service provider and ask them what measures have been put into place to protect your site from being attacked, and what is done to ensure that your files and data are being regularly backed up.
Make sure that your hosting service provider is regularly backing up your sites and that, if anything happens, you can quickly and easily get back your site.
Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Or Blog Frequently Maintained
You should never rely on your web host for site backups. Instead, learn how to manage your WordPress site or pay someone to get this service done for you and maintain a habit of religiously performing a complete site maintenance routine frequently (e.g. weekly, fortnightly, etc …)
A proper WordPress maintenance routine ensures that:
- All unnecessary data and files are removed,
- All WP data and files are free of errors, optimized and backed up,
- All software, themes and plugins are up-to-date,
- etc …
A complete WP site maintenance routine looks like this …
Again, we cannot stress enough how vitally important maintaining your WordPress website or blog frequently backed up and updated is. WordPress site maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website or blog. If you do not want to learn how to do WordPress maintenance yourself, pay a professional to do it but make sure it gets done. Backing up your website is the second most important thing you must do after making sure that your heart is still beating!
If you don’t want to back up your data manually, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Backup, Copy & Protect Your WP Websites And Blogs With Backup Creator WordPress Plugin
Security Measure #3 – Make Sure That Your Username Is Not “Admin”
The brute force botnet attack on WordPress sites was mostly an attempt to compromise site administrator panels and gain access to the site by exploiting installations that used “admin” as their username.
For reasons of website security, don’t set up WordPress sites with the username “admin”. This is the first area hackers will test. If your site’s user name is “admin”, you need to change this immediately.
We have created a step-by-step tutorial for non-technical WordPress admin users that shows you how to change your login username here: Changing Your WP Username From Admin To Another User Name
Security Measure #4 – Use Strong Passwords
A “brute force” attack occurs when a malicious script persistently tries to guess the right username and password characters that will unlock your website.
Unless some measure is put into place to block the brute force attack (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just continue to attack your site until it eventually gets access.
Weak passwords, therefore, make really easy targets for hackers. Make sure that you change your password combination to something that is at least eight or nine characters long, with upper and lowercase letters, and add a few “special” characters (e.g. ^, #, @, etc).
You can use a password management program like Roboform to create unbreakable passwords …
We have created a tutorial for WordPress admin users on how to change your password here: What To Do If You Need To Reset A Password In WordPress
Security Measure #5 – Prevent Access To Your wp-config.php File
The wp-config.php file contains important information about your blog’s database and is used to define advanced WordPress options.
If hackers break into your WordPress website, they will normally search for your wp-config.php file, because this is the file that contains important information about your site’s database, security keys, etc. Getting access to this information would allow someone to change anything in your database, create a user account, upload files and take control of your site.
In order to protect your WordPress site from being attacked and even being used as part of a bot net, therefore, prevent people from being able to easily view your wp-config.php file. This requires knowing how to edit database information, move files around in your server and changing access permissions.
Security Measure #6 – Rename Or Delete Unnecessary Installation Files
Rename or delete the install.php, upgrade.php and readme.html files from your server.
These files are completely unnecessary after installation and can be deleted. If you don’t want to delete these files, just rename them.
Security Measure #7 – Upgrade Your WordPress Site, Themes & Plugins
Hackers search for vulnerabilities in previous versions of WordPress that they can exploit, including out-of-date versions of WP themes and plugins.
Make sure to always keep all of your installation files, plugins, themes, etc. up-to-date.
Security Measure #8 – Disable Your WordPress Theme Editor
WordPress installations come with a built-in editor that allows the administrator to edit theme and plugin files inside the dashboard.
In WordPress, you can access the WordPress Theme Editor by selecting Appearance > Editor in the dashboard menu …
(Accessing the WordPress theme editor via the WP dashboard menu)
The WordPress theme feature lets anyone accessing your site’s admin view and make changes to your WordPress theme template files, and create mayhem on your site.
To prevent people from accessing your WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.
Security Measure #9 – Protect The WordPress Uploads Folder
The WordPress “uploads” folder contains all the media files that get uploaded to your WordPress site.
Normally, this folder is visible to all users online. All a person needs to do to view the contents stored in the “uploads” directory is visit the directory using their web browser …
(WordPress has an uploads directory where media content is stored)
If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, this can become a serious threat to the security of your site.
Protecting your directories will prevent unauthorized people from accessing your ‘uploads’ folder and other important directories. This can be done using plugins, setting file permissions, adding a blank index.php file (this is literally a blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to consult a professional if you are unsure about what to do.
Security Measure #10 – Security Plugins
There are several WordPress security plugins available that will address common security issues faced by WordPress website owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site from botnets, preventing injections of code into files, etc.
Most WordPress plugins address some but not all areas of WordPress security. One WordPress security plugin that seems to do a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.
(SecureScanPro – security plugin for WordPress)
SecureScanPro is easy to install and easy to use, and addresses most of the security areas that WordPress users need to address.
Another great security plugin you may want to consider using is BlogDefender.
Blog Defender WordPress Security Plugin
Blog Defender is a suite of WordPress security video tutorials, plugins and tools, plus a WordPress security PDF/DOC file.
BlogDefender shows you where the security weaknesses in your website are …
WordPress is a very secure platform, but neglecting essential maintenance tasks like updating your WordPress software, WordPress plugins and themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.
Regardless of the type of business you run or plan to run online and how small you think your web presence is, you simply cannot afford to ignore the importance of web security.
As one last reminder of the importance of keeping your websites protected, below is the advice given by an expert on web security to all WordPress users following the global brute force attacks on WordPress in April 2013 …
Owners of websites based on WordPress CMS must improve at least basic security settings and implement best practices such as the use of robust passwords and the accurate management of “admin” accounts.
Pierluigi Paganini, Chief Information Security Officer, Security Affairs
As you can see, website security is very important if you run a WordPress site. Hopefully, the information in this article has given you the initial guidelines and help you need to keep your WordPress site protected from brute force attacks. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.
Also, don’t forget to subscribe to WPCompendium.org to receive notifications whenever we publish new articles and tutorials on WordPress security and reviews of new security plugins.
"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya