In April 2013, WordPress installations around the world were subjected to a global-scale brute force attack.
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
What Is A Brute-Force Attack?
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 a WordPress site. One of these is by trying to guess the site’s administration login username and password. This is done using scripts and tools that can work through hundreds of possible logins in minutes.
If you’re using obvious usernames and weak passwords that are easy to guess, your website could be an easy target for hacking attempts.
This is called a “brute-force” attack.
Botnet – What Is This?
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 compromised and infected with malicious code, which can then be controlled remotely as a group, often without the unsuspecting computer owners’ knowledge.
Botnets are often used to blast mass spam emails.
Below is a screenshot taken from a site that monitors online security 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 globe since 2009. Screenshot source: SecureList.com)
These were well organized and highly distributed attacks on WordPress. 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 site administration areas. The large-scale attack continued after this, with over 30,000 WordPress sites and blogs being hacked each day.
Coverage of the worldwide brute-force botnet attack was widely reported in all of the major webhosting companies, as well as the leading technology publications, such as TechNews Daily, Forbes, PC Magazine, BBC News, Tech Crunch, and even on the official US Department of Homeland Security website …
(Being the world’s most popular content management system makes WordPress a target for hacking)
Does This Mean We Shouldn’t Use WordPress Anymore?
No. In fact, there are many very good reasons why you should continue using WordPress if you are concerned at all about the security of your online business.
We explain why WordPress is a secure web platform in this article: Can You Build A Secure Business Online Using WordPress? What Every Business Owner Needs To Know
It’s important to understand that, in the case of April 2013 large-scale brute-force attack described above, there was no WordPress vulnerability being exploited (the same script was also attacking sites built using other platforms like Joomla).
Mike Little, the co-founder of WordPress, 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.
Preventing Your WordPress Site From Brute Force Attacks – Ten Security Checks
You may think that your site provides little to no value to hackers, but the reality is that all websites have value to a malicious user.
If a hacker can exploit a way to gain control of your website or blog, that website can then be used as a “bot” in a planned cyber attack against other highly-valued websites.
Additional undesirable consequences of having your website hacked include being blacklisted by Google, having stealthy spam links promoting things like gambling, discounted fashion, etc. in your content, redirecting visitors to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and many other nasties.
The harsh reality is that software-driven bots are trying to hack into your website or blog right now. Whether they can hack into your site or not, depends on how hard or easy you have made it for them to keep persisting until they can find a way to get access, or give up and go look for a less protected target.
How Much Information About Your Site Are You Broadcasting To Hackers?
Do you own a WordPress site? If so, 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 – WP security check results. Product image source: Hackertarget.com)
It should be obvious after using this tool that if you can freely access all of this information, so can hackers.
The ability 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 are all potentially valuable information to hackers, as this informs them about potential holes or weaknesses, especially where the owners haven’t updated their software versions.
If your site or blog is powered by WordPress and you are not taking steps to toughen up your site, we can practically guarantee that, at some point in time, someone will attempt to hack your site, because these brute-force attacks are systematically targeting WordPress sites around the world!
When a website or blog is hacked, site 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 entirely wiped out. Typically, sites will become infected with malicious scripts without the owner’s knowledge or awareness.
To help avoid the heartache and frustration that comes with discovering that your website has been hacked into, we have listed below 10 essential and effective security measures that will help to protect your WordPress site from botnet attacks.
Note: A few of the recommended measures below require some technical understanding of how to modify core WordPress and/or server files. If you are not technical, or don’t want to mess around with file code, then ask your web host or a professional WordPress technical provider for assistance.
Security Measure #1 – Contact Your Webhosting Provider
Get in touch with your host and ask them exactly what security precautions they have put in place to help prevent your site from botnet attacks, and what they do to make sure that your server files get backed up.
It is important to check that your hosting provider backs up your server files and that, if disaster strikes, you can quickly and easily get your files and data back.
Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Or Blog Regularly Updated
You should never rely only on your web host for site backups. Instead, learn how to maintain your WordPress site or get this service done for you and maintain a habit of performing a complete WordPress site maintenance routine on a frequent basis (e.g. daily, weekly, fortnightly, etc …)
A proper WordPress maintenance routine ensures that:
- All unnecessary data and files are removed,
- All WP files and data are free of errors, optimized and backed up,
- All WordPress software, plugins and themes are up-to-date,
- etc …
A full WordPress site maintenance routine looks like this …
Again, we cannot stress enough how important it is to maintain your WP website backed up and up-to-date. WordPress maintenance is not hard or time-consuming, but it must be done to ensure the security of your website or blog. If you don’t want to learn how to do WP site maintenance yourself, pay someone to do it but make sure it gets done. Backing up your site is the next most important thing you must do after making sure that you still have a pulse!
If you don’t want to perform manual backups, there are many plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Backup, Duplicate & 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 website administrator panels and gain access to the site by exploiting WordPress installations that used “admin” as the username.
For reasons of website security, avoid installing WordPress sites with the username admin. This is the first thing hackers will test. If your site’s user name is admin, change it immediately.
We have created a detailed step-by-step tutorial for admin users that shows you how to change your username here: Changing Your WP Admin User Name To A More Secure User Name
Security Measure #4 – Choose A Strong Password
A “brute force” attack occurs when malicious software continually and persistently tries to guess the right combination of characters in a username and password that will give the hacker entry to your site.
Unless you put some measure in place to block the brute-force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually “cracks” the code.
Passwords that are easy to guess, therefore, make very easy targets for botnets. Make sure that you change your password to something that is at least 8 characters long, with upper and lowercase letters, and “special” characters (%^#$@&*).
If you have trouble coming up with strong passwords or feel reluctant to set up different passwords for all your online logins, then use a password software tool like Roboform …
For a simple step-by-step tutorial created especially for non-technical WP admin users on how to change your admin password, go here: What To Do If You Need To Reset WordPress Passwords
Security Measure #5 – Prevent The wp-config.php File From Being Found
The wp-config.php file contains important information about your blog’s database and is used to define advanced WordPress options.
If a hacker breaks 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 a hacker 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, 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 Blog Installation Files
Rename or delete the install.php, upgrade.php and readme.html files from your server.
You can remove these files after installation, as they are unnecessary. If you don’t want to remove these files, then just rename them.
Security Measure #7 – Update Your WordPress Installation, Themes And Plugins To Their Latest Version
Hackers are always on the lookout for vulnerabilities they can exploit in previous WordPress versions, including outdated versions of WordPress plugins and themes.
Ensure that all of your application files, themes, plugins, etc. are always up to date.
Security Measure #8 – Disable Your WordPress Theme Editor
WordPress comes with a built-in editor feature that allows you to edit theme and plugin code inside the dashboard area.
In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor from the dashboard menu …
(The WordPress theme editor is accessible using the WP main menu)
The WordPress theme editor lets anyone accessing your site view and change your theme template files, or create havoc on your site.
If you want to prevent people from accessing your 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 Your WordPress Uploads Directory
The WordPress “uploads” directory contains all the media that gets uploaded to your blog.
By default, this folder is visible to anyone online. All someone has to do to view all of the contents in the “uploads” folder is visit your directory using their web browser …
(WordPress uploads directory)
If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, someone can upload unauthorized file types or compromise 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 ask for assistance from someone who knows what they are doing if you are unsure about what to do.
Security Measure #10 – Install WordPress Security Plugins
There are a number of great WordPress security plugins available that will address most security issues WordPress website owners face, such as preventing hackers from accessing your site, protecting your website from botnets, preventing injections of code into files, etc.
Most WordPress plugins address some but not all areas of WordPress security. One plugin that seems to do a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your site files and causing irreparable damage to your site is SecureScanPro.
(SecureScanPro – WP total security plugin)
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 plugin you may want to consider 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 the security weaknesses in your WordPress installation are …
WordPress is a secure web platform, but neglecting basic maintenance tasks like making sure that your WordPress core files, plugins and themes are kept up-to-date, tightening file and data protection and taking other necessary precautions can expose your website to attacks 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 afford to ignore the importance of web security.
As a final reminder, below is the advice given by an expert on website security to all WordPress users following the large-scale 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 information will help prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.
Also, remember subscribe to WPCompendium.org to receive notifications when we publish new information on WordPress security and reviews of new WordPress security plugins.
"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)