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 SecurityPowering millions of sites worldwide makes WordPress an easy target for hacking.

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

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

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

Brute-Force Attacks – An Overview

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 software programs that automatically tries to guess hundreds of login combinations in minutes.

If you’re using easy-to-guess usernames and predictable passwords, your site can be an easy target for hackers.

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

Botnets

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, which can then be controlled remotely as a group, typically without the unsuspecting computer owners even being aware of this.

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

The screenshot below was taken from an internet security monitoring site showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the world since 2009 called “Zeus” …

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

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

These were highly distributed and well organized botnet attacks. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress site administration areas. The worldwide brute force attacks continued after this, with over 30,000 WordPress blogs being hacked each day.

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

WordPress is the world's most popular CMS making it a natural target for hacking

(WordPress is the world’s most popular content management system making it an obvious target for hackers)

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 the security of your online business.

We explain what makes WordPress a very secure web platform in this article: Is WordPress Secure?

Info

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

Preventing Your WordPress Website From Being Brute Force Attacked – 10 Security Checks

Every website or blog with a vulnerability can can provide an opportunity to hackers. A vulnerable website not only presents hackers opportunities to improve their skills and claim “bragging rights” from their peers, but it can also be a valuable platform for DDoS attacks, distributing malware and engaging in information theft.

If someone can exploit a security flaw, that blog can then be used to attack more valuable web sites.

Additional undesirable impacts of having your website hacked and your site security compromised include getting blacklisted by search engines, having stealthy spam links advertising things like gambling, cheap offers on brand names, etc. inserted in your content and meta data, redirecting visitors to phishing sites or other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and many other nasty things.

The truth is that hackers are trying to hack into your site while you are reading this at this very moment. Whether they can do this successfully or not, depends on how hard or easy you have made things for hackers to keep trying until they either work out a way to break in, or give up and go look for an easier target.

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

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

Hackertarget - Website Security Check(WP Security Check Source: Hackertarget.com)

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

Website Security Check

(WP security scan results. Screenshot source: Hackertarget.com)

It should be obvious after using this tool that if you can see all of this information about your WordPress site, then so can hackers.

Website Security Check(Source: BlogDefender.com)

The ability to see what 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 be useful information to hackers, as this informs them about potential security weaknesses, especially where site owners haven’t updated their sites.

If your site or blog runs on WordPress and you are not preventive steps to harden your site, we can practically guarantee 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 hitting WordPress sites worldwide!

When a website or blog is hacked, webmasters will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been modified or even entirely wiped out. Often, most compromised sites will be infected with malicious scripts or viruses without the owner even being aware that this has taken place.

To help avoid the heartache and frustration of having your site being hacked into, below are ten essential and effective security measures that will help to prevent your WordPress site from being brute-force attacked.

Useful Information

Note: Some of the recommended measures below require some technical understanding of how 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 a professional WordPress service provider for assistance.

***

Security Measure #1 – Get In Touch With Your Web Host

Get in touch with your hosting provider and ask them what systems they have put in place to protect your site from being attacked, and what is done to ensure that your server files and data get backed up.

It is important to check that your webhosting service provider regularly backs up your server files and that, if disaster strikes, you can quickly and easily get back your files and data.

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

You should never rely just on your hosting provider 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 site maintenance routine on a regular basis (e.g. weekly, fortnightly, etc …)

A proper WordPress maintenance routine ensures that:

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

A complete WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WP site fully backed up and updated. WP maintenance is not hard or time-consuming, but it must be done to ensure the security of your website or blog. If you don’t want to learn how to do WordPress maintenance yourself, pay someone to do it but make sure it gets done. Backing up your website 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 many WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Back Up, Duplicate And Keep Your WordPress Website Protected With Backup Creator Plugin For WordPress

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

The brute force attack on WordPress sites was mostly attempting to compromise website admin panels and gain access to the site by exploiting WP installations using “admin” as the username.

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

We have created a step-by-step tutorial created especially for WordPress users that shows you how to change your admin username here: How To Change Your WordPress Admin User Name

Security Measure #4 – Change Your Password

A “brute force” attack occurs when malicious software continually tries to guess the right username and password characters that will unlock your site.

Unless some measure is put into place to stop the brute-force attack (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 breaks into your admin area.

Weak passwords, therefore, make very easy targets for hackers. Make sure that you change your password to a string containing at least 8 characters long, and that includes upper and lowercase letters, combined with a few “special” characters (^%$#&@*).

Useful Tip

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

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

We have created a detailed step-by-step tutorial that shows you how to change your WordPress password here: Changing Your Password

Security Measure #5 – Prevent Access To 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 hackers break into your site, they will search for your wp-config.php file, because this is the file that contains your database information, 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, 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 completely unnecessary after installation and can be removed. If you don’t want to delete these files, just rename them.

Security Measure #7 – Upgrade Your WordPress Site, Plugins & Themes To Their Latest Version

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

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

Security Measure #8 – Disable The Theme Editor

WordPress comes with a built-in editor feature that allows the administrator to edit plugin and theme files from the dashboard area.

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

WP Theme Editor Menu

(Accessing the WordPress theme editor via the WP admin menu)

This allows anyone accessing your site to view and change your WordPress theme template files, or create mayhem on your site.

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

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

By default, this folder is visible to all users online. All someone has to do to see all of the contents in the “uploads” directory is visit your directory using a web browser …

(WordPress uploads directory)

(WordPress uploads folder)

If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, this can threaten the security of your website.

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, uploading a blank index.php file (this is literally a blank file named “index.php”) to your uploads directory, and so on. Again, it’s best to get professional help if you are not sure about what to do.

Security Measure #10 – Install Security Plugins

There are a number of security plugins for WordPress available that will address most common security issues WordPress site owners face, such as preventing hackers from accessing vital areas of your site, protecting your files from malicious scripts, preventing injections of code into files, etc.

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

SecureScanPro - total security software for WordPress

(SecureScanPro – WP total security software solution)

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

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

Blog Defender

Blog Defender Security Suite(Blog Defender)

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

BlogDefender scans you website for potential security weaknesses …

Blog DefenderAnd then shows you how to quickly and easily fix these …

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 WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure web platform, but neglecting basic maintenance tasks like updating your WordPress software, plugins and WP themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.

Regardless of the type 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 cannot ignore.

As one last reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users following the mass brute force attacks 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, website security is very important if you run a WordPress site. Hopefully, this information will help prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

Also, don’t forget to 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.

***

"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

***