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 sites worldwide, which makes it an easy target for hacking attacks.

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

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

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

Brute Force Attacks – An Overview

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 methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site’s administration login username and password. This is achieved with scripts and software tools that automatically tries to guess hundreds of login combinations in minutes.

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

This is called a “brute force” login 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, which can then be controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge or awareness.

Botnets are typically used to blast mass spam emails.

Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of a botnet that has been actively compromising 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.

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

These were well organized and highly distributed attacks on WordPress. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack, when millions of attempts to force their way into WordPress site admin areas occurred. The worldwide brute-force attacks then continued, with over 30,000 WordPress sites and blogs being hacked every day.

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

WordPress often is targeted by hackers

(WordPress is frequently the target of malicious attempts by hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are many good reasons why you should use WordPress if you are concerned at all about the security of your online presence.

To learn what makes WordPress a very secure platform for websites, see this article: How Secure Is WordPress?

Info

It’s important to understand that, in the case of the mass brute force attack described above, was no specific vulnerability in WordPress 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, made the following comment 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 Blog From Brute-Force Attacks – Ten Security Points

You may think that your site has no significant value to hackers, but the reality is that to a hacker, every website is an opportunity to gain some benefit at your expense.

If a malicious user can find a way to break in and take over your site, the website can then be employed as a “bot” to attack larger and more valuable web sites.

Additional undesirable impacts of having your website hacked include being blacklisted by Google, having stealthy spam links advertising things like gambling, porn, etc. inserted into your content, malicious redirects to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasty things.

The truth is that software-driven bots are most likely searching for exploits and trying to break into your site while you are reading this article. Whether they can hack in or not, will depend on how challenging you have made things for hackers to continue trying until they either work out how to get access, or decide to look for a less secure target.

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

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

WP Security Check(WP Security Scan Source: Hackertarget.com)

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

WordPress Security Check

(Hackertarget – website security scan results. Source: Hackertarget.com)

It should be obvious after using the tool shown above that if you can see all of this information about your WordPress site, hackers can too.

Website Security Check(Product image: BlogDefender.com)

The ability 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 potentially valuable information to hackers, as these can inform them about potential vulnerabilities, especially in older versions.

If your site or blog runs on WordPress and you are not preventive steps to harden your site, we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these attacks are systematically hitting WordPress installations around the world!

When a site gets compromised, webmasters can find themselves completely “locked out” of their own site, or notice that their files have been interfered with or even entirely wiped out. Typically, most sites will be infected with malicious scripts without the owner’s knowledge or awareness.

To help avoid the heartache and aggravation of having your website or blog being hacked into, below are ten essential and effective security measures that will help to prevent your WordPress site from being attacked by brute-force botnets.

Disclaimer

Note: Some of the recommended steps below require some technical understanding of how 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 a professional WordPress service provider for help.

***

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

Get in touch with your hosting service and ask them exactly what security precautions are in place to help prevent your site from brute force attacks, and what is done to ensure that your site files get backed up.

It’s important to make sure that your hosting provider regularly backs up your sites and that, if disaster strikes, you can quickly and easily get your files back.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Or Blog Frequently Maintained

Never rely just on your webhosting provider for your site backups. Instead, learn how to manage 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. weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

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

A complete WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WordPress website or blog frequently backed up and up-to-date. 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 don’t want to learn how to do WordPress site maintenance yourself, get someone else to do it but make sure it gets done. Backing up your site is the next most important thing you should do after making sure that your heart is still beating!

If you don’t want to perform manual backups, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Back Up, Copy And Keep Your WordPress Web Site Protected With Backup Creator Plugin For WordPress

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

the worldwide brute-force attack on WordPress sites was mostly an attempt to compromise site administrator panels and gain access to sites by exploiting sites that used “admin” as their username.

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

For a detailed tutorial created especially for WordPress users on how to change your login username, go here: Changing Your Admin User Name In WordPress To A Different User Name

Security Measure #4 – Make Sure Your Password Is Secure

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

Unless you put some measure in place to stop the brute-force attack from happening (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 gets access.

Passwords that are easy to guess, therefore, become really easy targets for hackers. Make sure that you change your password to something containing at least 8 or 9 characters long, and that includes upper and lowercase letters, and “special” characters (e.g. %, $, @, etc).

Tip

Roboform is a password management program that lets you easily generate really secure passwords …

Roboform is a password management software that lets you easily create different strong login passwords(You can use a password management program like Roboform to help you generate unguessable passwords)

We have created a detailed tutorial for non-technical WordPress admin users on how to change your WordPress admin password here: Changing Passwords

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 options for WordPress.

WP Config file

(wp-config.php file)

If a hacker breaks into your website, they will look for the wp-config.php file, because this is the file that 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 being attacked and even being used as part of a bot net, therefore, prevent people viewing 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 Installation Files

Rename or delete your install.php, upgrade.php and readme.html files.

These files are not required after installation and can be removed. If you don’t want to remove these files, just rename them.

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

Hackers are always on the lookout for vulnerabilities in older versions of WordPress that can be exploited, including outdated versions of WP themes and plugins.

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

Security Measure #8 – Disable The Theme Editor

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

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

WP Theme Editor Menu

(Accessing the WordPress theme editor via the main menu)

This allows anyone accessing your blog’s admin area to view and modify your files, and create mayhem on your site.

To prevent 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 – Protect The Site’s Uploads Directory

The WordPress “uploads” directory stores all the media that gets uploaded to your website.

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

(WordPress uploads folder)

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

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, someone can upload unauthorized file types or compromise the security of your site.

Protecting your directories will prevent online users from viewing 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 blank file named “index.php”) to your uploads directory, and so on. Again, it’s best to hire a professional if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

There are a number of security plugins for WordPress available that specifically address most common security issues WordPress website owners face, such as preventing unauthorized users from gaining access to vital information about your site, protecting your files from malicious software, 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 causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WordPress security plugin

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

Blog Defender WordPress Security Solution

Blog Defender Security Suite For WordPress Blogs(Blog Defender Security Suite For WordPress)

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

BlogDefender scans you website for security vulnerabilities …

Blog Defender Security Plugin For WordPress SitesAnd then shows you how to fix these quickly, easily and inexpensively …

Blog DefenderIf you don’t want to purchase 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 very secure platform, but neglecting essential maintenance tasks like updating your WordPress software, plugins and WordPress themes, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

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

As one last reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users after the global 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, WordPress security is of the utmost importance 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 professional WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified via email whenever we publish new information on WordPress security and reviews of new security plugins.

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org

***