When you are the world’s leading content management system and the online publishing platform of choice used by millions of websites and loved by thousands of web developers and web designers, it’s inevitable that at some point in time, WordPress will become a target for attacks from hackers.
In early 2013 a global brute-force attack began hitting WordPress installations on virtually every host server in existence around the world.
These attacks were caused by infected computer networks programmed to attack other sites, also commonly known as “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’s administration login username and password. To do this, hackers use scripts and tools that can work through hundreds of possible login combinations in minutes.
If you’re using easy-to-guess usernames and predictable passwords, your website could be an easy target for hacking attempts.
This is called a “brute force” login attack.
Botnet Definition
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.
(Source: Wikipedia.org)
A “Botnet” is a network of computers that have been infected with malicious software, which are then controlled remotely as a group, typically without the computer owners even being aware that this is going on.
Botnets are often used to send mass spam emails.
Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of a botnet that has been actively infecting computer networks all around the world since 2009 called “Zeus” …
(ZeuS is a botnet that has been actively infecting computer networks all around the world since 2009. Screenshot: SecureList.com)
These botnet attacks on WordPress are highly distributed and well organized. Over 90,000 IP addresses were identified by several hosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress site administration areas. The worldwide brute-force attacks then continued, with over 30,000 WordPress blogs being hacked per day.
Coverage of this large-scale brute-force attack was widely reported in all the major webhosting companies, as well as the leading technology media publications, such as Forbes, TechNews Daily, PC Magazine, Tech Crunch, BBC News, and even on the official website of the US Department of Homeland Security …
(WordPress powers millions of sites worldwide, which makes it an obvious target for malicious attempts by hackers)
Does This Mean We Shouldn’t Use WordPress Anymore?
No. In fact, there are many good reasons why you should use WordPress if you are concerned about the security of your website.
We explain why WordPress is a secure platform for websites in this article: Is WordPress Secure?
It’s important to note that, in the case of the mass brute-force botnet attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using other applications like Joomla).
Mike Little, one of the co-founders of WordPress with Matt Mullenweg, 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.
Protecting Your WordPress Website From Brute-Force Attacks – 10 Security Measures
You may think that the information in your website or blog is of no interest to hackers, but the reality is that every website is valuable to a malicious user.
If a malicious user can hack and gain access and control of your site, that website can then be used as a “bot” in a planned cyber-attack against other valuable sites.
Additional undesirable consequences of having your website hacked and your site security compromised include being blacklisted by search engines, having spammy links promoting things like viagra, discounted fashion, etc. inserted in your content and page title and descriptions, redirecting visitors to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasty things.
The reality is that hackers are looking for weaknesses and trying to hack into your web site as you are reading this page right now. Whether they will successfully break in or not, depends on how challenging you can make it for hackers to keep persisting until they discover how to get in, or are forced to give up and decide to look for a less protected target.
How Much Information About Your Site Are You Broadcasting To Hackers?
Does your website run on WordPress? If so visit Hackertarget.com and run your site through their WordPress security scan …
(WP Security Check Product image: Hackertarget.com)
You will see that the check returns various results and details about your website …
(WP security scan results. Screenshot image: Hackertarget.com)
It should be obvious after using this tool that if you are able to access all of this information about your website, hackers can too.
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 useful information to hackers, as this informs them about any potential holes or weaknesses, especially where the owners haven’t updated their sites.
If your site or blog is powered by WordPress and you’re not precautionary steps to bolster the security of your site, it’s practically guaranteed that, at some point, your site will be hacked, or at least targeted by bots, because these attacks are systematically hitting WordPress sites around the world!
Whenever a site is hacked, site owners will find themselves “locked out” of their own site, or notice that their files have been vandalized or even that their content has been entirely wiped out. Often, most compromised sites will be infected with malicious software or viruses without the owner’s knowledge or awareness.
To avoid the heartache and frustration (and significant loss of valuable business data) of having your site being hacked into, we have listed below 10 essential and effective security checks that will help to protect your WordPress site from being brute force attacked.
Note: Some of the steps shown below require some technical understanding of how to modify core WordPress 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 a professional WordPress service provider for assistance.
***
Security Measure #1 – Contact Your Hosting Service Provider
Get in touch with your hosting provider and ask them what precautions are in place to protect your site from being attacked, and what is done to make sure that your WordPress sites get regularly backed up.
It’s important to check that your hosting provider regularly backs up your sites and that, if anything should happen, you can quickly and easily get your files and data back.
Security Measure #2 – Perform Complete WordPress Backups And Keep Your Site Regularly Updated
You should never rely on your hosting provider 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 performing a complete site maintenance routine on a regular basis (e.g. daily, weekly, fortnightly, etc …)
A proper WordPress maintenance routine ensures that:
- All unnecessary data and files are deleted,
- All WP data and files are free of errors, optimized and backed up,
- All software, themes and plugins are up-to-date,
- etc …
A proper WP maintenance routine looks like this …
(Maintaining your WP website or blog fully backed up and updated is vitally important for WordPress security. Source: WPTrainMe.com)
Again, we cannot stress enough how important it is to maintain your WordPress website regularly backed up and updated. WP 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 don’t want to learn how to do WP site maintenance yourself, pay a professional to do it but make sure this gets done. Backing up your site is the second most important thing you should do after making sure that you are still breathing!
If you don’t want to perform manual backups, there are a number of plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Backup, Clone & Protect Your WordPress Web Sites With Backup Creator WordPress Plugin
Security Measure #3 – Make Sure That Your Username Is Not “Admin”
The mass brute-force attack on WordPress sites was mostly attempting to compromise site administrator panels by exploiting sites with “admin” as their user name.
For website security purposes, avoid setting up WordPress sites with the username “admin”. This is the first area hackers will test. If your site’s user name is “admin”, then make sure you change it immediately.
We have created a simple tutorial that shows you how to change your WordPress admin username here: Changing Your WP Admin Username To A More Secure User Name
Security Measure #4 – Change Your Password
A “brute force” attack occurs when a malicious script continually and persistently tries to guess the right combination of username and password characters that will give the hacker entry to your site.
Unless some measure is put into 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 gets access.
Weak passwords, therefore, are really easy targets for attacks. Make sure that you change your password to something that is at least 8 or 9 characters long, and that includes upper and lowercase letters, combined with “special” characters (^%$#&@*).
If you have trouble coming up with strong passwords or you are reluctant to set up different passwords for all your online logins, then use a password management software tool like Roboform …
(Roboform is a password management program that lets you easily generate different secure passwords)
We have created a step-by-step tutorial created especially for WordPress admin users that shows you how to change your login password here: What To Do If You Need To Reset WordPress Passwords
Security Measure #5 – Secure Your wp-config.php File
The wp-config.php file contains important information about your WordPress site’s database and is used to define advanced options for WordPress.
(wp-config.php)
If hackers break into your WordPress website, they will normally search for your wp-config.php file, because this is the file that contains your database information, 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, you must prevent people viewing 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 – Delete Or Rename Unnecessary Installation Files
Delete or rename 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 – Upgrade Your WordPress Software, Themes & Plugins
Hackers search for vulnerabilities in older versions of WordPress that they can exploit, including out-of-date versions of WP themes and plugins.
Make sure to keep your WordPress installation files, themes, plugins, etc. up-to-date.
Security Measure #8 – Disable The Theme Editor
WordPress installations come with a built-in editor feature that allows site administrators to edit plugin and theme code from the dashboard.
In WordPress, you can access the WordPress Theme Editor by selecting Appearance > Editor in your main menu …
(Accessing the WordPress theme editor via the WordPress dashboard menu)
This allows anyone accessing your blog to see and make changes to all of your theme files, and create havoc on your site.
If you want to prevent people from being able to access 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 Your Site’s Uploads Folder
The “uploads” folder contains all the media files that get uploaded to your WordPress site.
Normally, this folder is visible to online users. All someone has to do to see the contents stored in your “uploads” directory is navigate to your directory using a web browser …
(WordPress uploads folder)
If any files stored in his folder have vulnerabilities that can be exploited by hackers, someone could upload unauthorized file types or compromise 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, uploading a blank index.php file (this is literally a file with nothing in it called “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
Several WordPress security plugins are available that will address most security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital areas of your site, protecting your files from brute-force attacks, preventing injections of code into files, etc.
Many 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 site files and damaging your site is SecureScanPro.
(SecureScanPro – WordPress complete security software)
SecureScanPro is easy to install and easy to use, and does a great job of addressing most of the security issues that WordPress users need to address.
Another security plugin you may want to look at using is BlogDefender.
Blog Defender Security Plugin For WordPress
This product is a suite of WordPress security video tutorials, plugins and tools, plus WordPress security documentation in PDF and DOC formats.
BlogDefender shows you where potential security weaknesses in your website are …
And lets you easily fix these …
If you don’t want to invest in a premium security plugin like SecureScanPro or BlogDefender, then use various free WP plugins, such as Limit Login Attempts …
WordPress is a very secure platform, but neglecting simple maintenance tasks like making sure that your WP core files, plugins and WordPress themes are kept updated to their latest versions, tightening file and data protection and taking other necessary precautions can expose your site to malicious by hackers and bots.
Regardless of the type of business you run or plan to run online and how small you think your web presence is, you cannot ignore the importance of securing your websites.
As a final reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users after the worldwide brute force attacks by botnets 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article has shown you what to do to prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please seek help from 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 be notified when we publish new articles on WordPress security and reviews of new WordPress security plugins and solutions.
***
"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
***