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

In April 2013, WordPress installations around the world were subjected to a global-scale brute force attack.

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

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

If you’re using easy-to-guess user names and passwords, your website could be easily hacked by persistent attempts to work out 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/botnet)

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

Botnets are often used to send out mass spam emails from the infected computers of unsuspecting users.

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

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

(ZeuS is a botnet that has been actively infecting computer networks all around the world since 2009. Screenshot source: SecureList.com)

The ongoing botnet attacks on WordPress are highly distributed and well organized. Over 90,000 IP addresses were identified by several hosting companies in the initial attack, when millions of attempts to force their way into WordPress site admin areas occurred. The mass attack then continued, with over 30,000 WordPress blogs being hacked per day.

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

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

(WordPress powers millions of websites and blogs worldwide, making it an obvious target for malicious attacks by hackers)

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

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

To learn why WordPress is a secure platform for websites, read this article: Are Open Source Web Platforms Like WordPress Secure?

Important Info

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

Mike Little, one of the co-founders 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 Website From Brute Force Attacks – 10 Security Checks

You may think that your website or blog has no value to hackers, but the reality is that every website has some value to a malicious user.

If a malicious user can exploit a security vulnerability in your system and gain stealth control of your website or blog, your blog can then be used to target larger and more valued sites.

Additional undesirable impacts of having your website hacked include being blacklisted by search engines, having spammy links advertising things like casinos, discounted fashion, etc. inserted in your content, malicious redirects to phishing sites and other websites, drive-by downloads (adding malware on your visitors’ computers), and lots of other nasties.

The harsh reality is that software-driven bots are most likely trying to break into your website or blog while you are reading this page. Whether they can be successful will depend on how difficult or easy you will make it for hackers or botnets to continue trying until they discover how to get in, or give up and 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 a site like Hackertarget.com and run your website through their WordPress security scan …

Website Security Check(WordPress Security Check Image source: https://hackertarget.com/wordpress-security-scan)

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

Hackertarget - WordPress Security Check

(website security scan results. Product image source: Hackertarget.com)

It should be obvious after using this tool that if you can see all of this information about your blog, then hackers can too.

Hackertarget - Website Security Scan(Screenshot image: Blog Defender)

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

If your site or blog is powered by WordPress and you’re not precautionary steps to bolster the security of 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 brute-force attacks are systematically hitting WordPress sites worldwide!

When a website or blog gets hacked, webmasters will find themselves completely “locked out” of their own site, or notice that their files have been vandalized or even that their content has been completely wiped out. Often, most sites will become infected with malicious software without the owner’s knowledge or awareness.

To help avoid the heartache (and significant financial loss) that comes with having your web site being hacked into, we have listed below ten simple, yet essential and effective security measures that will help to prevent your WordPress site from brute-force botnet attacks.

Disclaimer

Note: A few of the steps below need some technical skills to modify core WordPress or server files. If you lack these technical 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 – Get In Touch With Your Hosting Service Provider

Get in touch with your host and ask them what security systems are in place to help prevent your site from being attacked, and what is done to make sure that your WordPress sites get backed up.

It’s important to check that your host is backing up your sites and that, if anything happens, you can easily get your files and data back.

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

You should never rely only on your hosting provider for your site backups. Instead, learn how to manage your WordPress site or pay someone to get this service done for you and develop a habit of performing a full WordPress site maintenance routine on a frequent basis (e.g. daily, weekly, fortnightly, etc …)

A full WordPress maintenance routine ensures that:

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

A proper WordPress maintenance routine looks like this …

Maintaining your WP installation regularly backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress site backed up and up-to-date is vitally important for WordPress security. Screenshot: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WordPress installation fully backed up and updated is. WordPress 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 WP maintenance yourself, pay someone to do it but make sure this gets done. Backing up your website is the second most important thing you must do after making sure that you are still breathing!

If you don’t want to back up your site manually, there are a number of free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Backup, Copy And Keep Your WordPress Website Protected With Backup Creator WordPress Plugin

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

The brute-force botnet attack on WordPress is mostly attempting to compromise website admin panels by exploiting WordPress installations that used “admin” as their user name.

For reasons of website security, avoid installing sites with the username “admin”. This is the first thing hackers will test. If your blog’s user name is “admin”, you will need to change it immediately.

For a detailed step-by-step tutorial that shows you how to change your admin username, go here: Changing Your WordPress Admin Username

Security Measure #4 – Choose Strong Passwords

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

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

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

Practical Tip

You can use a password tool like Roboform to help you generate difficult passwords …

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

For a simple tutorial that shows you how to change your password, go here: What To Do If You Need To Change Your WordPress Password

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

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

wp-config.php

(wp-config.php)

If a hacker breaks into your site, they will typically search for your wp-config.php file, because this is the file that contains your WordPress 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.

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 – Delete Or Rename Unnecessary Installation Files

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

These files are not required after installation. If you don’t want to delete these files, just rename them.

Security Measure #7 – Keep Your WordPress Installation, Plugins And Themes Up-To-Date

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

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

Security Measure #8 – Disable The Theme Editor

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

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

WP Theme Editor Menu

(The WordPress theme editor can be accessed using the dashboard menu)

The WordPress theme editor feature allows anyone accessing your blog’s admin to see and make changes to all of your theme template files, or create mayhem on your site.

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 Folder

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

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

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

(WordPress uploads folder)

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

Protecting your directories will prevent online users 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 an empty file called “index.php”) to your uploads directory, and so on. Again, it’s best to seek professional help if you are unsure about what to do.

Security Measure #10 – Install WordPress Security Plugins

Several WordPress security plugins are available that specifically address most common security issues WordPress website owners face, such as preventing unauthorized users from accessing your site, protecting your website from brute-force attacks, preventing unauthorized file uploads, 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 causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WordPress security plugin

(SecureScanPro – complete security software solution for WordPress)

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

Another great security plugin you may want to consider using is BlogDefender.

Blog Defender Security Suite

Blog Defender WordPress Security Solution(Blog Defender WordPress Security Plugin)

This product is a suite of WordPress security video tutorials, plugins and tools, plus a WordPress security PDF/DOC file.

BlogDefender scans you website for potential security vulnerabilities …

Blog DefenderAnd then shows you how to fix these quickly, easily and inexpensively …

Blog Defender WordPress Security SolutionIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, you can use various free WordPress 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 installation, plugins and WordPress themes, tightening file and data security 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 website.

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 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 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 WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications when we publish new information on WordPress security and tutorials about new WordPress security plugins and solutions.

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie

***