WordPress powers millions of websites around the world, which makes it a target for hacker attacks.
In early 2013 a worldwide brute-force attack struck WordPress installations across almost every web host in existence around the world.
These attacks were caused by computer networks infected with malware and programmed to attack other sites (called “botnets”).
How To Protect Your WordPress Site From A Brute-Force Attack
Brute Force Attacks – Definition
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 ways hackers try to break into WordPress sites. One of these is by trying to guess the site’s administration login username and password. This can be done with software tools and scripts that can work through hundreds of possible login combinations in minutes.
If you’re using weak login details, your site can be easily hacked by a script’s repeated attempts to guess your site’s login details.
This is called a “brute-force” login attack.
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 infected with malicious software, which can then be controlled remotely as a group, often without the computer owners’ knowledge or awareness.
Botnets are typically used to send mass spam emails.
The screenshot below was taken from an online security monitoring site showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the world since 2009 …
(The Zeus botnet has been actively compromising computer networks all around the world since 2009. Screenshot: SecureList.com)
These were highly distributed and well organized botnet attacks. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress users administration areas. The worldwide brute-force attacks continued after this, with over 30,000 WordPress sites being hacked per day.
Coverage of the April 2013 worldwide 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 large-scale malicious attempts by hackers, due to its global popularity)
Does This Mean We Shouldn’t Use WordPress Anymore?
No. In fact, there are lots of very good reasons why you should choose WordPress if you are concerned at all about the security of your online presence.
We explain why WordPress is a secure web platform in this article: Is WordPress Secure?
It’s important to understand that, in the case of the brute force botnet attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using other CMS platforms like Joomla).
Mike Little, one of the co-founders of WordPress with Matt Mullenweg, made the following comment 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 Protect Your WordPress Site From Being Brute Force Attacked – Ten Security Checks
You may think that your site has no value to hackers, but the reality is that all websites have some value to a malicious user.
If someone can discover a software weakness in your security, your site can then be used as a “bot” in a planned cyber attack against more valuable websites.
Additional undesirable results of having your site hacked include getting blacklisted by Google, having spammy links advertising things like gambling, porn, etc. in your content, malicious redirects to phishing sites, drive-by downloads (adding malicious scripts on your visitors’ computers), and many other nasty things.
The truth is that software-driven bots are searching for exploits and trying to hack into your blog while you are reading this. Whether they will get into your site depends on how difficult you have made things for hackers and botnets to keep trying until they can discover a way to get access, or give up and go look for a less secure target.
How Much Information About Your Site Are You Broadcasting To Hackers?
If you visit a site like Hackertarget.com and run your website through their WordPress security scan …
You will see that the test returns a number of results and information about your website setup …
(Hackertarget – website security scan results. Product image: Hackertarget.com)
It should be obvious after using the above tool that if you can see all of this information, then hackers can too.
(Product image source: BlogDefender.com)
Being able to see which 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 in your site can be potentially useful information to hackers, as this can inform them about any exploitable security weaknesses, especially in older versions.
If your site or blog is driven by WordPress and you are not precautionary 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 all the world!
When a site is hacked, blog owners can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been altered or even that their content has been completely wiped out. Typically, most sites will become infected with malicious scripts without the owner even being aware that this has happened.
To help avoid the heartache of having your website or blog being 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 measures shown 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 code on your site, then ask your web host or a professional WordPress service provider for assistance.
Security Measure #1 – Contact Your Web Host
Get in touch with your webhosting service provider and ask them what security measures have been put in place to protect your site from botnet attacks, and what they do to ensure that your files and data get backed up.
It’s important to check that your web host is backing up your sites and that, if disaster strikes, you can quickly and easily get back your site.
Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Regularly Updated
Never rely just on your webhosting service provider for your site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this done for you and maintain a habit of performing a full site maintenance routine on a regular basis (e.g. daily, weekly, fortnightly, etc …)
A complete WordPress maintenance routine ensures that:
- All unnecessary data and files are removed,
- All data and files are free of errors, optimized and backed up,
- All plugins, themes and software components are up-to-date,
- etc …
A full WP maintenance routine looks like this …
(Maintaining your WP web site regularly backed up and up-to-date is vitally important for WordPress security. Image: WPTrainMe.com)
Again, we cannot stress enough how important it is to maintain your WP site backed up and updated. WordPress site maintenance is not hard 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 someone to do it but make sure this gets done. Backing up your site is the next most important thing you should do after making sure that you are still breathing!
If you don’t want to back up your files manually, there are a number of free and paid WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Back Up, Duplicate And Keep Your WP Web Sites Protected With Backup Creator WordPress Plugin
Security Measure #3 – Make Sure That Your Username Is Not “Admin”
The mass brute-force botnet attack on WordPress sites was mostly an attempt to compromise site admin panels and gain access to the site by exploiting sites that used “admin” as their user name.
For reasons of website security, don’t install WordPress sites with the username admin. This is the first area of potential vulnerability hackers will test. If your site’s username is admin, you need to change this immediately.
For a detailed tutorial on how to change your username, go here: How To Change Your Admin User Name In WordPress
Security Measure #4 – Use Strong Passwords
A “brute force” attack occurs when malicious software persistently tries to guess the right combination of password and username characters that will unlock your website.
Unless you put some measure in place to block the brute-force attack from happening (see further below for a couple of effective ways to do this), the “bot” will just keep attacking your site until it eventually works out the combination.
Passwords that are easy to guess, therefore, make very easy targets for hacking attacks. Make sure that you change your password combination to a string that contains at least 8 characters long, with both upper and lowercase letters, and add a few “special” characters (^%$#&@*).
Roboform is a password tool you can use to help you generate strong passwords …
(Roboform is a password tool that lets you easily generate different strong passwords)
We have created a simple step-by-step tutorial created especially for WP admin users on how to change your admin password here: Changing WordPress Passwords
Security Measure #5 – Prevent Access To The wp-config.php File
The wp-config.php file contains important information about your website’s database and is used to define advanced options for WordPress.
If hackers break into your WordPress website, they will typically look for the wp-config.php file, because this is the file that contains your WordPress database information, security keys, etc. Getting access to this information would allow them 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 accessed. This requires knowing how to edit database information, move files around in your server and changing access permissions.
Security Measure #6 – Delete Or Rename 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 removed. If you don’t want to delete these files, then just rename them.
Security Measure #7 – Keep Your WordPress Software, Themes & Plugins Up-To-Date
Hackers look for vulnerabilities in previous versions of WordPress that can be exploited, including out-of-date versions of WordPress themes and plugins.
Ensure that all of your software files, plugins, themes, etc. are always up to date.
Security Measure #8 – Disable The WordPress Theme Editor
WordPress comes with a built-in editor feature that allows you to edit plugin and theme code inside the dashboard area.
In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor in your main menu …
(The WordPress theme editor is accessible via the main menu)
The WordPress theme editor allows anyone accessing your blog to see and edit all of your theme templates, and cause havoc on your site.
If you want to prevent unauthorized people from being able to access your 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 Site’s Uploads Directory
The WordPress “uploads” directory stores all the media that gets uploaded to your site.
By default, this folder is visible to anyone online. All someone has to do to view the contents in your site’s “uploads” folder is navigate to your directory using their web browser …
(WordPress uploads directory)
If any files stored in his folder have vulnerabilities that can be exploited by malicious users, this can threaten the security of your website.
Protecting your directories will prevent online users 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 get professional help if you are not sure about what to do.
Security Measure #10 – Security Plugins
There are some great security plugins for WordPress available that specifically address many common security issues WordPress website owners face, such as preventing unauthorized users from accessing your site, protecting your website from brute-force attacks, preventing unauthorized file uploads, etc.
Many WordPress plugins address some but not all areas of WordPress security. One WordPress plugin that does a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.
(SecureScanPro – total security software for WordPress)
SecureScanPro is easy to install and easy to use, and does a great job of fixing 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 Security Solution For WordPress
Blog Defender is a package of WordPress security video tutorials, WordPress plugins and tools, plus a WordPress security PDF/DOC file.
BlogDefender shows you where potential security holes in your website are …
WordPress is a secure platform, but neglecting simple maintenance tasks like keeping your WordPress software, plugins and WordPress themes updated to their latest versions, tightening file and data protection and taking other necessary precautions can have disastrous consequences.
Regardless of the kind of business you run or plan to run online and how small you think your web presence is, web security is something you simply cannot afford to ignore.
As one last reminder of the importance of website security, below is the advice given by a security expert to all WordPress users following the worldwide 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, website security is very important if you run a WordPress site. Hopefully, the information in this article will help keep your WordPress site protected from brute force attacks. If you need any further help or assistance with WordPress security, please seek help from a WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.
We also recommend subscribing to WPCompendium.org to receive notifications when we publish new tutorials on WordPress security and reviews of WordPress security plugins and solutions.
"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)