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 SecurityWhen you are the world’s most popular CMS platform and the preferred online publishing platform used by millions of websites and loved by thousands of website developers and web designers, it’s inevitable that at some point in time, WordPress will come under attack by hackers.

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

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

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

About 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’s administration login username and password. This can be achieved using software programs that can work through hundreds of possible logins in minutes.

If you’re not using strong usernames or unguessable passwords, your website 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)

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

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

The screenshot below was taken from an internet security monitoring site showing the locations of the command centers of ZeuS – a botnet that 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.

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

These were highly distributed and well organized attacks. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress site administration areas. The large-scale attack continued after this, with over 30,000 WordPress sites being hacked per day.

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

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

(WordPress is often the target of malicious attacks by hackers, due to its 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 website security.

To understand what makes WordPress a very secure web platform, read this article: WordPress Security What Every Business Owner Needs To Know About WordPress Security

Useful Information

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

How To Protect Your WordPress Blog From Being Brute-Force Attacked – Ten Security Points

You may think that your website is of little value to hackers, but the reality is that to a hacker, all websites provide an opportunity to gain some advantage at your expense.

If a hacker can break in and gain access and control of your blog, your blog can then be employed to attack other valuable sites.

Additional undesirable consequences of having your site hacked include being blacklisted by Google, having stealthy spam links promoting things like online meds, cheap offers on brand names, etc. inserted in your content, redirecting visitors to phishing sites and other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and many other nasties.

The reality is that malicious bots are most likely trying to hack into your website or blog right now. Whether they can achieve this depends on how hard you have made it for them to continue persisting until they either find a way to break in, or give up and decide to look for an easier target.

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

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

Hackertarget - WP Security Scan(Website Security Check Screenshot source: https://hackertarget.com/wordpress-security-scan)

You will see that the scan will return a number of results and information about your WordPress site …

WordPress Security Check

(WP security scan results. Source: Hackertarget.com)

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

WP Security Check(Product image source: BlogDefender site)

The ability to see which 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 can all be potentially useful information to hackers, as this informs them about exploitable security vulnerabilities, especially in older versions.

If your website is driven by WordPress and you are not proactive steps to toughen up your site, it’s practically guaranteed that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically targeting WordPress sites all the world!

Whenever a website gets compromised, blog owners will discover much to their dismay that they have been “locked out” of their own site, or notice that their content has been interfered with or that everything has been entirely wiped out. Typically, most compromised sites will become infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To avoid the heartache and frustration (and potential financial loss) that comes with discovering that your site has been hacked into, we have listed below ten simple, yet essential and effective security measures that will help to prevent your WordPress site from being attacked by brute-force hackers.

Useful Info

Note: Some of the recommended measures below need some technical skills to modify core WordPress and/or server files. If you are not technical-minded, or don’t want to mess around with code on your site, then ask your web host or a professional WordPress service provider for assistance.

***

Security Measure #1 – Contact Your Web Host

Get in touch with your webhosting service provider and ask them what systems have been put in place to help prevent your site from being attacked, and what they are doing to make sure that your server files and data get regularly backed up.

It’s important to check that your webhosting company backs up your server files and that, if disaster strikes, you can easily recover your files.

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

Never rely just on your webhosting provider for your site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this done for you and maintain a habit of performing a complete site maintenance routine on a frequent basis (e.g. weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

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

A full WP site maintenance routine looks like this …

Maintaining your WordPress web site frequently backed up and updated is vitally important for WordPress security.(Maintaining your WP installation backed up and updated is vitally important for WordPress security. Image source: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WordPress installation frequently backed up and up-to-date is. WordPress 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 WordPress maintenance yourself, get someone else to do it but make sure it gets done. Backing up your site is the second most important thing you must do after making sure that you still have a pulse!

If you don’t want to back up your files manually, there are many WordPress plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Backup, Clone And Keep Your WP Websites And Blogs Protected With Backup Creator WP Plugin

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

The large scale brute-force attack on WordPress is mostly an attempt to compromise site admin panels by exploiting installations using “admin” as their account name.

For security purposes, avoid setting up a WordPress site with the username “admin”. This is the first area hackers will test. If your blog’s user name is “admin”, then change this immediately.

We have created a step-by-step tutorial that shows you how to change your WordPress admin username here: How To Change Your WordPress Admin Username To Another Username

Security Measure #4 – Use Strong Passwords

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

Unless some measure is put into place to prevent 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, are very easy targets for botnets. Make sure that you change your password combination to something that contains at least eight characters long, with upper and lowercase letters, combined with “special” characters (e.g. %, $, *, etc).

Useful Tip

You can use a password management program like Roboform to help you generate secure passwords …

Roboform is a password management tool you can use to create different secure passwords(You can use a password software tool like Roboform to help you generate hard-to-crack passwords)

We have created a simple tutorial created especially for WordPress admin users on how to change your login password here: How To Reset Your Login Password

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.

wp-config.php

(WordPress WP Config file)

If a hacker breaks into your website, they will typically try to access your wp-config.php file, because this file contains your 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, 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 WP Installation Files

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

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

Security Measure #7 – Update Your WordPress CMS, Themes & Plugins To Their Latest Version

Hackers look for vulnerabilities they can exploit in older versions of WordPress, including outdated versions of WordPress themes and plugins.

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

In WordPress, you can access the WordPress Theme Editor by selecting Appearance > Editor from the admin menu …

WP Theme Editor Menu

(The WordPress theme editor is accessible using the dashboard menu)

The WordPress theme editor allows anyone accessing your site’s admin area to see and modify your WordPress theme templates, and create mayhem on your site.

If you want to prevent unauthorized 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 Site’s Uploads Folder

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

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

(WordPress uploads directory)

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

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this could 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 named “index.php”) to your uploads directory, and so on. Again, it’s best to ask for assistance from someone who knows what they are doing if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

There are some great WordPress security plugins available that specifically address most common security issues WordPress website owners face, such as preventing unauthorized users from gaining access to vital information about your site, protecting your website from brute-force attacks, preventing unauthorized file uploads, 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 potential issues that could lead to hackers accessing your site files and damaging your site is SecureScanPro.

SecureScanPro - WordPress total security software solution

(SecureScanPro – WordPress security software)

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

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

Blog Defender

Blog Defender WordPress Security Plugin(Blog Defender Security Solution)

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

BlogDefender shows you where the security holes in your WordPress installation are …

Blog DefenderAnd lets you fix these quickly, easily and inexpensively …

Blog Defender Security PluginIf you don’t want to invest in a security plugin like SecureScanPro or BlogDefender, then use various free plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting simple maintenance tasks like keeping your WP core files, plugins and WP themes updated to their latest versions, tightening file and data security and taking other necessary precautions can expose your website to attacks by hackers and bots.

Regardless of the type of business you run or plan to run online and how small you think your web presence is, you simply cannot ignore the importance of web security.

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 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 of the utmost importance 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 seek help from a professional WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

Also, do yourself a favor and subscribe to WPCompendium.org to receive notifications via email when we publish new information on WordPress security and reviews of new WordPress security plugins and solutions.

***

"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

***