How To Protect Your WordPress Site From A Brute-Force Attack

Learn how to protect your WordPress site from being brute-force attacked, or having its security compromised by hackers or bots.

WP SecurityWordPress powers millions of websites around the world, which makes it a target for hacker attacks.

In 2013 a worldwide brute-force attack hit WordPress installations across almost every host server in existence around the world.

These attacks were caused by botnets (infected computer networks programmed to attack other vulnerable computers).

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 use to try and break into a WordPress site is by trying to guess the site admin’s login username and password. To achieve this, hackers use software programs and scripts that can work through hundreds of possible login combinations in minutes.

If you’re using obvious usernames and passwords, your website could be easily hacked by the software’s repeated attempts to work out your site’s login details.

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.

(Source: Wikipedia)

A “Botnet” is a network of computers that have been compromised and infected with malicious scripts or software, which are then controlled remotely as a group, typically without the unsuspecting computer owners even being aware that this is going on inside their machine.

Botnets are typically used to send out mass spam emails from the infected computers of compromised user accounts.

Below is a screenshot taken from an internet security monitoring site showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the globe since 2009 …

The Zeus botnet has been actively infecting computer networks all around the globe since 2009.

(ZeuS is a botnet that has been actively infecting computer networks all around the globe since 2009. Image source: SecureList.com)

The ongoing botnet attacks were highly distributed and well organized. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack alone, when millions of attempts to force their way into WordPress users admin areas occurred. The mass brute force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked per day.

Coverage of this worldwide brute force botnet attack was reported by all of the major webhosting companies, as well as the leading technology publications, such as Forbes, TechNews Daily, Tech Crunch, BBC News, PC Magazine, 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 hacker attacks

(WordPress often is targeted by hackers)

Does This Mean WordPress Is Not Secure And We Should Stop Using It?

No. In fact, there are many great reasons why you should choose WordPress if you are concerned about the security of your online business.

We explain what makes WordPress a very secure web platform in this article: Can You Build A Secure Business Online Using WordPress? What Every Business Owner Needs To Know About WordPress

Important Info

It’s important to understand that, in the case of April 2013 brute force attack described above, there was actually no WordPress vulnerability 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.

(MikeLittle.org)

Preventing Your WordPress Website From Brute-Force Attacks – 10 Security Points

You may think that your website or blog has nothing to offer to hackers, but the reality is that every website is valuable to a malicious user.

If a malicious user can access and gain access and control of your web site, the site can then be used as part of a larger network of “bots” to target larger and more highly-valued websites.

Additional undesirable consequences of having your site hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links advertising things like online meds, porn, etc. inserted into your content and page title and descriptions, malicious redirects to phishing sites or other websites, drive-by downloads (adding malicious software on your visitors’ computers), and lots of other nasties.

The truth is that software-driven bots are probably trying to hack into your site right now. Whether they can break in or not, will depend on how hard you will make it for them to continue persisting until they discover a way to get access, or give up and decide to look for a more vulnerable target.

How Much Information Are You Broadcasting To Hackers About Your Site?

If you visit Hackertarget.com and run your website through their WordPress security check …

WP Security Scan(Hackertarget – WP Security Scan Screenshot: Hackertarget.com)

You will see that the check will display various results and details about your site setup …

Hackertarget - WP Security Scan

(WP security check results. Product image source: Hackertarget.com)

It should be obvious after using the scanning tool that if you are able to access all of this information about your website, so can hackers.

WP Security Scan(Product image source: BlogDefender site)

Being able 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 can all be valuable information to hackers, as this informs them about potentially exploitable holes or weaknesses, especially where site owners haven’t updated their files.

If your website runs on WordPress and you’re not preventive steps to bullet-proof your site, it’s practically guaranteed that, at some point in time, someone will attempt to hack your installation, because these brute force attacks are systematically targeting WordPress installations around the world!

Typically, when a site is hacked, website owners can find themselves completely “locked out” of their own site, or notice that their files have been modified or even entirely wiped out. Typically, most compromised sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To help avoid the heartache of having your site being hacked into, below are 10 essential and effective security measures that will help to prevent your WordPress site from being brute force attacked.

Note

Note: A few of the steps listed below require some technical understanding of how to modify core WordPress and 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 service provider for assistance.

***

Security Measure #1 – Contact Your Webhosting Provider

Get in touch with your webhosting company and ask them what systems have been put into place to protect your site from being attacked, and what they are doing to ensure that your files and data are regularly being backed up.

