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 frequently comes under attack by hackers.

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

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

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

What Is A Brute Force Attack?

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 admin’s login username and password. This is done with software tools and scripts that can work through hundreds of login permutations in minutes.

If you’re using weak user names and predictable passwords, your site can be easily hacked by persistent attempts to guess your site’s login details.

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 infected with malicious scripts or software, which are then controlled remotely as a group, often without the computer owners’ knowledge.

Botnets are regularly used to blast mass spam emails.

The screenshot below was taken from an online security monitoring site showing the locations of the command centers of ZeuS – a botnet that has been actively compromising computer networks all around the world since 2009 …

ZeuS is a botnet that has been actively infecting computer networks all around the world since 2009.

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

The ongoing botnet attacks on WordPress sites 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 user admin areas. The worldwide brute force attacks continued after this, with over 30,000 WordPress sites being hacked each day.

Coverage of the April 2013 brute-force botnet attack was reported by all 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 is the world's most used CMS which makes it a target for attempted attacks by malicious users

(WordPress powers millions of sites around the world, making it an obvious target for hacking)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

We explain why WordPress is a secure web platform in this article: Is WordPress A Secure Platform For Websites?

Important Info

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

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

Preventing Your WordPress Site From Brute Force Attacks – Ten Security Points

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

If hackers can find a software vulnerability in your security that allows them to gain remote access and control of your web site, your web site can then be used to attack other valuable websites.

Additional undesirable impacts of being hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links advertising things like online meds, porn, etc. inserted in your content, malicious redirects to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasties.

The reality is that software-driven bots are most likely trying to hack into your website right now. Whether they can get into your site depends on how difficult you have made things for them to keep persisting until they find how to get access, or are forced to decide to look for an easier target.

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

Does your website run on WordPress? If so visit Hackertarget.com and run your site through their WordPress security scan …

Hackertarget - Website Security Check(Hackertarget – WP Security Check Product image source: Hackertarget.com)

You will see that the scan will yield various results and information about your WordPress site …

WP Security Scan

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

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

Hackertarget - Website Security Check(Product image: 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 on your server are all useful information to hackers, as these can inform them about any holes or weaknesses, especially where the owners haven’t updated their files.

If your website runs on WordPress and you are not taking steps to bullet-proof your site, then we can practically guarantee that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically hitting WordPress installations worldwide!

Typically, when a website gets hacked, webmasters will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been vandalized or even that their content has been entirely wiped out. Typically, most compromised sites will become infected with malicious software or viruses without the owner even being aware that this has taken place.

To help avoid the heartache and frustration that comes with discovering that your website has been hacked into, we have listed below 10 essential and effective security checks that will help to protect your WordPress site from being attacked by brute force botnet hacking attempts.

Info

Note: Some of the recommended steps below need some technical understanding of how to modify core WordPress and server files. If you have no web skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress service provider for assistance.

***

Security Measure #1 – Contact Your Host

Get in touch with your webhosting service provider and ask them what systems have been put into place to protect your site from being attacked, and what is done to make sure that your WordPress sites get regularly backed up.

It’s important to make sure that your hosting provider is regularly backing up your sites and that, if anything goes wrong, you can easily get your files back.

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

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

A proper WordPress maintenance routine ensures that:

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

A complete WP site maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP website or blog backed up and updated. WordPress site 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, pay someone to do it but make sure it gets done. Backing up your site is the second 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 a number of plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Backup, Copy & Protect Your WordPress Website With Backup Creator WordPress Plugin

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

the worldwide brute force botnet attack on WordPress is mostly attempting to compromise website administrator panels and gain access to sites by exploiting WordPress installations with “admin” as their username.

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

For a simple step-by-step tutorial that shows you how to change your admin username, go here: How To Change Your Admin Username In WordPress

Security Measure #4 – Your Password

A “brute force” attack occurs when a malicious script persistently hits a login or password field with different character strings trying to guess the right login combination that will give them access to your website.

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 persist in attacking your site until it eventually breaks into your admin area.

Weak passwords, therefore, are really easy targets for hackers. Make sure that you change your password to a string that is at least 8 or 9 characters long, with upper and lowercase letters, combined with “special” characters (^%$#&@*).

Useful Tip

If you have trouble coming up with strong passwords or you are reluctant to set up different passwords for all of your online logins, then use a password management tool like Roboform …

Roboform is a password management tool that lets you generate strong login passwords(You can use a password management software tool like Roboform to help you generate strong login passwords)

For a detailed step-by-step tutorial that shows you how to change your login password, go here: What To Do If You Need To Reset Your Login Password

Security Measure #5 – Prevent Access To The wp-config.php File

The wp-config.php file contains information about your site’s database and is used to define advanced options for WordPress.

wp-config.php

(WP Config file)

If a hacker breaks into your site, they will search for the wp-config.php file, because this is the file that contains your WordPress database details, 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 being attacked and even being used as part of a bot net, therefore, 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 – Delete Or Rename Unnecessary Site 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 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 out-of-date versions of WP plugins and themes.

Make sure to keep all of your application files, themes, plugins, etc. up-to-date.

Security Measure #8 – Disable Your Theme Editor

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

In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor from the main 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 theme files, and cause mayhem on your site.

If you want to prevent unauthorized people from accessing the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Remove Access To The WordPress Uploads Folder

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

Normally, this folder is visible to online users. All a person needs to do to view all of the contents in the “uploads” directory is navigate to your directory using their web browser …

(WordPress uploads folder)

(WordPress uploads directory)

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

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 called “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 – Security Plugins

There are a number of great security plugins for WordPress available that will address most common security issues WordPress site owners face, such as preventing unauthorized users from accessing your site, protecting your site from botnets, preventing injections of code into files, 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 potential issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - total security software solution for WordPress

(SecureScanPro – WordPress security software solution)

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

Another plugin you may want to consider using is BlogDefender.

Blog Defender Security Solution

Blog Defender(Blog Defender Security Suite For WordPress Websites)

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

BlogDefender scans you website for potential security weaknesses …

Blog Defender Security Suite For WordPress SitesAnd then shows you how to easily fix these …

Blog Defender Security Suite For WordPressIf you don’t want to purchase a 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 very secure web platform, but neglecting essential maintenance tasks like keeping your WordPress installation, plugins and WordPress themes up-to-date, tightening file and data security and taking other necessary precautions can have disastrous consequences.

No matter what type 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 a final reminder, below is the advice given by a security expert to all WordPress users after the large-scale 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 very important if you run a WordPress site. Hopefully, the information in this article has given you the initial guidelines and help you need 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 professional WordPress technical provider in our WordPress Services Directory.

Also, please subscribe to WPCompendium.org to receive notifications via email when we publish new tips on WordPress security and tutorials about new WordPress security plugins.

***

"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

***

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