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.

WordPress SecurityWordPress often comes under attack by hackers.

In 2013, WordPress installations around the world were subjected to a worldwide brute force attack.

These attacks were caused by computers infected with malware and programmed to attack other vulnerable sites (botnets).

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

What Are 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 a WordPress site is by trying to guess the site’s administration login username and password. To attempt this, hackers use software tools that can work through hundreds of login permutations in minutes.

If you’re using easy-to-guess usernames and predictable passwords, your site could be an easy target for hacking attempts.

This is called a “brute force” login 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.

(Source: Wikipedia/botnet)

”Botnets” are networks of computers that have been compromised and infected with malicious software, which can then be controlled remotely as a group, often without the computer owners even being aware that this is taking place.

Botnets are typically used to blast out 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 compromising computer networks all around the world since 2009 …

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

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

The ongoing botnet attacks on WordPress are well organized and highly distributed. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress site admin areas. The worldwide attack then continued, with over 30,000 WordPress blogs being hacked each day.

Coverage of this large-scale brute-force botnet attack was widely reported in all of the major webhosting companies, as well as the leading technology media publications, such as TechNews Daily, Forbes, PC Magazine, Tech Crunch, BBC News, and even on the official US Department of Homeland Security website …

Being the world's most popular CMS makes WordPress a target for malicious attempts by hackers

(WordPress powers millions of websites around the world, which makes it an obvious target for hacking)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are lots of great 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 platform for websites in this article: Why WordPress Is A Secure Platform For Websites –

Important Info

It’s important to understand that, in the case of the large-scale brute force botnet attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using applications like Joomla).

Mike Little, one of the co-founders of WordPress with Matt Mullenweg, made this comment about the botnet 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)

How To Protect Your WordPress Website From Brute-Force Attacks – Ten Security Checks

You may think that your website is of little value to hackers, but the reality is that all websites have value to a malicious user.

If hackers can find a security vulnerability in your system that lets them remotely control your site, the web site can then be used as a “bot” in a planned cyber attack against larger and more valuable websites.

Additional undesirable impacts of being hacked include being blacklisted by Google, having spammy links advertising things like gambling, cheap offers on brand names, etc. in your content, redirecting visitors to phishing sites, drive-by downloads (adding malicious software on your visitors’ computers), and many other nasty things.

The harsh reality is that software-driven bots are very likely trying to hack into your site while you are reading this article at this very moment. Whether they can get in will depend on how difficult or easy you can make it for hackers and bots to continue trying until they work out a way to get access, or give up and go look for a less protected target.

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

If you visit Hackertarget.com and run your site through their WordPress security scan …

Website Security Scan(Hackertarget – WordPress Security Check Image source: Hackertarget.com)

You will see that the check will return a number of results and information about your site …

Website Security Check

(WordPress security check results. Image source: Hackertarget.com)

It should be obvious after using this scanning tool that if you are able to see all of this information, then so can hackers.

WP Security Scan(Product image source: Blog Defender)

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 in your site can all be potentially valuable information to hackers, as this informs them about any potential security weaknesses, especially where the owners haven’t updated their sites.

If your website is powered by WordPress and you’re not preventive steps to toughen up your site, we can practically guarantee that, at some point, someone will attempt to hack your installation, because these brute-force attacks are systematically targeting WordPress sites worldwide!

When a site is broken into, website owners will find themselves completely “locked out” of their own site, or notice that their content has been altered 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 discovering that your website has been hacked into, we have listed below ten essential and effective security measures that will help to prevent your WordPress site from being brute force attacked.

Note

Note: A few of the recommended measures below need 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 search for a WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Get In Touch With Your Hosting Company

Get in touch with your webhosting provider and ask them exactly what security precautions have been put in place to protect your site from brute-force attacks, and what they do to ensure that your site files get regularly backed up.

Check that your hosting provider is regularly backing up your server files and that, if anything happens, you can quickly and easily get back your files.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Site Regularly Up-To-Date