Check that your webhosting service backs up your sites 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 Site Frequently Updated

Never rely just on your hosting provider 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 WordPress site maintenance routine frequently (e.g. weekly, fortnightly, etc …)

A proper 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 WordPress plugins, themes and software components are up-to-date,
  • etc …

A proper WP site maintenance routine looks like this …

Maintaining your WP site completely backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website or blog fully backed up and up-to-date is vitally important for WordPress security. Image source: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WordPress installation completely backed up and up-to-date is. 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 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 must do after making sure that your heart is still beating!

If you don’t want to perform manual backups, there are many free and paid plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Backup, Clone & Keep Your WP Sites Protected With Backup Creator WordPress Plugin

Security Measure #3 – Do Not Use “Admin” As Your Admin Username

The large scale brute-force botnet attack on WordPress sites was mostly attempting to compromise website administrator panels and gain access to sites by exploiting WordPress installations using “admin” as their account name.

For reasons of website security, avoid setting up sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your blog’s user name is “admin”, you will need to change this immediately.

We have created a simple step-by-step tutorial on how to change your username here: How To Change Your WP Username From Admin To Another Username

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when malicious software continually hits a username and password field with different strings of characters 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 continue attacking your site until it eventually gets access.

Passwords that are easy to guess, therefore, become very easy targets for hacking attacks. Make sure that you change your password combination to something that contains at least 8 or 9 characters long, with both upper and lowercase letters, and “special” characters (%^#$@&*).

Useful Tip

You can use a password software tool like Roboform to generate hard-to-crack passwords …

Roboform is a password management tool you can use to help you generate different strong login passwords(You can use a password program like Roboform to generate unbreakable passwords)

For a simple tutorial created especially for admin users on how to change your admin password, go here: Changing Passwords In WordPress

Security Measure #5 – Prevent Access To Your 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 WordPress options.

wp-config.php

(wp-config.php file)

If hackers break into your WordPress website, they will normally search 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 someone 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 people from being able to easily get to 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 Blog 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, then just rename them.

Security Measure #7 – Keep Your WordPress Installation, Themes & Plugins Up-To-Date

Hackers look for vulnerabilities they can exploit in outdated versions of WordPress, including out-of-date versions of themes and plugins.

Ensure that all of your WordPress files, themes, plugins, etc. are always up to date.

Security Measure #8 – Disable The WordPress Theme Editor

WordPress comes with a built-in editor feature that allows the site administrator to edit plugin and theme code from the dashboard.

In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor in your main menu …

WP Theme Editor Menu

(The WordPress theme editor is accessible via the WordPress dashboard menu)

This means that anyone logging into your site can see and modify your WP theme files, and create havoc on your site.

To prevent people from being able to access your WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Protect Your WordPress Uploads Folder

The “uploads” directory stores all the media files that get uploaded to your site.

Normally, this folder is visible to all users online. All someone has to do to see all of the contents in the “uploads” folder is navigate to your directory using a web browser …

(WordPress uploads directory)

(WordPress uploads folder)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers, this could threaten 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 ask for assistance from someone with experience if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

A number of great security plugins for WordPress are available that will address common security issues WordPress site owners face, such as preventing unauthorized users from gaining access to vital information about 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 plugin that does a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - security software solution for WordPress

(SecureScanPro – security software solution for WordPress)

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 look at using is BlogDefender.

Blog Defender Security Product Suite For WordPress Sites

Blog Defender WordPress Security Plugin(Blog Defender)

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 WordPress installation for security holes …

Blog Defender Security SuiteAnd then shows you how to fix these quickly and easily …

Blog Defender Security Plugin For WordPress BlogsIf you don’t want to buy a premium security plugin like SecureScanPro or BlogDefender, then use various free WP plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting simple maintenance tasks like updating your WordPress software, WP plugins and themes, tightening file and data security and taking other necessary precautions can expose your website to malicious by hackers and bots.

No matter what type 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 site.

As one last reminder of the importance of website security, below is the advice given by a website security expert to all WordPress users after 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, WordPress security is very important if you run a WordPress site. Hopefully, the above article has shown you what to do to keep your WordPress site protected from brute force attacks. If you need any further help or assistance with WordPress security, please seek help from a WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

Also, please subscribe to WPCompendium.org to receive notifications via email when we publish new articles on WordPress security and reviews of new 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

***