WordPress is the world’s most used content management system making it a frequent target for attacks by hackers.
In early 2013, WordPress installations around the world were subjected to large-scale brute force attacks.
These attacks were caused by botnets (infected computer networks programmed to attack other installations with security vulnerabilities).
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)
One of the many ways hackers will attempt to break into WordPress sites is by trying to guess the site’s administration login username and password. This is achieved using software tools that automatically tries to guess hundreds of possible logins in minutes.
If you’re using obvious login details, your website can be an easy target for hackers.
This is called a “brute-force” 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.
”Botnets” are networks of computers that have been infected with malicious software, which are then controlled remotely as a group, often without the computer owners even being aware that this is going on.
Botnets are normally used used to send mass spam emails from computers of compromised user accounts.
Below is a screenshot taken from an online security monitoring site showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the globe since 2009 called “Zeus” …
(The Zeus botnet has been actively compromising computer networks all around the world since 2009. Screenshot source: SecureList.com)
The botnet attacks were highly distributed and well organized. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack, when millions of attempts to force their way into WordPress users admin areas occurred. The large-scale attacks continued after this, with over 30,000 WordPress blogs being hacked every day.
Coverage of the April 2013 brute-force attack was reported by all the major webhosting companiesand leading technology publications, such as TechNews Daily, Forbes, Tech Crunch, PC Magazine, BBC News, and even on the official US Department of Homeland Security website …
(WordPress powers millions of websites worldwide, making it a target for attempted hacking attacks)
Does This Mean We Shouldn’t Use WordPress Anymore?
No. In fact, there are lots of good reasons why you should use WordPress if you are concerned about website security.
We explain what makes WordPress a very secure platform for websites in this article: Is WordPress Secure?
It’s important to note that, in the case of the worldwide brute force attack described above, there was actually no WordPress vulnerability being exploited (the same script was also attacking sites built using other web applications 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.
Preventing Your WordPress Website From Brute-Force Attacks – Ten Security Measures
You may think that your website has no value to hackers, but the reality is that to a hacker, every website provides an opportunity to benefit or profit at your expense.
If a malicious user can exploit a vulnerability and remotely take control of your website, the site can then be used as part of a larger network of “bots” to target more valued websites.
Additional undesirable results of being hacked and your site security compromised include getting blacklisted by search engines, having spammy links advertising things like gambling, discounted fashion, etc. inserted in your content, malicious redirects to phishing sites, drive-by downloads (adding malicious software on your visitors’ computers), and lots of other nasty things.
The truth is that brute-force software bots are looking for security weaknesses and trying to break into your web site at this very moment. Whether they will achieve this depends on how difficult you can make things for hackers to keep persisting until they find a way to break in, or are forced to give up and go look for an easier target.
How Much Information About Your WordPress Site Are You Broadcasting To Hackers?
If you visit Hackertarget.com and run your website through their WordPress security check …
You will see that the check returns a number of results and details about your WordPress installation …
(WordPress security check results. Screenshot: Hackertarget.com)
It should be obvious after using the tool shown above that if you are able to 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, and which files have been uploaded to certain directories in your site can be useful information to hackers, as this can inform them about any exploitable security weaknesses, especially in older versions.
If your website is powered by WordPress and you’re not taking appropriate steps to toughen up your site, then we can practically guarantee that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically hitting WordPress installations around the world!
Typically, when a website is hacked, blog owners will find themselves completely “locked out” of their own site, or notice that their files have been altered or even that their content has been entirely wiped out. Typically, sites will become infected with malicious software without the owner’s knowledge or awareness.
To help avoid the heartache that comes with discovering that your website has been hacked into, we have listed below ten simple, yet essential and effective security measures that will help to protect your WordPress site from being attacked by brute-force hackers.
Note: A few of the recommended measures below require some technical understanding of how to modify core WordPress and server files. If you are not technical-minded, or don’t want to mess around with file code, then ask your web host or search for a WordPress technical provider in our WordPress Services Directory.
Security Measure #1 – Contact Your Hosting Company
Get in touch with your webhosting provider and ask them what security systems have been put in place to protect your site from being attacked, and what they do to make sure that your server files and data get regularly backed up.
Check that your webhosting provider backs up your server files and that, if anything goes wrong, you can quickly and easily get back your files.
Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Regularly Maintained
You should never rely on your host for your site backups. Instead, learn how to maintain your WordPress site or pay someone to get this service done for you and develop a habit of performing a full site maintenance routine on a frequent basis (e.g. daily, weekly, fortnightly, etc …)
A proper WordPress maintenance routine ensures that:
- All unnecessary files and data are deleted,
- All data and files are free of errors, optimized and backed up,
- All WordPress software, plugins and themes are up-to-date,
- etc …
A complete WordPress site maintenance routine looks like this …
(Maintaining your WordPress installation regularly backed up and up-to-date is vitally important for WordPress security. Screenshot source: WPTrainMe.com)
Again, we cannot stress enough how important maintaining your WordPress installation frequently backed up and up-to-date is. WP maintenance is not hard or time-consuming, but it must be done to ensure the security of your website. If you don’t want to learn how to do WordPress site maintenance yourself, get someone else to do it but make sure it gets done. Backing up your site is the next most important thing you should do after making sure that you still have a pulse!
If you don’t want to perform manual backups, there are many WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Back Up, Copy And Keep Your WP Web Site Protected With Backup Creator WordPress Plugin
Security Measure #3 – Do Not Use “Admin” As Your Username
the worldwide brute force botnet attack on WordPress is mostly attempting to compromise website admin panels and gain access to the site by exploiting WordPress sites with “admin” as their user name.
For reasons of website security, don’t set up WordPress sites with the username admin. This is the first thing hackers will test. If your blog’s user name is admin, change this immediately.
We have created a simple tutorial for WP admin users that shows you how to change your admin username here: How To Change Your WP Admin Username To A More Secure User Name
Security Measure #4 – Make Sure Your Password Is Strong
A “brute force” attack occurs when malicious software continually hits a username and password field with different character strings in an attempt to guess the right login combination that will give the hacker entry to your website.
Unless you put some measure in place to block the brute force attack (see further below for a couple of effective ways to do this), the “bot” will just persist in attacking your site until it eventually works out the combination.
Passwords that are easy to guess, therefore, are very easy targets for hacking attacks. Make sure that you change your password to a string that is at least eight characters long, with upper and lowercase letters, combined with “special” characters (^%$#&@*).
You can use a password program like Roboform to create strong login passwords …
(Roboform is a password management tool that lets you generate different passwords)
For a detailed tutorial for WP admin users on how to change your WordPress admin password, go here: What To Do If You Need To Change WordPress Passwords
Security Measure #5 – Prevent Access To The wp-config.php File
The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced options for WordPress.
(WP Config file)
If hackers break into your website, they will normally look for your wp-config.php file, because this file contains important information about your site’s database, 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.
In order 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 accessible. 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 Website Installation Files
Delete or rename your install.php, upgrade.php and readme.html files.
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 Installation, Themes And Plugins Up-To-Date
Hackers look for vulnerabilities they can exploit in outdated WordPress versions, including out-of-date versions of WordPress themes and plugins.
Ensure that all of your application files, plugins, themes, etc. are always up to date.
Security Measure #8 – Disable Your Theme Editor
WordPress comes with a built-in editor feature that lets administrators edit plugin and theme files inside the dashboard.
In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor in the main menu …
(Accessing the WordPress theme editor via the main menu)
This means that anyone logging into your blog can view and modify your WP theme template files, or create havoc on your site.
If you want to prevent people from accessing the WordPress Theme editor, you will need to disable it. This can be done by adding code to your wp-config.php file.
Security Measure #9 – Secure The Site’s Uploads Directory
The “uploads” folder contains all the media files that get uploaded to your WordPress site.
By default, this folder is visible to all users online. All someone has to do to see all of the contents stored in your “uploads” directory is visit your directory using their browser …
(WordPress has an uploads directory where media content is stored)
If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this could become a serious threat to the security of your website.
Protecting your directories will prevent online users from viewing your ‘uploads’ folder and other important directories. This can be done using plugins, setting file permissions, uploading 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 ask help from someone who knows what they are doing if you are unsure about what to do.
Security Measure #10 – Use Security Plugins
There are several security plugins for WordPress available that will address common security issues faced by WordPress site owners, such as preventing hackers from accessing vital areas of your site, protecting your site from malicious software, preventing unauthorized file uploads, etc.
Most WordPress plugins address some but not all areas of WordPress security. One security plugin that does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your website files and damaging your site is SecureScanPro.
(SecureScanPro – security software for WordPress)
SecureScanPro is easy to install and easy to use, and does a great job of addressing 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 Suite
Blog Defender is a package of WordPress security video tutorials, plugins and tools, plus a WordPress security PDF/DOC file.
BlogDefender scans you WordPress site for potential security weaknesses …
WordPress is a very secure web platform, but neglecting basic maintenance tasks like updating your WordPress installation, plugins and themes, tightening file and data security and taking other necessary precautions can expose your site to malicious by hackers and bots.
No matter what kind of business you run or plan to run online and how small you think your web presence is, you simply cannot ignore the importance of securing your web sites.
As a final reminder of the importance of keeping your websites protected, below is the advice given by an expert on website security to all WordPress users following the mass brute-force attacks on WordPress in 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 above article has given you the initial steps you need to take to prevent brute-force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.
We also recommend subscribing to WPCompendium.org to be notified via email when we publish new articles and tutorials on WordPress security and tutorials about new WordPress security plugins and solutions.
"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com