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 SecurityBeing the world’s most used CMS makes WordPress an easy target for hacking.

In 2013 a large-scale brute force attack hit WordPress installations on almost every WP hosting server in existence around the world.

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

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)

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

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

This is called a “brute-force” login attack.

Botnets – What Are They?

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 private computers that have been infected with malicious software, which are then controlled remotely as a group, often without the computer owners even being aware of this.

Botnets are often used to blast out mass spam emails.

Below is a screenshot 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 compromising computer networks all around the world since 2009.

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

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

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

WordPress is often the target of attacks by hackers, due to its popularity

(WordPress powers millions of websites around the world, making it a target for attempted attacks by malicious users)

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

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

We explain why WordPress is a secure platform for websites in this article: Why WordPress Is A Secure Platform For Websites –

Info

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

Preventing Your WordPress Website From Being Brute Force Attacked – Ten Security Points

You may think that the information in your site has no value to hackers, but the reality is that to a hacker, all websites are an opportunity to gain some advantage at your expense.

If a malicious user can break in and gain remote access and control of your blog, the web site can then be employed to target larger and more highly-valued sites.

Additional undesirable results of having your site hacked include being blacklisted by search engines, having spammy links promoting things like online meds, discounted fashion, etc. inserted in your content, redirecting visitors to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasty things.

The truth is that hackers are trying to hack into your website right now. Whether they can be successful depends on how difficult or easy you have made it for hackers to continue persisting until they either work out a way to get in, or give up and decide to look for a less protected target.

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

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

Hackertarget - WP Security Check(Hackertarget – WP Security Scan Product image: https://hackertarget.com/wordpress-security-scan)

You will see that the check will yield various results and information about your website …

Website Security Scan

(Hackertarget – website security scan results. Image source: Hackertarget.com)

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

WP Security Scan(Product image: 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 can be valuable information to hackers, as this informs them about any security vulnerabilities, especially where the owners haven’t updated their software versions.

If your website runs on WordPress and you are not preventive steps to bolster the security of your site, it’s practically guaranteed 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 targeting WordPress installations worldwide!

Whenever a website gets broken into, webmasters can 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, compromised sites will become infected with malicious software without the owner even being aware that this has taken place.

To help avoid the heartache that comes with having your web site being hacked into, below are 10 essential and effective security measures that will help to protect your WordPress site from botnet attacks.

Warning

Note: Some of the recommended steps below need some technical skills 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 search for a WordPress service provider in our WordPress Services Directory.

***

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

Get in touch with your host and ask them what security 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.

Make sure that your web host is backing up your server files and that, if anything goes wrong, you can quickly and easily get your site back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Frequently Up-To-Date

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

A complete WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WordPress installation fully backed up and up-to-date. WP site maintenance is not hard to do 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 a professional to do it but make sure this gets done. Backing up your website is the second most important thing you should do after making sure that your heart is still beating!

If you don’t want to back up your files manually, there are a number of free and paid WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Backup, Clone And Keep Your WP Web Sites Protected With Backup Creator Plugin For WP

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

The brute-force attack on WordPress sites was mostly an attempt to compromise site administrator panels by exploiting sites using “admin” as their user name.

For reasons of website security, avoid setting up a WordPress site with the username admin. This is the first area of potential vulnerability hackers will test. If your site’s username is “admin”, you will need to change this immediately.

For a step-by-step tutorial for WP admin users on how to change your login username, go here: How To Change Your WP User Name From Admin To Another User Name

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when a malicious script continually and persistently hits a login or password field with different strings of characters in an attempt to guess the right combination that will unlock your site.

Unless you put some measure in place to stop the brute-force attack from happening (see further below for a couple of simple and effective ways to do this), the “bot” will just keep attacking your site until it eventually gets access.

Weak passwords, therefore, are very easy targets for hacking attacks. 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).

Tip

You can use a password management software tool like Roboform to help you generate strong login passwords …

You can use a password management program like Roboform to generate strong login passwords(You can use a password management tool like Roboform to help you generate secure login passwords)

We have created a step-by-step tutorial created especially for WP admin users that shows you how to change your admin password here: How To Change Your Password

Security Measure #5 – Secure Your WP Config File

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

wp-config.php file

(wp-config.php file)

If hackers break into your site, they will normally try to access the wp-config.php file, because this is the file that contains your database details, 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, prevent people from being able to easily get to your wp-config.php file. 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

Rename or delete 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 Installation, Plugins And Themes Up-To-Date

Hackers search for vulnerabilities they can exploit in previous WordPress versions, including outdated versions of WP themes and plugins.

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

Security Measure #8 – Disable The Theme Editor

WordPress installations come with a built-in editor that lets the site administrator edit theme and plugin code from the dashboard.

In WordPress, you can access the WordPress Theme Editor by selecting Appearance > Editor in the main menu …

WP Theme Editor Menu

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

The WordPress theme editor lets anyone accessing your site’s admin view and change your theme templates, or create havoc on your site.

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

Security Measure #9 – Protect The Site’s Uploads Folder

The “uploads” folder contains all the media that gets uploaded to your site.

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

(WordPress uploads folder)

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

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, someone can upload unauthorized file types to 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 seek professional help if you are not sure about what to do.

Security Measure #10 – Security Plugins

Some great security plugins for WordPress are available that will address most security issues faced by WordPress website owners, such as preventing unauthorized users from accessing vital areas of your site, protecting your website from malicious scripts, preventing unauthorized file uploads, etc.

Most 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 site files and causing damage to your site is SecureScanPro.

SecureScanPro - complete security plugin for WordPress

(SecureScanPro – WordPress security software solution)

SecureScanPro is easy to install and easy to use, and does a great job of fixing most of the security areas that WordPress users need to address.

Another plugin you may want to consider using is BlogDefender.

Blog Defender WordPress Security Plugin

Blog Defender Security Suite For WordPress Web Sites(Blog Defender Security Plugin For WordPress)

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

BlogDefender shows you where the security weaknesses in your web site are …

Blog Defender Security SolutionAnd then shows you how to fix these quickly …

Blog Defender Security Suite For WordPress Web SitesIf 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 ensuring that your WP 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.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, securing your website or blog is something you simply cannot afford to ignore.

As a final reminder of the importance of keeping your websites protected, below is the advice given by a web 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 of the utmost importance if you run a WordPress site. Hopefully, this information will help keep your WordPress site protected from brute-force attacks. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to receive notifications when we publish new articles on WordPress security and reviews of 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

***