Never rely only on your web host for your site backups. Instead, learn how to maintain your WordPress site or pay someone to get this done for you and develop a habit of performing a full WordPress site maintenance routine frequently (e.g. daily, weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

  • All unnecessary files and data are removed,
  • All files and data are free of errors, optimized and backed up,
  • All WordPress themes, plugins and software components are up-to-date,
  • etc …

A proper WP site maintenance routine looks like this …

Maintaining your WP site fully backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website backed up and updated is vitally important for WordPress security. Source: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WordPress site regularly backed up and updated is. WP 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 do not want to learn how to do WP 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 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 plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Back Up, Clone And Protect Your WP Web Site With Backup Creator Plugin For WP

Security Measure #3 – Make Sure That Your Username Is Not “Admin”

The mass brute force attack on WordPress sites was mostly attempting to compromise website administrator panels by exploiting sites with “admin” as the account name.

For reasons of website security, never install a WordPress site with the username “admin”. This is the first area hackers will test. If your site’s username is admin, you should change this immediately.

For a step-by-step tutorial created especially for admin users that shows you how to change your admin username, go here: Changing Your WordPress Admin User Name

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when a malicious script continually and persistently tries to guess the right password and username character string that will give the hacker entry to your website.

Unless some measure is put into place to block the brute-force attack from happening (see further below for a couple of simple and effective ways to do this), the “bot” will just continue attacking your site until it eventually “cracks” the code.

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

Practical Tip

You can use a password software tool like Roboform to create unguessable passwords …

You can use a password management software tool like Roboform to generate strong login passwords(You can use a password tool like Roboform to create really secure passwords)

For a simple tutorial created especially for WordPress users that shows you how to change your login password, go here: Changing Passwords

Security Measure #5 – Protect 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 file

(wp-config.php)

If hackers break into your website, they will look for the 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 attacks and even being used as part of a bot net, therefore, you must 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

Delete or rename the install.php, upgrade.php and readme.html files from your server.

These files are not required after installation. If you don’t want to delete these files, just rename them.

Security Measure #7 – Keep Your WordPress Site, Plugins And Themes Up-To-Date

Hackers look for vulnerabilities in outdated versions of WordPress that can be exploited, including out-of-date versions of plugins and themes.

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

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress installations come with a built-in editor feature that lets the site administrator edit plugin and theme files from the dashboard area.

You can access your WordPress Theme Editor by selecting Appearance > Editor in the admin menu …

WordPress Theme Editor Menu

(Accessing the WordPress theme editor using the dashboard menu)

This means that anyone logging into your blog’s admin can view and make changes to your WordPress theme template files, and cause mayhem on your site.

If you want to prevent people from accessing 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 – Prevent Access To The WordPress Uploads Directory

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

Normally, this folder is visible to anyone online. All someone has to do to see all of the contents in your site’s “uploads” folder is navigate to your directory using their browser …

(WordPress uploads folder)

(WordPress uploads folder)

If any directories in your website have vulnerabilities that can be exploited by malicious users, someone could upload unauthorized file types or compromise the security of your website.

Protecting your directories will prevent unauthorized people from viewing 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 an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to ask for assistance from someone with experience if you are not sure about what to do.

Security Measure #10 – Use Security Plugins

There are several WordPress security plugins available that specifically address many common security issues WordPress site owners face, such as preventing hackers from accessing your site, protecting your website from botnets, preventing unauthorized file uploads, etc.

Most WordPress plugins address some but not all areas of WordPress security. One plugin that does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your website files and causing damage to your site is SecureScanPro.

SecureScanPro - WP security plugin

(SecureScanPro – WP total security plugin)

SecureScanPro is easy to install and easy to use, and fixes most of the security issues that WordPress users need to address.

Another security plugin you may want to consider using is BlogDefender.

Blog Defender WordPress Security Plugin

Blog Defender Security Product Suite For WordPress Sites(Blog Defender)

This product is a package of WordPress security video tutorials, plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender shows you where the security holes in your website are …

Blog DefenderAnd then shows you how to easily fix these …

Blog DefenderIf you don’t want to purchase a premium security plugin like SecureScanPro or BlogDefender, you can use various free plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting basic maintenance tasks like updating your WordPress installation, plugins and themes, tightening file and data security and taking other necessary precautions can expose your website to attacks 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 cannot afford to ignore the importance of securing your web sites.

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 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, website security is of the utmost importance if you run a WordPress site. Hopefully, the above information 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 via email when we publish new information on WordPress security and reviews of new 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)

***