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 malicious attacks by hackers.

In April 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 sites (botnets).

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

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 WordPress sites. One of these is by trying to guess the site admin’s login username and password. To attempt this, hackers use scripts and tools that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re using weak login details, your website can be easily hacked by the malicious script’s repeated attempts to guess your site’s login details.

This is called a “brute-force” 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/botnet)

A “Botnet” is a network of computers that have been compromised and infected with malicious code or scripts, which can then be controlled remotely as a group, typically without the unsuspecting computer owners even being aware that this is happening.

Botnets are typically used to send mass spam emails from the infected computers of unsuspecting users.

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

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

These were well organized and highly distributed botnet attacks on WordPress sites. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack alone, when millions of attempts to force their way into WordPress users admin areas occurred. The brute force attacks continued after this, with over 30,000 WordPress sites being hacked every day.

News of this brute-force botnet attack was reported by all 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 …

Powering millions of websites around the world makes WordPress an obvious target for hacking

(WordPress often comes under attack by hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are many good reasons why you should continue using WordPress if you are concerned about the security of your web presence.

We explain why WordPress is a secure web platform in this article: Is WordPress A Secure Website Platform?

Info

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

Protecting Your WordPress Site From Brute-Force Attacks – 10 Security Points

Every blog with a vulnerability offers some potential value to hackers. Every website has value to hackers. Corporate sites, personal blogs, government web sites … even web sites owned by web security experts can and have been targeted.

If a hacker can exploit a vulnerability, that website can then be employed to target larger and more valuable sites.

Additional undesirable effects of having your website hacked include being blacklisted by Google, having stealthy spam links promoting things like gambling, porn, 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 many other nasty things.

The harsh reality is that brute-force software bots are probably looking for vulnerabilities and trying to hack into your web site as you are reading this page. Whether they will break in successfully will depend on how hard or easy you can make it for hackers to continue trying until they can find how to break in, or are forced to give up and go look for a less protected target.

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

Does your website run on WordPress? If so visit Hackertarget.com and run your website through their WordPress security scan …

Website Security Scan(Hackertarget – Website Security Check Screenshot: Hackertarget.com)

You will see that the test returns a number of results and details about your site …

Website Security Check

(website security scan results. Product image: Hackertarget.com)

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

WordPress Security Check(Source: BlogDefender website)

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 on your server are all useful information to hackers, as these can inform them about any exploitable security weaknesses, especially in older versions.

If your site or blog runs on WordPress and you are not taking steps to harden your site, it’s practically guaranteed that, at some point, someone will attempt to hack your installation, because these attacks are systematically targeting WordPress sites around the world!

Typically, when a site is compromised, blog owners can discover much to their dismay that they have been “locked out” of their own site, or notice that their content has been vandalized or even entirely wiped out. Often, most compromised sites will be infected with malicious software without the owner even being aware of it.

To avoid the heartache (and significant financial loss) 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 prevent your WordPress site from being attacked by brute force botnets.

Disclaimer

Note: Some of the steps listed below require some technical skills to modify core WordPress and server files. If you have no technical skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress technical provider for help.

***

Security Measure #1 – Contact Your Web Host

Contact your web host and ask them what security measures have been put into place to help prevent your site from brute force attacks, and what is done to ensure that your files and data get regularly backed up.

Make sure that your host regularly backs up your sites and that, if disaster strikes, you can easily recover your site.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Regularly Updated

Never rely on your host for your site backups. Instead, learn how to manage your WordPress site or get this done for you and maintain a habit of religiously performing a full WordPress site maintenance routine on a regular basis (e.g. daily, weekly, fortnightly, etc …)

A full WordPress maintenance routine ensures that:

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

A complete WordPress maintenance routine looks like this …

Maintaining your WordPress website or blog backed up and updated is vitally important for WordPress security.(Maintaining your WP website fully backed up and up-to-date is vitally important for WordPress security. Image source: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WP website or blog frequently backed up and updated. WordPress 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 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 are still breathing!

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, Duplicate & Keep Your WordPress Web Site Protected With Backup Creator WP Plugin

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

The brute force botnet attack on WordPress is mostly attempting to compromise website administrator panels and gain access to the site by exploiting installations 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 thing hackers will test. If your blog’s user name is admin, then change this immediately.

For a step-by-step tutorial that shows you how to change your username, go here: Changing Your Admin User Name In WordPress

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when malicious software continually hits a username and password field with different character strings trying to guess the right login combination that will unlock your site.

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

Passwords that are easy to guess, therefore, become very easy targets for hacking attacks. Make sure that you change your password to a string that contains at least 8 characters long, with both upper and lowercase letters, and add a few “special” characters (%^#$@&*).

Useful Tip

Roboform is a password program that lets you easily generate very secure passwords …

Roboform is a password tool you can use to generate different strong passwords(Roboform is a password program that lets you generate secure passwords)

We have created a step-by-step tutorial that shows you how to change your WordPress admin password here: What To Do If You Need To Change WordPress Passwords

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

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

(WordPress WP Config file)

If hackers break into your site, they will typically look for your 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 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 attacks and even being used as part of a bot net, therefore, prevent people from accessing 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

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

These files are not required after installation. If you don’t want to delete these files, then just rename them.

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

Hackers look for vulnerabilities in previous versions of WordPress that can be exploited, including out-of-date versions of WordPress plugins and themes.

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

Security Measure #8 – Disable Your Theme Editor

WordPress comes with a built-in editor that lets you edit plugin and theme files inside the dashboard area.

You can access your WordPress Theme Editor by selecting Appearance > Editor in your admin menu …

WP Theme Editor Menu

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

The WordPress theme editor allows anyone accessing your blog to view and edit your WordPress files, and create mayhem 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 Site’s Uploads Folder

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

Normally, this folder is visible to anyone online. All someone has to do to see the contents in the “uploads” directory is visit your directory using their web browser …

(WordPress uploads folder)

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

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

Protecting your directories will prevent unauthorized people 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 an empty file 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 – WordPress Security Plugins

Several WordPress security plugins are available that will address many common security issues WordPress site owners face, such as preventing hackers from gaining access to vital information about your site, protecting your files from malicious exploits, preventing injections of code into files, etc.

Many WordPress plugins address some but not all areas of WordPress security. One 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 irreparable damage to your site is SecureScanPro.

SecureScanPro - total security software solution for WordPress

(SecureScanPro – WP security software)

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

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

Blog Defender Security Product Suite For WordPress

Blog Defender(Blog Defender)

This product 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 WordPress installation are …

Blog DefenderAnd lets you quickly and easily fix these …

Blog Defender Security Suite For WordPress BlogsIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, then use various free WordPress 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 WP software, plugins and WordPress themes are kept updated to their latest versions, tightening file and data protection and taking other necessary precautions can expose your site to malicious by hackers and bots.

No matter what type of business you run or plan to run online and how small you think your web presence is, web security is something you cannot afford to ignore.

As a final reminder, below is the advice given by a security expert to all WordPress users following the worldwide 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, website security is very important 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 consult a WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

Also, don’t forget to subscribe to WPCompendium.org to be notified via email when we publish new tutorials on WordPress security and reviews of new 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

***