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 and blogs worldwide, making it an easy target for hacking.

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 malware and programmed to attack other sites, also commonly known as “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 will attempt to break into WordPress sites is by trying to guess the site admin’s login username and password. This is achieved 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 repeated attempts to work out your site’s login details.

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

”Botnets” are networks of computers that have been compromised and infected with malicious code or software, which can then be controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge or awareness.

Botnets are regularly used to send 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 infecting 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 well organized and highly distributed botnet attacks on WordPress sites. Over 90,000 IP addresses were identified by several hosting 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 then continued, with over 30,000 WordPress sites being hacked per day.

News of this 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, Tech Crunch, BBC News, PC Magazine, and even on the official website of the US Department of Homeland Security …

WordPress is the world's most used content management system which makes it a natural target for attempted hacker attacks

(WordPress often comes under attack by hackers, due to its global popularity)

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

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

We explain what makes WordPress a very secure platform for websites in this article: Is WordPress A Secure Website Platform?

Important

It’s important to understand that, in the case of the mass brute force botnet attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using other web 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)

Protecting Your WordPress Blog From Being Brute Force Attacked – 10 Security Checks

You may think that your site provides no value to hackers, but the reality is that all websites have some value to a malicious user.

If someone can exploit a vulnerability, that web site can then be employed as a “bot” in a planned cyber-attack against larger and more valuable web sites.

Additional undesirable consequences of having your website hacked and your site security compromised include getting blacklisted by search engines, having spammy links promoting things like gambling, porn, etc. in your content, redirecting visitors to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasty things.

The harsh reality is that malicious bots are very likely searching for security exploits and trying to break into your site as you are reading this article at this very moment. Whether they will break in successfully will depend on how challenging you will make it for hackers to continue trying until they can either work out how to get access, or decide to look for a more vulnerable target.

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

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

Hackertarget - WordPress Security Check(Website Security Check Screenshot source: Hackertarget.com)

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

WordPress Security Scan

(website security scan results. Image source: Hackertarget.com)

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

Hackertarget - WP Security Scan(Image source: BlogDefender.com)

Being able 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 can all be potentially useful information to hackers, as these can inform them about any security weaknesses, especially in older versions.

If your site or blog is driven by WordPress and you are not taking appropriate steps to bolster the security of your site, then we can practically guarantee that, at some point in time, someone will attempt to hack your website, because these brute force attacks are systematically hitting WordPress sites worldwide!

Typically, when a website or blog is hacked, site owners can find themselves “locked out” of their own site, or notice that their files have been vandalized or even that their content has been entirely wiped out. Often, most compromised sites will be infected with malicious software or viruses without the owner even being aware that a security breach has occurred.

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

Info

Note: A few of the recommended measures shown below need some technical skills to modify core WordPress or server files. If you have no technical skills, 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 – Contact Your Web Host

Contact your web host and ask them exactly what security precautions have been put in place to help prevent your site from brute-force attacks, and what is done to ensure that your server files and data get backed up.

Check that your hosting company backs up your sites and that, if disaster strikes, you can easily get your files back.

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

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

A full WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP site fully backed up and up-to-date. WordPress site maintenance is not hard or time-consuming, but it must be done to ensure the security of your website. If you do not want to learn how to do WordPress maintenance yourself, pay someone to do it but make sure it gets done. Backing up your website is the second most important thing you should do after making sure that you still have a pulse!

If you don’t want to back up your data manually, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Clone & Keep Your WP Site Protected With Backup Creator Plugin For WP

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

The mass brute-force botnet attack on WordPress sites was mostly an attempt to compromise site admin panels by exploiting installations using “admin” as their account name.

For website security reasons, avoid setting up WordPress sites with the username admin. This is the first area hackers will test. If your site’s username is admin, then change this immediately.

For a simple step-by-step tutorial created especially for WordPress users on how to change your username, go here: Changing Your WordPress Admin User Name To Another User Name

Security Measure #4 – Change Your Password

A “brute force” attack occurs when a malicious script continually and persistently hits a username and password field with different character strings trying to guess the right login combination that will unlock your site.

Unless you put some measure in place to block the brute-force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just continue attacking your site until it eventually works out the combination.

Passwords that are easy to guess, therefore, are really easy targets for attacks. Make sure that you change your password to a string that is at least 8 characters long, and that includes upper and lowercase letters, and add a few “special” characters (^%$#&@*).

Practical Tip

Roboform is a password management program you can use to generate secure passwords …

Roboform is a password program that lets you easily generate different  passwords(You can use a password management tool like Roboform to help you generate very secure passwords)

We have created a detailed step-by-step tutorial on how to change your admin password here: What To Do If You Need To Reset 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.

WordPress WP Config file

(WP Config file)

If hackers break into your site, they will try to access 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 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

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

You can remove these files after installation, as they are unnecessary. If you don’t want to delete these files, then just rename them.

Security Measure #7 – Update Your WordPress Site, Plugins And Themes

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

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

Security Measure #8 – Disable Your Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor using the dashboard menu)

The WordPress theme editor lets anyone accessing your blog view and make changes to all of your theme templates, and cause mayhem on your site.

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

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

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

(WordPress uploads directory)

(WordPress has an uploads directory where all of your media files are stored)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers, someone can upload unauthorized file types to 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 an empty file named “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 – Security Plugins

There are a number of great security plugins for WordPress available that will address most common security issues faced by WordPress site owners, such as preventing hackers from gaining access to vital information about your site, protecting your site from brute-force attacks, preventing unauthorized file uploads, etc.

Most WordPress plugins address some but not all areas of WordPress security. One security 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 - WP complete security software solution

(SecureScanPro – WP complete security software solution)

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 great plugin you may want to consider using is BlogDefender.

Blog Defender WordPress Security Solution

Blog Defender Security Plugin For WordPress(Blog Defender)

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

BlogDefender shows you where the security weaknesses in your WordPress site are …

Blog Defender WordPress Security Product SuiteAnd lets you fix these quickly and easily …

Blog Defender Security Solution For WordPress Web SitesIf you don’t want to invest in a security plugin like SecureScanPro or BlogDefender, then use various free WordPress 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, WordPress plugins and WordPress themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.

No matter what kind of business you run or plan to run online and how small you think your web presence is, securing your site is something you cannot afford to ignore.

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 following the mass brute-force attacks 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 very important if you run a WordPress site. Hopefully, the information in this article 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 consult a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

Also, do yourself a favor and subscribe to WPCompendium.org to receive notifications when we publish new information on WordPress security and reviews of 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

***