WordPress powers millions of websites and blogs worldwide, making it an easy target for attempted hacker attacks.
In April 2013, WordPress installations around the world were subjected to mass brute force attacks.
These attacks were caused by networks of infected computers programmed to attack other computers (called “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’s administration login username and password. To attempt this, hackers use software tools that automatically tries to guess hundreds of possible login combinations in minutes.
If you’re using weak login details, your website can be an easy target for hackers.
This is called a “brute force” login attack.
What Is A Botnet?
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 private computers that have been compromised and infected with malicious code, which are then controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge or awareness.
Botnets are regularly used to send out mass spam emails.
The screenshot below was 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 globe since 2009. Image: SecureList.com)
These botnet attacks were well organized and highly distributed. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress user admin areas. The worldwide brute force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked every day.
News of this brute-force attack was reported by all the major webhosting companies, as well as the leading technology media publications, such as TechNews Daily, Forbes, Tech Crunch, BBC News, PC Magazine, and even on the official US Department of Homeland Security website …
(Powering millions of websites worldwide makes WordPress an obvious target for malicious attempts by hackers)
Does This Mean WordPress Is Not Secure And We Should Stop Using It?
No. In fact, there are many good reasons why you should continue using WordPress if you are concerned about website security.
To learn why WordPress is a secure web platform, see this article: Is WordPress Secure? What Every Business Owner Needs To Know About WordPress Security
It’s important to note that, in the case of April 2013 large-scale brute-force attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using 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 Being Brute-Force Attacked – Ten Security Points
You may think that the information in your website has no significant value to hackers, but the reality is that to a hacker, every website is an opportunity to profit or benefit at your expense.
If a hacker can exploit a vulnerability that allows them to take over your site, the site can then be used as a “bot” to attack other valued websites.
Additional undesirable consequences of having your website hacked and your site security compromised include being blacklisted by search engines, having spammy links advertising things like online meds, porn, etc. inserted in your content and meta data, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasties.
The reality is that hackers are most likely scouring for security weaknesses and trying to hack into your website right now. Whether they can be successful or not, will depend on how hard or easy you will make things for them to keep trying until they either can work out how to break in, or are forced to give up and go look for a less protected 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 scan …
You will see that the check returns a number of results and details about your website setup …
(WP security scan results. Image source: Hackertarget.com)
It should be obvious after using the tool shown above that if you are able to see all of this information about your WordPress site, so can hackers.
(Screenshot source: BlogDefender.com)
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 on your server are all potentially useful information to hackers, as these can inform them about any potential security weaknesses, especially in older versions.
If your website runs on WordPress and you’re not preventive steps to harden 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 installations worldwide!
Whenever a site is compromised, website owners will find themselves “locked out” of their own site, or notice that their files have been altered or even that their content has been completely wiped out. Often, sites will become infected with malicious scripts or viruses without the owner even being aware of it.
To help avoid the heartache and frustration that comes with discovering that your website or blog has been hacked into, below are ten essential and effective security measures that will help to prevent your WordPress site from brute force botnet attacks.
Note: A few of the recommended steps below need some technical skills 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 search for a professional WordPress technical provider in our WordPress Services Directory.
Security Measure #1 – Get In Touch With Your Webhosting Provider
Contact your web host and ask them exactly what precautions have been put in place to help prevent your site from being attacked, and what they do to make sure that your WordPress sites get regularly backed up.
Make sure that your hosting service is regularly backing up your sites and that, if disaster strikes, you can quickly and easily recover your site.
Security Measure #2 – Perform Regular WordPress Backups And Keep Your Site Frequently Updated
You should never rely only on your webhosting company for your 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 religiously performing a complete site maintenance routine frequently (e.g. weekly, monthly, etc …)
A proper WordPress maintenance routine ensures that:
- All unnecessary files and data are removed,
- All WordPress files and data are free of errors, optimized and backed up,
- All software, themes and plugins are up-to-date,
- etc …
A proper WordPress maintenance routine looks like this …
(Maintaining your WordPress web site backed up and updated is vitally important for WordPress security. Screenshot source: WPTrainMe.com)
Again, we cannot stress enough how important maintaining your WP website frequently backed up and updated is. WP site 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 site maintenance yourself, get someone else 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 still have a pulse!
If you don’t want to perform manual backups, there are many free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Backup, Duplicate & Keep Your WP Website Protected With Backup Creator Plugin For WordPress
Security Measure #3 – Do Not Use “Admin” As A Username
The large scale brute-force botnet attack on WordPress sites was mostly attempting to compromise site administrator panels and gain access to the site by exploiting WordPress sites using “admin” as the account name.
For reasons of website security, never set up sites with the username admin. This is the first area of potential vulnerability hackers will test. If your site’s username is admin, then change this immediately.
For a tutorial that shows you how to change your admin username, go here: Changing Your Admin User Name In WordPress To A More Secure User Name
Security Measure #4 – Choose Strong Passwords
A “brute force” attack occurs when malicious software persistently hits a username and password field with different strings of characters in an attempt to guess the right 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 simple and effective suggestions for doing this), the “bot” will just continue to attack your site until it eventually works out the combination.
Weak passwords, therefore, make really easy targets for brute-force attacks. Make sure that you change your password to something that is at least eight characters long, and that includes upper and lowercase letters, combined with a few “special” characters (%^#$@&*).
Roboform is a password software that lets you easily create different unbreakable passwords …
(Roboform is a password program you can use to create different secure passwords)
For a step-by-step tutorial created especially for WP admin users on how to change your password, go here: Changing 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 WordPress options.
If hackers break into your site, 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 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 people finding 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 – Rename Or Delete Unnecessary Website Installation Files
Rename or delete your install.php, upgrade.php and readme.html files.
These files can be removed after installation. If you don’t want to remove these files, just rename them.
Security Measure #7 – Keep Your WordPress Installation, Plugins And Themes Up-To-Date
Hackers search for vulnerabilities in previous versions of WordPress that can be exploited, including outdated versions of WP themes and plugins.
Make sure to keep your installation files, plugins, themes, etc. up-to-date.
Security Measure #8 – Disable The Theme Editor
WordPress installations come with a built-in editor that allows you to edit theme and plugin files from the dashboard.
In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor in the main menu …
(The WordPress theme editor can be accessed using the main menu)
This allows anyone accessing your site’s admin to see and make changes to your theme template files, and create mayhem on your site.
To prevent unauthorized people from accessing your WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.
Security Measure #9 – Remove Access To Your Site’s Uploads Folder
The WordPress “uploads” folder stores all the media that gets uploaded to your website.
Normally, this folder is visible to anyone online. All someone has to do to see the contents in your site’s “uploads” directory is visit your directory using a web browser …
(WordPress has an uploads directory where your media files are stored)
If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers, this could 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, 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 most common security issues faced by WordPress site owners, such as preventing hackers from gaining access to vital areas of your site, protecting your website from brute-force attacks, 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 issues that could lead to hackers accessing your website files and damaging your site is SecureScanPro.
(SecureScanPro – WordPress security software)
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 plugin you may want to consider using is BlogDefender.
Blog Defender Security Plugin
Blog Defender is a package of WordPress security video tutorials, plugins and tools, plus WordPress security documentation in PDF and DOC formats.
BlogDefender scans you web site for security holes …
WordPress is a secure platform, but neglecting basic maintenance tasks like making sure that your WP core files, WordPress plugins and WP themes are kept up-to-date, tightening file and data protection and taking other necessary precautions can have disastrous consequences.
No matter what kind of business you run or plan to run online and how small you think your web presence is, web security is something you cannot afford to ignore.
As a final reminder, below is the advice given by an expert on web security to all WordPress users following the worldwide 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 has provided you with the initial guidelines and help you need 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 service provider in our WordPress Services Directory.
We also recommend subscribing to WPCompendium.org to be notified when we publish new articles and tutorials on WordPress security and tutorials about WordPress security plugins.
"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now