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 powers millions of websites and blogs around the world, which makes it a frequent target for malicious attempts by hackers.

In April 2013, WordPress installations around the world were subjected to worldwide brute-force attacks.

These attacks were caused by computer networks infected with viruses and programmed to attack other vulnerable computers (called “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)

One of the many ways hackers use to try and break into a WordPress site is by trying to guess the site’s administration login username and password. To do this, hackers use software tools that can guess hundreds of login possibilities in minutes.

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

This is called a “brute force” login attack.

What Is A Botnet?

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)

A “Botnet” is a network of computers that have been infected with malicious software, which are then controlled remotely as a group, often without the computer owners’ knowledge or awareness.

Botnets are normally used used to send out mass spam emails from computers of compromised user accounts.

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 globe since 2009 …

ZeuS is a botnet that has been actively infecting computer networks all around the globe since 2009.

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

The ongoing botnet attacks on WordPress sites were well organized and highly distributed. 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 administration areas occurred. The large-scale attack then continued, with over 30,000 WordPress sites being hacked each day.

Coverage of the April 2013 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, PC Magazine, BBC News, Tech Crunch, and even on the official US Department of Homeland Security website …

WordPress is the world's most used content management system which makes it a frequent target for malicious attempts by hackers

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

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

No. In fact, there are many 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: Are Open Source 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 with Matt Mullenweg, 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)

How To Prevent Your WordPress Website From Brute-Force Attacks – Ten Security Measures

You may think that the information in your site has no value to hackers, but the reality is that every website is valuable to a malicious user.

If someone can hack into and gain remote access and control of your website or blog, the blog can then be used as a “bot” to attack larger and more valuable websites.

Additional undesirable consequences of being hacked include being blacklisted by search engines, having stealthy spam links promoting things like online meds, discounted fashion, etc. in your content and page title and descriptions, redirecting visitors to phishing sites or other websites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The reality is that brute-force software bots are looking for exploits and trying to break into your site right now. Whether they will be successful depends on how difficult or easy you will make things for hackers to continue trying until they either can work out how to get access, or are forced to decide to look for a less secure target.

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

Do you own a WordPress site? If so, visit Hackertarget.com and run your website through their WordPress security check …

Website Security Check(Hackertarget – WordPress Security Check Image source: Hackertarget.com)

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

Hackertarget - WordPress Security Check

(Hackertarget – website security scan results. Screenshot image: Hackertarget.com)

It should be obvious after using the tool shown above that if you can freely access all of this information, so can hackers.

Hackertarget - Website Security Scan(Image source: 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 potentially valuable information to hackers, as these can inform them about any exploitable security vulnerabilities, especially in older versions.

If your site or blog runs on WordPress and you are not taking steps to bullet-proof your site, then it’s practically guaranteed that, at some point in time, someone will attempt to hack your website, because these brute force attacks are systematically hitting WordPress sites around the world!

When a website gets broken into, site owners can find themselves completely “locked out” of their own site, or notice that their files have been interfered with or even that their content has been completely wiped out. Typically, compromised sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To avoid the heartache (and significant loss of valuable business data) of having your site being hacked into, below are 10 simple, yet essential and effective security checks that will help to prevent your WordPress site from being attacked by brute-force botnets.

Info

Note: A few of the recommended steps shown below require some technical understanding of how to modify core WordPress and/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 technical provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Hosting Company

Get in touch with your hosting provider and ask them what systems are in place to help prevent your site from brute-force attacks, and what is done to ensure that your files and data get backed up.

Make sure that your webhosting service is regularly backing up your server files and that, if disaster strikes, you can easily get your files and data back.

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

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

A complete WordPress maintenance routine ensures that:

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

A proper WP site maintenance routine looks like this …

Maintaining your WordPress website fully backed up and updated is vitally important for WordPress security.(Maintaining your WordPress installation completely backed up and updated is vitally important for WordPress security. Image: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WordPress website or blog frequently backed up and updated. WordPress site maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website or blog. If you do not want to learn how to do WP site 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 site manually, there are a number of WordPress plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Backup, Clone And Protect Your WordPress Sites With Backup Creator WordPress Plugin

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

The brute-force botnet attack on WordPress is mostly an attempt to compromise website administrator panels and gain access to the site by exploiting WordPress sites with “admin” as their user name.

For website security reasons, avoid setting up WordPress sites with the username “admin”. This is the first thing hackers will test. If your site’s username is “admin”, then change this immediately.

For a tutorial that shows you how to change your username, go here: Changing Your Admin Username In WordPress

Security Measure #4 – Make Sure Your Password Is Secure

A “brute force” attack occurs when a malicious script continually and persistently tries to guess the right username and password character string that will give the hacker entry to 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, become really easy targets for brute-force attacks. Make sure that you change your password combination to something containing at least eight or nine characters long, and that includes upper and lowercase letters, and “special” characters (e.g. %, #, *, etc).

Useful Tip

Roboform is a password management program that lets you easily generate different hard-to-crack passwords …

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

We have created a tutorial for non-technical WordPress admin users that shows you how to change your admin password here: Changing The Login Password

Security Measure #5 – Protect Your wp-config.php File

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

wp-config.php

(WordPress WP Config file)

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

In order to protect your WordPress site from being attacked and even being used as part of a bot net, therefore, prevent your wp-config.php file from being accessible. 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. If you don’t want to remove these files, then just rename them.

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

Hackers are always on the lookout for vulnerabilities in older versions of WordPress that can be exploited, including out-of-date versions of WordPress plugins and themes.

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

Security Measure #8 – Disable The WordPress Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor via the dashboard menu)

The WordPress theme editor feature allows anyone accessing your blog’s admin area to view and make changes to your theme templates, or cause havoc on your site.

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

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

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

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

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

If any directories in your website have vulnerabilities that can be exploited by malicious users, this could threaten 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, uploading a blank index.php file (this is literally a blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to consult a professional if you are unsure about what to do.

Security Measure #10 – Security Plugins

There are several WordPress security plugins available that specifically address most common security issues faced by WordPress site owners, such as preventing unauthorized users from accessing your site, protecting your site from malicious scripts, preventing unauthorized file uploads, etc.

Many WordPress plugins address some but not all areas of WordPress security. One security plugin that does 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 - security software solution for WordPress

(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 plugin you may want to look at using is BlogDefender.

Blog Defender

Blog Defender Security Product Suite For WordPress(Blog Defender 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 shows you where potential security weaknesses in your website are …

Blog Defender Security Plugin For WordPress Websites & BlogsAnd lets you easily fix these …

Blog Defender Security SolutionIf you don’t want to purchase a 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 web platform, but neglecting basic maintenance tasks like updating your WordPress installation, WP plugins and themes, tightening file and data security and taking other necessary precautions can expose your site to malicious 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, securing your websites is something you cannot ignore.

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 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 very important if you run a WordPress site. Hopefully, this article has shown you what to do to 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 professional WordPress service provider in our WordPress Services Directory.

Also, please remember to subscribe to WPCompendium.org to be notified when we publish new tutorials on WordPress security and reviews of new WordPress security plugins and solutions.

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org

***