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 SecurityBeing the world’s most popular CMS makes WordPress a frequent target for hacker attacks.

In early 2013, WordPress installations around the world were subjected to mass brute-force attacks.

These attacks were caused by infected computer networks programmed to attack other vulnerable computers, 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 ways hackers try to break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. This can be achieved with software tools that automatically tries to guess hundreds of login permutations in minutes.

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

This is called a “brute force” attack.

Botnets – What Are They?

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 infected with malicious software, which can then be controlled remotely as a group, often without the computer owners even being aware of this.

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

The screenshot below was taken from an internet security monitoring site showing the locations of the command centers of a botnet that has been actively infecting computer networks all around the globe since 2009 called “Zeus” …

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

(The Zeus botnet has been actively infecting computer networks all around the world since 2009. Image source: SecureList.com)

The ongoing botnet attacks were well organized and highly distributed. 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 users administration areas. The large-scale attacks then continued, with over 30,000 WordPress blogs being hacked every day.

Coverage of the April 2013 brute force botnet attack was reported by all of the major webhosting companiesand leading technology publications, such as Forbes, TechNews Daily, PC Magazine, BBC News, Tech Crunch, and even on the official US Department of Homeland Security website …

WordPress often is targeted by hackers, due to its global popularity

(WordPress is often the target of malicious attacks by hackers, due to its popularity)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are many great reasons why you should use WordPress if you are concerned about website security.

We explain what makes WordPress a very secure platform for websites in this article: Can You Build A Secure Business Online Using WordPress?

Important

It’s important to note that, in the case of the worldwide brute force botnet attack described above, there was no WordPress vulnerability being exploited (the same script was also attacking sites built using other CMS applications like Joomla).

Mike Little, one of the co-founders 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.

(MikeLittle.org)

Preventing Your WordPress Website From Brute Force Attacks – 10 Security Measures

You may think that the information in your website has no value to hackers, but the reality is that all websites have value to a malicious user.

If someone can hack and gain remote access and control of your web site, that website can then be employed to target more highly-valued web sites.

Additional undesirable results of having your site hacked include being blacklisted by Google, having stealthy spam links promoting things like casinos, porn, etc. inserted in your content and page title and descriptions, malicious redirects to phishing sites, drive-by downloads (adding malicious scripts on your visitors’ computers), and many other nasty things.

The harsh reality is that brute-force software bots are trying to hack into your blog as you are reading this article right now. Whether they will successfully break in will depend on how hard you have made it for hackers to continue persisting until they can discover a way to break in, or are forced to decide to look for a less secure target.

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

Do you own a WordPress site? If so, visit Hackertarget.com and run your site through their WordPress security check …

WP Security Check(Hackertarget – WP Security Scan Product image: Hackertarget.com)

You will see that the test returns various results and details about your website setup …

Hackertarget - Website Security Check

(WordPress security scan results. Screenshot source: Hackertarget.com)

It should be obvious after using the tool shown above that if you can freely access all of this information, so can hackers.

WP Security Check(Product image: BlogDefender website)

The ability to see which 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 can be useful information to hackers, as this can inform them about potential security vulnerabilities, especially in older versions.

If your website is powered by WordPress and you’re not proactive steps to bullet-proof your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your site, because these brute force attacks are systematically targeting WordPress sites all the world!

When a website is broken into, blog owners can find themselves completely “locked out” of their own site, or notice that their files have been interfered with or even that their content has been entirely wiped out. Typically, sites will be infected with malicious software without the owner’s knowledge or awareness.

To help avoid the heartache of having your web site being 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 botnet attacks.

Useful Info

Note: A few of the recommended steps shown below require some technical skills to modify core WordPress and/or server files. If you are not technical-minded, or don’t want to mess around with code on your site, 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 Host

Contact your host and ask them what measures have been put in place to help prevent your site from being attacked, and what they are doing to ensure that your files and data are being backed up.

Make sure that your host backs up your sites and that, if anything should happen, you can quickly and easily recover your files and data.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Or Blog Regularly Maintained

