WordPress is the world’s most popular CMS making it an obvious target for attempted hacking attacks.
In 2013, WordPress installations around the world were subjected to a worldwide brute-force attack.
These attacks were caused by networks of infected computers programmed to attack other sites (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)
One of the many ways hackers use to try and break into WordPress sites is by trying to guess the site admin’s login username and password. This can be achieved using scripts and software tools that automatically tries to guess hundreds of login combinations in minutes.
If you’re not using strong usernames or unguessable passwords, your website can be an easy target for hacking attempts.
This is called a “brute-force” attack.
What Are Botnets
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 or scripts, which can then be controlled remotely as a group, typically without the computer owners’ knowledge or awareness.
Botnets are regularly used to blast 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 compromising computer networks all around the globe since 2009 …
(The Zeus botnet has been actively infecting computer networks all around the globe since 2009. Image source: SecureList.com)
These were highly distributed and well organized botnet attacks on WordPress sites. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress user admin areas. The attacks continued after this, with over 30,000 WordPress sites being hacked per day.
Coverage of the large-scale brute force attack was widely reported in all the major webhosting companiesand leading technology media publications, such as Forbes, TechNews Daily, Tech Crunch, BBC News, PC Magazine, and even on the official website of the US Department of Homeland Security …
(Powering millions of sites worldwide makes WordPress an obvious target for hacking attacks)
Does This Mean We Shouldn’t Use WordPress Anymore?
No. In fact, there are many good reasons why you should continue using WordPress if you are concerned at all about the security of your web presence.
We explain why WordPress is a secure web platform in this article: Is WordPress Secure? What Every Website Owner Needs To Know About WordPress
It’s important to note that, in the case of the worldwide brute force attack described above, was no specific vulnerability in WordPress being exploited (the same script was also attacking sites built using other web applications like Joomla).
Mike Little, the co-founder of WordPress, 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 Site From Brute-Force Attacks – 10 Security Points
You may think that the information in your site is of no interest to hackers, but the reality is that every website is valuable to a malicious user.
If a malicious user can exploit a software security flaw that allows them to gain any form of control of your web site, your site can then be employed as part of a larger network of “bots” to target larger and more valuable websites.
Additional undesirable impacts of having your site hacked and your site security compromised include being blacklisted by Google, having spammy links advertising things like online meds, porn, etc. inserted in your content and meta data, malicious redirects to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasties.
The reality is that brute-force software bots are very likely scouring for weaknesses and trying to break into your web site as you are reading this at this very moment. Whether they can get into your site successfully or not, will depend on how difficult you have made it for them to keep trying until they discover how 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?
Does your website run on WordPress? If so visit Hackertarget.com and run your website through their WordPress security scan …
You will see that the scan returns a number of results and details about your site …
(WP security scan 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, then hackers can too.
(Screenshot image: BlogDefender.com)
Being able 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 in your site can all be potentially valuable information to hackers, as this informs them about any exploitable vulnerabilities, especially where site owners haven’t updated their sites.
If your site or blog runs on WordPress and you’re not proactive steps to toughen up your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your installation, because these brute-force attacks are systematically targeting WordPress installations around the world!
Typically, when a website or blog is hacked, blog owners can 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, compromised sites will be infected with malicious software or viruses without the owner even being aware that this has occurred.
To help avoid the heartache (and potential financial loss) that comes with discovering that your website or blog has been hacked into, we have listed below 10 simple, yet essential and effective security measures that will help to protect your WordPress site from brute-force attacks.
Note: Some of the recommended measures below require some technical understanding of how to modify core WordPress and/or server files. If you have no web editing skills, or don’t want to mess around with code on your site, then ask your web host or a professional WordPress technical provider for help.
Security Measure #1 – Get In Touch With Your Webhosting Service
Get in touch with your webhosting provider and ask them exactly what security systems they have put in place to help prevent your site from brute force attacks, and what they are doing to ensure that your files and data get backed up.
Make sure that your hosting service regularly backs up your sites and that, if disaster strikes, you can easily get back your files and data.
Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Frequently Maintained
You should never rely only on your hosting service for site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this done for you and develop a habit of religiously performing a complete site maintenance routine on a frequent basis (e.g. weekly, fortnightly, etc …)
A complete WordPress maintenance routine ensures that:
- All unnecessary files and data are removed,
- All WordPress data and files are free of errors, optimized and backed up,
- All software, themes and plugins are up-to-date,
- etc …
A complete WordPress maintenance routine looks like this …
(Maintaining your WordPress site completely backed up and updated is vitally important for WordPress security. Screenshot image: WPTrainMe.com)
Again, we cannot stress enough how important maintaining your WP website or blog backed up and updated is. WP 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 WordPress maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website is the next most important thing you must 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 plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Back Up, Copy And Protect Your WP Website With Backup Creator WordPress Plugin
Security Measure #3 – Do Not Use “Admin” As Your Username
the worldwide brute force botnet attack on WordPress sites was mostly an attempt to compromise website administrator panels and gain access to sites by exploiting sites with “admin” as their username.
For security reasons, don’t set up a WordPress site 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 this immediately.
For a tutorial for non-technical admin users on how to change your login username, go here: Changing Your Admin Username In WordPress
Security Measure #4 – Change Your Password
A “brute force” attack occurs when malicious software continually tries to guess the right combination of username and password characters that will give the hacker entry to your site.
Unless you put some measure in place to stop the brute-force attack from happening (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 really easy targets for hacking attacks. Make sure that you change your password to something containing at least eight or nine characters long, with upper and lowercase letters, and add a few “special” characters (e.g. %, $, @, etc).
Roboform is a password management tool that lets you create very secure passwords …
(Roboform is a password software that lets you generate strong login passwords)
We have created a simple tutorial for WordPress users that shows you how to change your login password here: What To Do If You Need To Change Passwords In WordPress
Security Measure #5 – Prevent The wp-config.php File From Being Visible
The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced WordPress options.
If hackers break into your site, they will normally try to access the 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 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 attacks and even being used as part of a bot net, therefore, prevent your wp-config.php file from being 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 Installation Files
Rename or delete the install.php, upgrade.php and readme.html files from your server.
These files are not required after installation and can be removed. If you don’t want to remove these files, then just rename them.
Security Measure #7 – Upgrade Your WordPress Site, Themes And Plugins To Their Latest Version
Hackers search for vulnerabilities they can exploit in older versions of WordPress, including out-of-date versions of themes and plugins.
Ensure that all of your WordPress application files, plugins, themes, etc. are always up to date.
Security Measure #8 – Disable Your Theme Editor
WordPress comes with a built-in editor that lets the site administrator edit plugin and theme code from the dashboard area.
In WordPress, you can access the WordPress Theme Editor by selecting Appearance > Editor from the dashboard menu …
(The WordPress theme editor is accessible using the WordPress dashboard menu)
The WordPress theme editor lets anyone accessing your blog’s admin see and make changes to your theme templates, and cause mayhem 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 Site’s Uploads Directory
The WordPress “uploads” directory stores all the media that gets uploaded to your blog.
By default, this folder is visible to online users. All a person needs to do to view all of the contents stored in the “uploads” folder is visit the directory using their browser …
(WordPress uploads folder)
If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers, anyone could upload unauthorized file types to 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 get professional assistance if you are unsure about what to do.
Security Measure #10 – Install Security Plugins
There are some great security plugins for WordPress available that specifically address many common security issues faced by WordPress site owners, such as preventing hackers from accessing 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 security 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 – WP security software solution)
SecureScanPro is easy to install and easy to use, and takes care of most of the security issues that WordPress users need to address.
Another great security plugin you may want to consider using is BlogDefender.
This product is a suite of WordPress security video tutorials, WordPress plugins and tools, plus WordPress security documentation in PDF and DOC formats.
BlogDefender scans you web site for security vulnerabilities …
WordPress is a very secure platform, but neglecting essential maintenance tasks like keeping your WP installation, plugins and WordPress themes updated to their latest versions, tightening file and data protection 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, you cannot ignore the importance of securing your sites.
As a final reminder, below is the advice given by an expert on web security to all WordPress users following the global 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, 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 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 when we publish new tips on WordPress security and tutorials about new security plugins.
"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)