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 often is targeted by hackers.

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

These attacks were caused by computers infected with viruses and programmed to attack other vulnerable computers, also commonly known as “botnets”.

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

Brute-Force Attacks – Definition

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. This can be done using scripts and tools that automatically tries to guess hundreds of login permutations in minutes.

If you’re using obvious usernames and predictable passwords, your website could be easily hacked by repeated attempts to work out your site’s login details.

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

A “Botnet” is a network of computers that have been compromised and infected with malicious software, which are then controlled remotely as a group, typically without the unsuspecting computer owners even being aware that this is going on in their device.

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

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 infecting computer networks all around the globe since 2009 called “Zeus” …

The Zeus botnet has been actively compromising computer networks all around the world since 2009.

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

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

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

Being the world's most used content management system makes WordPress a target for attempted attacks by malicious users

(WordPress often is targeted by hackers, due to its global popularity)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are many good reasons why you should choose WordPress if you are concerned at all about the security of your website.

To understand why WordPress is a secure platform for websites, see this article: Is WordPress A Secure Website Platform?

Important Info

It’s important to understand that, in the case of April 2013 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 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 – Ten Security Measures

Every site with a vulnerability has some value to hackers. No blog is safe from being attacked by hackers. Large, medium and small web sites, personal blogs, government sites … even websites owned by web security experts can and have been targeted.

If a hacker can find a web software weakness that allows them to access and control your blog, the site can then be employed to attack other valued sites.

Additional undesirable effects of having your website hacked and your site security compromised include getting blacklisted by search engines, having spammy links promoting things like online meds, discounted fashion, etc. in your content, malicious redirects to phishing sites and other websites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasties.

The reality is that hackers are looking for security exploits and trying to hack into your blog while you are reading this article right now. Whether they will achieve this or not, will depend on how hard you can make it for them to continue trying until they can either discover a way to get in, or give up and 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 scan …

WP Security Scan(Hackertarget – Website Security Scan Screenshot image: Hackertarget.com)

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

Hackertarget - Website Security Scan

(website security check results. Image source: Hackertarget.com)

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

WordPress Security Scan(Product image: BlogDefender site)

Being able 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 in your site are all valuable information to hackers, as this can inform them about potentially exploitable vulnerabilities, especially where the owners haven’t updated their sites.

If your website is powered by WordPress and you are not proactive steps to bullet-proof your site, it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your installation, because these brute force attacks are systematically targeting WordPress installations worldwide!

Typically, when a website or blog gets hacked, site owners will find themselves “locked out” of their own site, or notice that their files have been altered or even entirely wiped out. Typically, most sites will become infected with malicious software without the owner even being aware that this has taken place.

To help avoid the heartache and aggravation (and potential loss of valuable business data) of having your web site being hacked into, below are ten simple, yet essential and effective security measures that will help to protect your WordPress site from brute force attacks.

Note

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

***

Security Measure #1 – Contact Your Hosting Provider

Contact your hosting service and ask them what systems they offer to protect your site from brute-force attacks, and what is done to make sure that your site files get regularly backed up.

Make sure that your host is backing up your sites and that, if anything should happen, you can quickly and easily get your files back.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Frequently Up-To-Date

You should never rely on your hosting 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. daily, weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

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

A full WordPress site maintenance routine looks like this …

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

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

If you don’t want to perform manual backups, there are many plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Backup, Clone & Protect Your WP Sites With Backup Creator Plugin For WP

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

The large scale brute-force botnet attack on WordPress sites was mostly an attempt to compromise site administrator panels by exploiting WP sites with “admin” as the username.

For security reasons, never set up WordPress sites with the username admin. This is the first area of potential vulnerability hackers will test. If your site’s username is admin, then change this immediately.

For a simple tutorial for WP admin users on how to change your WordPress username, go here: How To Change Your WP Admin User Name To A Different User Name

Security Measure #4 – Your Password

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

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

Weak passwords, therefore, are very easy targets for brute-force attacks. Make sure that you change your password to something containing at least 8 or 9 characters long, with both upper and lowercase letters, combined with a few “special” characters (e.g. %, $, *, etc).

Tip

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

Roboform is a password management software that lets you create strong passwords(You can use a password tool like Roboform to generate very secure passwords)

For a tutorial for non-technical WordPress admin users that shows you how to change your login password, go here: What To Do If You Need To Change Your Login Password

Security Measure #5 – Secure 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 file

(wp-config.php)

If a hacker breaks into your WordPress website, they will normally try to access your wp-config.php file, because this file contains important information about your site’s database, 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 being attacked and even being used as part of a bot net, therefore, prevent people from being able to easily access 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 – Rename Or Delete Unnecessary Installation Files

Rename or delete the install.php, upgrade.php and readme.html files from your server.

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

Security Measure #7 – Keep Your WordPress Installation, Themes & Plugins Up-To-Date

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

Make sure to keep your WordPress installation files, themes, plugins, etc. up-to-date.

Security Measure #8 – Disable The Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor via the WordPress main menu)

The WordPress theme editor feature allows anyone accessing your blog to view and modify all of your WordPress theme files, 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 Your WordPress Uploads Folder

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

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

(WordPress uploads directory)

(WordPress uploads directory)

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, adding 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 ask help from someone with experience if you are unsure about what to do.

Security Measure #10 – Install Security Plugins

A number of great security plugins for WordPress are available that specifically address most common security issues faced by WordPress site owners, 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 website files and causing damage to your site is SecureScanPro.

SecureScanPro - security plugin for WordPress

(SecureScanPro – WordPress total security software solution)

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

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

Blog Defender Security Suite

Blog Defender(Blog Defender)

This product is a package of WordPress security video tutorials, WordPress plugins and tools, plus a WordPress security PDF/DOC file.

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

Blog Defender WordPress Security PluginAnd then shows you how to quickly and easily fix these …

Blog Defender Security Solution For WordPressIf you don’t want to invest in 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 secure platform, but neglecting simple maintenance tasks like updating your WordPress software, WordPress plugins and WordPress themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.

No matter what kind 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 one last reminder, below is the advice given by an expert on website security to all WordPress users after the worldwide 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, website security is very important if you run a WordPress site. Hopefully, the information in this article has provided you with the initial guidelines and help you need to keep your WordPress site protected from brute force attacks. If you need any further help or assistance with WordPress security, please consult a WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications via email when we publish new articles and tutorials on WordPress security and tutorials about new security plugins.

***

"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group

***