Never rely just on your webhosting company for site backups. Instead, learn how to manage your WordPress site or get this service done for you and develop a habit of performing a complete WordPress site maintenance routine on a regular basis (e.g. weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

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

A complete WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WordPress installation regularly backed up and updated. WP site maintenance is not hard or time-consuming, but it must be done to ensure the security of your website. 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 site is the second most important thing you must 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. Learn about a WordPress backup plugin that can fully automate your site backups here: Back Up, Clone & Protect Your WordPress Site With Backup Creator WordPress Plugin

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

The large scale brute-force attack on WordPress is mostly an attempt to compromise site administrator panels by exploiting WordPress installations using “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 username is “admin”, you will should change it immediately.

We have created a step-by-step tutorial that shows you how to change your login username here: Changing Your WP Username From Admin To Another Username

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when malicious software continually hits a login or password field with different strings of characters in an attempt to guess the right login combination that will unlock your site.

Unless some measure is put into place to stop the brute force attack (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just keep attacking your site until it eventually breaks into your admin area.

Weak passwords, therefore, make really easy targets for attacks. Make sure that you change your password combination to something that contains at least eight characters long, with both upper and lowercase letters, and add a few “special” characters (%^#$@&*).

Practical Tip

Roboform is a password software that lets you easily generate strong login passwords …

You can use a password tool like Roboform to help you generate really secure passwords(Roboform is a password program you can use to create secure passwords)

We have created a tutorial created especially for WP 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 – Protect Your WP Config 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)

If a hacker breaks into your WordPress website, they will normally search 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 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 being attacked and even being used as part of a bot net, therefore, prevent people from accessing 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 your install.php, upgrade.php and readme.html files.

These files can be deleted after installation. If you don’t want to delete these files, then just rename them.

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

Hackers are always on the lookout for vulnerabilities in earlier versions of WordPress that can be exploited, including out-of-date versions of WordPress themes and plugins.

Make sure to keep your WordPress installation files, themes, plugins, etc. up-to-date.

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WP Theme Editor Menu

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

This allows anyone accessing your blog to view and make changes to your WordPress theme templates, or create havoc on your site.

If you want to prevent unauthorized 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 – Protect Your WordPress Uploads Directory

The “uploads” folder contains all the media that gets uploaded to your WordPress site.

Normally, this folder is visible to online users. All someone has to do to view the contents stored in the “uploads” directory is visit your directory using a web browser …

(WordPress uploads directory)

(WordPress has an uploads directory where media content is stored)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by malicious users, this could compromise the security of your website.

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 file with nothing in it called “index.php”) to your uploads directory, and so on. Again, it’s best to consult a professional if you are unsure about what to do.

Security Measure #10 – Install WordPress Security Plugins

There are a number of great security plugins for WordPress available that specifically address common security issues faced by WordPress site owners, such as preventing unauthorized users from accessing vital areas of your site, protecting your site from brute-force attacks, preventing injections of code into files, etc.

Most 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 website files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - security software solution for WordPress

(SecureScanPro – total security plugin 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 security plugin you may want to consider using is BlogDefender.

Blog Defender Security Product Suite For WordPress Websites

Blog Defender WordPress Security Plugin(Blog Defender)

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

BlogDefender scans you WordPress installation for potential security holes …

Blog DefenderAnd then shows you how to quickly fix these …

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

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting basic maintenance tasks like ensuring that your WordPress installation, WP plugins and WordPress themes are kept up-to-date, tightening file and data security and taking other necessary precautions can expose your website to attacks 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, website security is something you simply cannot afford to ignore.

As a final reminder, below is the advice given by a website security expert to all WordPress users after the global 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 given you the initial steps you need to take 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 professional WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

Also, do yourself a favor and subscribe to WPCompendium.org to receive notifications whenever we publish new information on WordPress security and reviews of new security plugins.

***

"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

***

Originally published as How To Protect Your WordPress Site From A Brute-Force Attack.