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, due to its popularity.

In April 2013 a global brute-force attack struck WordPress installations on virtually every web host in existence around the world.

These attacks were caused by networks of infected computers programmed to attack other sites, also commonly known as “botnets”.

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)

There are many ways hackers try to break into WordPress sites. One of these is by trying to guess the site admin’s login username and password. This is done using software programs and scripts that can guess hundreds of login combinations in minutes.

If you’re using predictable user names and passwords that are easy to guess, your website could be an easy target for hackers.

This is called a “brute force” attack.

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)

A “Botnet” is a network of computers that have been infected with malicious software, which can then be controlled remotely as a group, typically without the computer owners even being aware that this is going on.

Botnets are normally used used to blast mass spam emails from 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 globe since 2009 called “Zeus” …

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

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

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

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

Powering millions of websites worldwide makes WordPress an obvious target for hacking attacks

(Powering millions of sites around the world makes WordPress an obvious target for hacking)

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 at all about the security of your online presence.

To understand why WordPress is a secure web platform, see this article: Is WordPress Secure? What Every Blog Owner Needs To Know

Important Info

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

Mike Little, the co-founder 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)

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

You may think that your site is of no interest to hackers, but the reality is that to a hacker, every website provides an opportunity to profit or benefit at your expense.

If a hacker can exploit a way to gain remote control of your blog, that website can then be used as a “bot” in a planned cyber attack against other valuable web sites.

Additional undesirable results of having your site hacked include getting blacklisted by Google, having stealthy spam links promoting things like online meds, cheap offers on brand names, etc. inserted in your content and page title and descriptions, malicious redirects to phishing sites and other websites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasty things.

The harsh reality is that software-driven bots are probably trying to break into your site as you are reading this. Whether they will hack into your site successfully will depend on how difficult or easy you have made it for them to continue persisting until they find a way to get in, or give up and go look for an easier target.

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

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

Hackertarget - WP Security Scan(Hackertarget – Website Security Scan Source: https://hackertarget.com/wordpress-security-scan)

You will see that the scan will display a number of results and details about your website …

Website Security Check

(Hackertarget – WP security scan results. Product image: Hackertarget.com)

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

Hackertarget - Website Security Check(Screenshot: Blog Defender)

Being able to see what 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 on your server are all valuable information to hackers, as this can inform them about any potential holes or weaknesses, especially in older versions.

If your site or blog runs on WordPress and you’re not proactive 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 brute force attacks are systematically hitting WordPress sites worldwide!

When a website is broken into, website owners will find themselves “locked out” of their own site, or notice that their files have been vandalized or that everything has been entirely wiped out. Often, most compromised sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To help avoid the heartache of discovering that your website or blog has been hacked into, we have listed below ten simple, yet essential and effective security checks that will help to protect your WordPress site from brute-force attacks.

Note

Note: A few of the recommended measures below require some technical understanding of how to modify core WordPress and/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 help.

***

Security Measure #1 – Contact Your Hosting Company

Contact your hosting company and ask them exactly what security precautions are in place to protect your site from brute force attacks, and what they are doing to make sure that your files and data are regularly being backed up.

Make sure that your webhosting service provider regularly backs up your server files and that, if disaster strikes, you can easily get back your site.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Frequently Updated

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

A complete WordPress maintenance routine ensures that:

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

A complete WP site maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WP installation backed up and updated is. WP 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 site maintenance yourself, get someone else 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 are still breathing!

If you don’t want to perform manual backups, there are a number of plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Back Up, Clone And Protect Your WP Websites And Blogs With Backup Creator WP Plugin

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

The large scale brute-force botnet attack on WordPress sites was mostly attempting to compromise website admin panels by exploiting WP sites using “admin” as their user name.

For reasons of website security, don’t install a WordPress site with the username “admin”. This is the first area of potential vulnerability hackers will test. If your blog’s user name is “admin”, change this immediately.

For a simple tutorial on how to change your username, go here: Changing Your WordPress Username From Admin To Another Username

Security Measure #4 – Use Strong Passwords

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

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

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

Practical Tip

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

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

For a tutorial created especially for non-technical WordPress admin users that shows you how to change your WordPress admin password, go here: How To Reset Passwords

Security Measure #5 – Secure Your WP Config File

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

wp-config.php

(WordPress 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 them 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, you must 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 Installation Files

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

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

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

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

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

Security Measure #8 – Disable The WordPress Theme Editor

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

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

WP Theme Editor Menu

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

This means that anyone logging into your site can view and modify your theme files, or cause havoc on your site.

If you want to prevent people from being able to access 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 The WordPress Uploads Folder

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

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

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

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

If any files stored in his folder have vulnerabilities that can be exploited by hackers, 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 a file with nothing in it called “index.php”) to your uploads directory, and so on. Again, it’s best to use a professional if you are not sure about what to do.

Security Measure #10 – Install WordPress Security Plugins

There are several security plugins for WordPress available that specifically address most common security issues faced by WordPress website owners, such as preventing hackers from gaining access to vital information about your site, protecting your site from malicious scripts, preventing injections of code into files, etc.

Many WordPress plugins address some but not all areas of WordPress security. One WordPress security plugin that does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your website files and causing damage to your site is SecureScanPro.

SecureScanPro - WP security software solution

(SecureScanPro – complete security software for WordPress)

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

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

Blog Defender Security Solution

Blog Defender Security Solution For WordPress Blogs(Blog Defender)

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

BlogDefender shows you where potential security holes in your website are …

Blog DefenderAnd then shows you how to easily fix these …

Blog Defender Security Product Suite For WordPress WebsitesIf you don’t want to buy a premium security plugin like SecureScanPro or BlogDefender, you can use various free WP plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting essential maintenance tasks like ensuring that your WordPress installation, plugins and WordPress themes are kept up-to-date, tightening file and data protection and taking other necessary precautions can expose your website to attacks by hackers and bots.

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 a final reminder of the importance of keeping your websites protected, below is the advice given by an expert on web 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 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, please remember to subscribe to WPCompendium.org to be notified via email when we publish new information on WordPress security and reviews of new WordPress security plugins.

***

"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

***

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