WordPress often comes under attack by hackers, due to its global popularity.
In 2013 a worldwide brute force attack began hitting WordPress installations on virtually every host server in existence around the world.
These attacks were caused by botnets (networks of infected computers programmed to attack other installations with security vulnerabilities).
How To Protect Your WordPress Site From A Brute-Force Attack
What Are 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 achieve this, hackers use software tools that can work through hundreds of login combinations in minutes.
If you’re using easy-to-guess user names and passwords, your website could be easily hacked by persistent attempts to guess your site’s login details.
This is called a “brute-force” 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 computers that have been compromised and infected with malicious code or scripts, which are then controlled remotely as a group, often without the computer owners’ knowledge.
Botnets are regularly used to blast out mass spam emails.
The screenshot below was taken from a site that monitors online security showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the world since 2009 called “Zeus” …
(The Zeus botnet has been actively infecting computer networks all around the globe since 2009. Image source: SecureList.com)
These ongoing botnet attacks were highly distributed and well organized. Over 90,000 IP addresses were identified by a number of hosting companies just in the initial attack, when millions of attempts to force their way into WordPress user administration areas took place. The mass attacks then continued, with over 30,000 WordPress sites and blogs being hacked per day.
Coverage of this mass brute-force attack was reported by all the major webhosting companies, as well as the leading technology media publications, such as TechNews Daily, Forbes, PC Magazine, Tech Crunch, BBC News, and even on the official website of the US Department of Homeland Security …
(WordPress is frequently the target of malicious attempts by hackers)
Does This Mean WordPress Is Not Secure And We Should Stop Using It?
No. In fact, there are lots of very good reasons why you should choose WordPress if you are concerned about website security.
To learn what makes WordPress a very secure web platform, read this article: Is WordPress A Secure Website Platform?
It’s important to understand that, in the case of April 2013 brute force botnet attack described above, was no specific vulnerability in WordPress being exploited (the same script was also targeting sites built using platforms like Joomla).
Mike Little, the co-founder of WordPress with Matt Mullenweg, said this about the botnet 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.
Protecting Your WordPress Site From Brute-Force Attacks – Ten Security Checks
You may think that your site offers no value to hackers, but the reality is that to a hacker, all websites are an opportunity to benefit or profit at your expense.
If hackers can find a way to break in and gain stealth control of your site, the web site can then be employed as a “bot” in a planned cyber attack against larger and more valued websites.
Additional undesirable impacts of having your website hacked include being blacklisted by Google, having spammy links advertising things like online meds, porn, etc. inserted in your content, redirecting visitors to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasties.
The harsh reality is that hackers are most likely trying to hack into your website as you are reading this right now. Whether they will successfully break in depends on how challenging you will make things for hackers to continue trying until they can discover how to get in, or decide to look for a less secure target.
How Much Information Are You Broadcasting To Hackers About Your Site?
Does your website run on WordPress? If so visit a site like Hackertarget.com and run your website through their WordPress security check …
You will see that the test returns a number of results and details about your site …
(Hackertarget – WP security check results. Source: Hackertarget.com)
It should be obvious after using the scanning tool that if you can see all of this information, hackers can too.
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 are all valuable information to hackers, as this informs them about any holes or weaknesses, especially in older versions.
If your site or blog runs on WordPress and you are not preventive steps to toughen up your site, then 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 hitting WordPress sites worldwide!
When a website or blog gets compromised, webmasters will find themselves completely “locked out” of their own site, or notice that their files have been modified or even that their content has been entirely wiped out. Typically, compromised sites will become infected with malicious scripts without the owner’s knowledge or awareness.
To help avoid the heartache of having your website being hacked into, we have listed below ten simple, yet essential and effective security measures that will help to protect your WordPress site from being brute-force attacked.
Note: A few of the recommended measures below need some technical skills to modify core WordPress and/or server files. If you have no web skills, or don’t want to mess around with code on your site, then ask your web host or search for a WordPress technical provider in our WordPress Services Directory.
Security Measure #1 – Contact Your Host
Contact your host and ask them what security systems have been put into place to help prevent your site from brute-force attacks, and what is done to ensure that your WordPress sites are being regularly backed up.
Check that your webhosting provider backs up your sites and that, if anything goes wrong, you can quickly and easily recover your site.
Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Regularly Maintained
Never rely just on your webhosting provider for your site backups. Instead, learn how to maintain and manage your WordPress site or get this service done for you and develop a habit of religiously performing a complete WordPress site maintenance routine frequently (e.g. daily, weekly, fortnightly, etc …)
A full WordPress maintenance routine ensures that:
- All unnecessary data and files are deleted,
- All WordPress files and data are free of errors, optimized and backed up,
- All WordPress software, themes and plugins are up-to-date,
- etc …
A full WordPress maintenance routine looks like this …
(Maintaining your WordPress web site frequently backed up and up-to-date is vitally important for WordPress security. Image source: WPTrainMe.com)
Again, we cannot stress enough how vitally important maintaining your WordPress web site fully backed up and updated is. WordPress 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 WP site 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 should do after making sure that your heart is still beating!
If you don’t want to perform manual backups, 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, Clone & Protect Your WordPress Websites With Backup Creator Plugin For WordPress
Security Measure #3 – Do Not Use “Admin” As A Username
The brute-force attack on WordPress sites was mostly attempting to compromise site admin panels and gain access to the site by exploiting installations using “admin” as their username.
For reasons of website security, avoid setting up a WordPress site with the username admin. This is the first area hackers will test. If your blog’s username is “admin”, then change this immediately.
For a detailed tutorial on how to change your username, go here: Changing Your WP User Name From Admin To A Different Username
Security Measure #4 – Change Your Password
A “brute force” attack occurs when malicious software continually hits a login or password field with different strings of characters trying to guess the right login combination that will unlock your website.
Unless some measure is put into place to block the brute force attack from happening (see further below for a couple of effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually works out the combination.
Passwords that are easy to guess, therefore, become very easy targets for hacking attacks. Make sure that you change your password to a string containing at least 8 characters long, with upper and lowercase letters, and add a few “special” characters (%^#$@&*).
If you have trouble coming up with strong passwords or you are reluctant to set up different passwords for all of your online logins, then use a password tool like Roboform …
(You can use a password tool like Roboform to create unbreakable passwords)
For a simple step-by-step tutorial for non-technical admin users on how to change your password, go here: What To Do If You Need To Reset WordPress Passwords
Security Measure #5 – Prevent Access To The wp-config.php File
The wp-config.php file contains important information about your WP database and is used to define advanced options for WordPress.
If hackers break into your WordPress site, they will typically look for your wp-config.php file, because this file contains your database information, 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.
To protect your WordPress site from being attacked and even being used as part of a bot net, therefore, you must prevent your wp-config.php file from being easily accessed. 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 can be removed after installation. If you don’t want to delete these files, just rename them.
Security Measure #7 – Keep Your WordPress Blog, Plugins & Themes Up-To-Date
Hackers are always on the lookout for vulnerabilities in outdated versions of WordPress that they can exploit, including outdated versions of WP plugins and themes.
Make sure to always keep all of your application files, themes, plugins, etc. up-to-date.
Security Measure #8 – Disable The Theme Editor
WordPress comes with a built-in editor feature that allows the administrator to edit theme and plugin files from the dashboard.
You can access your WordPress Theme Editor by selecting Appearance > Editor from your admin menu …
(The WordPress theme editor is accessible via the WordPress main menu)
This allows anyone accessing your blog to view and make changes to your WordPress theme templates, or cause havoc on your site.
If you want to prevent unauthorized people from accessing the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.
Security Measure #9 – Prevent Access To The WordPress Uploads Folder
The “uploads” directory contains all the media files that get uploaded to your site.
Normally, this folder is visible to anyone online. All a person needs to do to see the contents in the “uploads” folder is visit the directory using their browser …
(WordPress has an uploads folder where all of your media files are stored)
If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, this could seriously threaten the security of your site.
Protecting your directories will prevent unauthorized people from viewing 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 an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to seek professional help if you are unsure about what to do.
Security Measure #10 – Security Plugins
A number of great security plugins for WordPress are available that will address most security issues faced by WordPress website owners, such as preventing hackers from gaining access to vital information about your site, protecting your site from brute-force attacks, preventing unauthorized file uploads, etc.
Many WordPress plugins address some but not all areas of WordPress security. One plugin that does a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your site files and causing damage to your site is SecureScanPro.
(SecureScanPro – total security software solution for WordPress)
SecureScanPro is easy to install and easy to use, and fixes most of the security issues that WordPress users need to address.
Another great plugin you may want to look at using is BlogDefender.
Blog Defender is a suite of WordPress security video tutorials, WordPress plugins and tools, plus WordPress security documentation in PDF and DOC formats.
BlogDefender shows you where potential security holes in your WordPress installation are …
WordPress is a very secure web platform, but neglecting basic maintenance tasks like keeping your WordPress core files, WP plugins and themes updated to their latest versions, tightening file and data security and taking other necessary precautions can have disastrous consequences.
No matter what type of business you run or plan to run online and how small you think your web presence is, website security is something you cannot ignore.
As one last reminder of the importance of website security, below is the advice given by an expert on website security to all WordPress users following the mass brute-force attacks by botnets 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, WordPress security is very important if you run a WordPress site. Hopefully, the above article has given you the initial steps you need to take to keep your WordPress site protected from brute-force attacks. If you need any further help or assistance with WordPress security, please consult a WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.
We also recommend subscribing to WPCompendium.org to receive notifications via email when we publish new articles on WordPress security and tutorials about WordPress security plugins and solutions.
"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum