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 is often the target of malicious attacks by hackers, due to its popularity.

In April 2013, WordPress installations around the world were subjected to large-scale brute force attacks.

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

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

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 done with software programs and scripts that can guess hundreds of login permutations in minutes.

If you’re using easy-to-guess user names and predictable passwords, your website could be easily hacked by the malicious script’s repeated attempts to work out your site’s login details.

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.

(Source: Wikipedia.org)

”Botnets” are networks of computers that have been compromised and infected with malicious scripts or software code, which are then controlled remotely as a group, often without the computer owners even being aware that this is going on.

Botnets are regularly used to send mass spam emails from computers of unsuspecting users.

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 compromising computer networks all around the globe since 2009 called “Zeus” …

ZeuS is a botnet that has been actively compromising 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. Screenshot: SecureList.com)

These were highly distributed and well organized attacks. Over 90,000 IP addresses were identified by a number of hosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress user administration areas. The brute force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

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

Being the world's most used CMS makes WordPress a target for hackers

(Being the world’s most used content management system makes WordPress a target for attempted attacks by hackers)

Does This Mean We Should Stop Using WordPress?

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

We explain what makes WordPress a very secure platform for websites in this article: Concerned About WordPress Security? What Every Business Owner Needs To Know About WordPress

Useful Info

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

Mike Little, the co-founder of WordPress, said this 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)

Protecting Your WordPress Blog From Being Brute-Force Attacked – Ten Security Points

Every web site with a vulnerability presents an opportunity to hackers. A compromised website not only offers wannabe hackers opportunities to improve their hacking skills and win “respect” among their peers, but it can also serve as a resource for distributed denial of service attacks, spreading malware and participating in information theft.

If hackers can find a way to access and control your web site, your site can then be used to target larger and more highly-valued sites.

Additional undesirable results of having your website hacked include getting blacklisted by search engines, having stealthy spam links advertising things like online meds, cheap offers on brand names, etc. inserted into your content and page title and descriptions, redirecting visitors to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The harsh reality is that brute-force software bots are very likely scouring for weaknesses and trying to break into your blog as you are reading this page. Whether they can do this successfully or not, will depend on how difficult or easy you have made things for hackers to continue trying until they can either discover a way to break in, or are forced to give up and decide to look for an easier target.

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

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

Hackertarget - WordPress Security Check(WordPress Security Check Product image: Hackertarget.com)

You will see that the test returns a number of results and details about your website setup …

Hackertarget - Website Security Scan

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

It should be obvious after using this tool that if you are able to access all of this information, hackers can too.

Hackertarget - Website Security Check(Source: BlogDefender site)

Being able 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 valuable information to hackers, as this informs them about exploitable security weaknesses, especially in older versions.

If your site or blog runs on WordPress and you’re not taking 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 sites around the world!

Whenever a site gets broken into, webmasters can discover much to their dismay that they have been “locked out” of their own site, or notice that their content has been interfered with or that everything has been entirely wiped out. Often, sites will become infected with malicious scripts without the owner even being aware that this has happened.

To help avoid the heartache 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 being brute-force attacked.

Important

Note: Some of the measures shown below require some technical understanding of how to modify core WordPress or server files. If you have no web coding skills, or don’t want to mess around with code on your site, 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 Service

Contact your hosting company and ask them exactly what systems they have put in place to protect your site from brute force attacks, and what is done to make sure that your files and data get backed up.

Make sure that your webhosting provider is regularly backing up your server files and that, if anything happens, you can easily get back your files and data.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Or Blog Frequently Up-To-Date

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

A proper WordPress maintenance routine ensures that:

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

A proper WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP web site frequently backed up and up-to-date. WordPress maintenance is not hard 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 WordPress maintenance yourself, get someone else to do it but make sure it gets done. Backing up your website is the next most important thing you must do after making sure that you still have a pulse!

If you don’t want to back up your data manually, there are many plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Backup, Copy And Keep Your WP Web Sites Protected With Backup Creator WordPress Plugin

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

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

For reasons of website security, avoid installing WordPress sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your blog’s username is “admin”, then change this immediately.

We have created a detailed step-by-step tutorial created especially for non-technical admin users that shows you how to change your WordPress admin username here: Changing Your WordPress Admin User Name

Security Measure #4 – Use A Strong Password

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

Unless some measure is put into 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 keep attacking your site until it eventually works out the combination.

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

Practical Tip

Roboform is a password tool you can use to help you generate different secure login passwords …

Roboform is a password tool that lets you easily generate different secure passwords(Roboform is a password management tool you can use to create different secure login passwords)

For a tutorial on how to change your password, go here: What To Do If You Need To Reset Your WordPress Password

Security Measure #5 – Prevent Your wp-config.php File From Being Accessible

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 file

(wp-config.php file)

If hackers break into your website, they will search for your wp-config.php file, because this file contains your database information, 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.

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 accessed. 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 WP Installation Files

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

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, Plugins & Themes Up-To-Date

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

You can access your WordPress Theme Editor by selecting Appearance > Editor from the dashboard menu …

WordPress Theme Editor Menu

(The WordPress theme editor can be accessed via the admin menu)

This allows anyone accessing your site to view and modify your WordPress theme template files, and cause 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 Site’s Uploads Folder

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

By default, this folder is visible to anyone online. All someone has to do to view all of the contents stored in the “uploads” directory is visit the directory using their web browser …

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

(WordPress uploads directory)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, this could seriously threaten 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, uploading a blank index.php file (this is literally an empty file called “index.php”) to your uploads directory, and so on. Again, it’s best to seek professional help if you are not sure about what to do.

Security Measure #10 – WordPress Security Plugins

There are a number of great WordPress security plugins available that will address common security issues WordPress site owners face, such as preventing unauthorized users from accessing your site, protecting your files from botnets, 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 site files and causing damage to your site is SecureScanPro.

SecureScanPro - total security plugin for WordPress

(SecureScanPro – security software solution for WordPress)

SecureScanPro is easy to install and easy to use, and does a great job of addressing most of the security issues that WordPress users need to address.

Another security plugin you may want to look at using is BlogDefender.

Blog Defender Security Plugin For WordPress Websites & Blogs

Blog Defender(Blog Defender WordPress Security Suite)

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 vulnerabilities …

Blog Defender Security Product Suite For WordPressAnd then shows you how to easily fix these …

Blog DefenderIf you don’t want to purchase a 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 updating your WordPress software, WordPress plugins and themes, tightening file and data security and taking other necessary precautions can expose your site to attacks by hackers and bots.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, you cannot ignore the importance of website security.

As one last reminder of the importance of keeping your websites protected, below is the advice given by an expert on website security to all WordPress users after the worldwide 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, website security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article will help prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to receive notifications whenever we publish new information on WordPress security and tutorials about new WordPress security plugins and solutions.

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum

***