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

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

These attacks were caused by computer networks infected with malware and programmed to attack other vulnerable installations, 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)

There are many ways hackers try to break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. This can be done using software tools and scripts that automatically tries to guess hundreds of possible logins in minutes.

If you’re using easy-to-guess login details, your site can be an easy target for hacking attempts.

This is called a “brute force” login attack.

Botnet Definition

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)

A “Botnet” is a network of computers that have been compromised and infected with malicious software, which are then controlled remotely as a group, typically without the computer owners even being aware that this is taking place.

Botnets are typically used to blast out mass spam emails from computers of compromised user accounts.

Below is a screenshot taken from an internet security monitoring site showing the locations of the command centers of ZeuS – a botnet that has been actively compromising computer networks all around the globe since 2009 …

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

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

These were highly distributed and well organized attacks. Over 90,000 IP addresses were identified by several webhosting companies just in the initial attack, when millions of attempts to force their way into WordPress user admin areas occurred. The worldwide attack continued after this, with over 30,000 WordPress blogs being hacked each day.

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

Being the world's most popular content management system makes WordPress an obvious target for malicious attempts by hackers

(Being the world’s most popular CMS makes WordPress an obvious target for hacking attacks)

Does This Mean We Should Stop Using WordPress?

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

To understand 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 April 2013 large-scale brute-force botnet attack described above, there was actually no WordPress vulnerability being exploited (the same script was also targeting sites built using other web applications like Joomla).

Mike Little, the co-founder 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 Brute Force Attacks – Ten Security Measures

You may think that the information in your website is of little value to hackers, but the reality is that all websites are valuable to a malicious user.

If hackers can exploit a security weakness that allows them to remotely control your site, your website can then be employed to attack other valued web sites.

Additional undesirable effects of having your site hacked include being blacklisted by Google, having stealthy spam links promoting things like viagra, discounted fashion, etc. inserted into your content, malicious redirects to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The reality is that hackers are looking for exploits and trying to break into your website or blog at this very moment. Whether they will be successful depends on how difficult or easy you will make things for them to keep persisting until they work out a way to get in, or are forced to give up and decide to look for an easier target.

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

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

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

You will see that the test will display various results and information about your site …

Hackertarget - WordPress Security Scan

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

It should be obvious after using the above tool that if you are able to access all of this information, then so can hackers.

WP Security Scan(Product image: BlogDefender site)

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 can all be potentially useful information to hackers, as these can inform them about potential security weaknesses, especially where the owners haven’t updated their software versions.

If your site or blog runs on WordPress and you’re not taking 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 targeting WordPress installations worldwide!

Typically, whenever a website or blog is compromised, site owners will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been interfered with or even that their content has been entirely wiped out. Often, most sites will be infected with malicious software without the owner’s knowledge or awareness.

To avoid the heartache and aggravation that comes with 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 prevent your WordPress site from brute force attacks.

Disclaimer

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

***

Security Measure #1 – Get In Touch With Your Webhosting Provider

Get in touch with your web host and ask them what security systems they have put in place to help prevent your site from being attacked, and what is done to ensure that your site files get regularly backed up.

Check that your webhosting provider regularly backs up your sites and that, if disaster strikes, you can quickly and easily get your site back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Regularly Up-To-Date

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

A full 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 themes, plugins and software components are up-to-date,
  • etc …

A proper WP site maintenance routine looks like this …

Maintaining your WP web site frequently backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP website or blog regularly backed up and updated is vitally important for WordPress security. Screenshot image: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WordPress site regularly backed up and updated is. WP maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website. If you don’t want to learn how to do WP site maintenance yourself, pay a professional to do it but make sure this 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 free and paid WordPress plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Backup, Duplicate & Keep Your WordPress Web Site Protected With Backup Creator Plugin For WP

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

the worldwide brute force botnet attack on WordPress is mostly an attempt to compromise website administrator panels by exploiting sites that used “admin” as their account name.

For reasons of website security, never set up WordPress sites with the username “admin”. This is the first area hackers will test. If your blog’s user name is admin, you should change it immediately.

For a simple tutorial on how to change your WordPress username, go here: How To Change Your WordPress Admin User Name

Security Measure #4 – Your Password

A “brute force” attack occurs when malicious software continually hits a username and password field with different strings of characters in an attempt to guess the right combination that will give them access to your site.

Unless some measure is put into place to block 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.

Passwords that are easy to guess, therefore, make really easy targets for hackers. Make sure that you change your password to something that is at least eight characters long, with upper and lowercase letters, and “special” characters (e.g. %, #, &, etc).

Useful Tip

Roboform is a password tool you can use to generate different hard-to-crack passwords …

Roboform is a password management tool that lets you create secure passwords(Roboform is a password management software you can use to create really 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 Login Password

Security Measure #5 – Prevent The wp-config.php File From Being Easily Visible

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

wp-config.php

(wp-config.php file)

If hackers break into your website, they will normally try to access the wp-config.php file, because this file 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.

To protect your WordPress site from attacks 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 – 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 and can be deleted. If you don’t want to remove these files, then just rename them.

Security Measure #7 – Upgrade Your WordPress Files, Plugins And Themes To Their Latest Version

Hackers search for vulnerabilities in earlier versions of WordPress that can be exploited, including outdated versions of plugins and themes.

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WP Theme Editor Menu

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

This means that anyone logging into your blog’s admin can view and modify your WordPress theme files, and cause havoc on your site.

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

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

By default, this folder is visible to online users. All a person needs to do to see the contents stored in your site’s “uploads” directory is navigate to your directory using their web browser …

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

(WordPress uploads directory)

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

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 a file with nothing in it 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 – WordPress Security Plugins

Some great security plugins for WordPress are available that will address most common security issues WordPress site owners face, such as preventing unauthorized users from accessing your site, protecting your files from botnets, preventing injections of code into files, etc.

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

SecureScanPro - security plugin for WordPress

(SecureScanPro – security plugin 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 WordPress Security Solution

Blog Defender(Blog Defender WordPress Security Product Suite)

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

BlogDefender scans you web site for potential security vulnerabilities …

Blog Defender WordPress Security SuiteAnd then shows you how to fix these quickly and easily …

Blog Defender Security Suite For WordPressIf you don’t want to purchase 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 very secure platform, but neglecting simple maintenance tasks like ensuring that your WordPress software, WP plugins and themes are kept updated to their latest versions, 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, securing your web 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 a security expert to all WordPress users after the mass 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 will help 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 WordPress technical provider in our WordPress Services Directory.

Also, please subscribe to WPCompendium.org to receive notifications via email when we publish new articles on WordPress security and reviews of new security plugins and solutions.

***

"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya

***

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