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 comes under attack by hackers, due to its popularity.

In 2013 a global brute-force attack hit WordPress installations on almost every WP host server in existence.

These attacks were caused by botnets (networks of infected computers programmed to attack other computers with security vulnerabilities).

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

What Are 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)

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. This can be achieved using software programs that can guess hundreds of possible logins in minutes.

If you’re using weak user names and weak passwords that are easy to guess, your site can be an easy target for hacking attempts.

This is called a “brute-force” attack.

Botnet – What Is This?

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

Botnets are normally used used to send mass spam emails.

Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the globe since 2009 called “Zeus” …

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

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

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

News of this worldwide brute-force attack was reported by all of the major webhosting companiesand 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 powers millions of sites around the world, making it a frequent target for hackers

(WordPress is the world’s most popular content management system which makes it an obvious target for hacking attacks)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are lots of good reasons why you should continue using WordPress if you are concerned at all about the security of your online presence.

To understand what makes WordPress a very secure platform for websites, read this article: How Secure Is WordPress?

Useful 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 web 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 Blog From Brute Force Attacks – Ten Security Points

Every website with a security vulnerability offers some value to hackers. No blog is safe from being targeted. Large, medium and small business sites, personal blogs, government sites … even websites owned by online security and anti-hacking experts can and have been targeted.

If a hacker can discover a security flaw, that website or blog can then be employed to attack more valued sites.

Additional undesirable effects of having your website hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links advertising things like gambling, cheap offers on brand names, etc. inserted into your content and meta data, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The harsh reality is that malicious bots are very likely trying to break into your web site at this very moment. Whether they can be successful will depend on how hard you will make it for them to keep persisting until they find a way to get access, or decide to look for a less secure target.

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

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

WP Security Scan(WP Security Check Screenshot image: Hackertarget.com)

You will see that the check returns various results and information about your site …

Hackertarget - Website Security Check

(WP security scan results. Source: Hackertarget.com)

It should be obvious after using the above tool that if you are able to see all of this information, then hackers can too.

WordPress Security Check(Product image: Blog Defender)

The ability 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 are all valuable information to hackers, as this can inform them about potentially exploitable holes or weaknesses, especially where site owners haven’t updated their sites.

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

When a site gets broken into, webmasters will find themselves “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, sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To avoid the heartache and frustration of discovering that your website has been hacked into, below are ten simple, yet essential and effective security checks that will help to prevent your WordPress site from being attacked by brute-force botnets.

Important Info

Note: Some of the recommended steps listed below require some technical skills to modify core WordPress and/or server files. If you are not technical, 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 Webhosting Service Provider

Get in touch with your webhosting service and ask them what precautions have been put into place to protect your site from brute force attacks, and what is done to make sure that your files and data get backed up.

It is important to check that your host is backing up your server files and that, if disaster strikes, you can quickly and easily recover your site.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Frequently Maintained

You should never rely only on your hosting provider for site backups. Instead, learn how to manage your WordPress site or pay someone to 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 proper WordPress maintenance routine ensures that:

  • All unnecessary data and files are deleted,
  • 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 complete WP maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WP site regularly backed up and up-to-date 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 don’t want to learn how to do WordPress site maintenance yourself, pay a professional to do it but make sure it gets done. Backing up your website 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 files manually, there are a number of plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Back Up, Duplicate And Protect Your WordPress Sites With Backup Creator Plugin For WP

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

The brute force attack on WordPress sites was mostly an attempt to compromise site administrator panels by exploiting WP sites with “admin” as the account name.

For security reasons, avoid setting up a WordPress site 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 tutorial for WordPress users that shows you how to change your admin username, go here: Changing Your WP Admin Username To A Different User Name

Security Measure #4 – Change Your Password

A “brute force” attack occurs when malicious software continually and persistently hits a username and password field with different character strings trying to guess the right combination that will give them entry to your website.

Unless some measure is put into place to prevent the brute-force attack from happening (see further below for a couple of effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually works out the combination.

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

Practical Tip

Roboform is a password software that lets you generate really 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 software tool like Roboform to generate strong passwords)

For a tutorial for WP admin users that shows you how to change your WordPress admin password, go here: How To Change WordPress Passwords

Security Measure #5 – Prevent The wp-config.php File From Being Visible

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

wp-config.php

(WordPress WP Config file)

If hackers break into your WordPress site, they will normally look for the 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 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, you must prevent people getting 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 are completely unnecessary after installation and can be removed. If you don’t want to remove these files, just rename them.

Security Measure #7 – Update Your WordPress Installation, Themes & Plugins

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the dashboard menu)

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

If you want to prevent people from being able to access 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 Your Site’s Uploads Folder

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

By default, this folder is visible to all users online. All a person needs to do to see all of the contents stored in the “uploads” folder is navigate to your directory using their browser …

(WordPress uploads directory)

(WordPress uploads directory)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by malicious users, someone can upload unauthorized file types to your site.

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 an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to hire a professional if you are not sure about what to do.

Security Measure #10 – Install WordPress Security Plugins

A number of security plugins for WordPress are available that will address many common security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital areas of your site, protecting your site from botnets, preventing unauthorized file uploads, etc.

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

SecureScanPro - WP complete security software

(SecureScanPro – WP security software solution)

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

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

Blog Defender WordPress Security Plugin

Blog Defender WordPress Security Plugin(Blog Defender WordPress Security Product Suite)

Blog Defender is a package of WordPress security video tutorials, plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender scans you WordPress site for security vulnerabilities …

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

Blog Defender Security SuiteIf 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 very secure web platform, but neglecting basic maintenance tasks like updating your WordPress software, plugins and themes, tightening file and data protection and taking other necessary precautions can expose your website 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 site is something you cannot afford to ignore.

As a final reminder of the importance of keeping your websites protected, below is the advice given by an expert on web security to all WordPress users after the mass brute-force attacks by botnets 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 very important if you run a WordPress site. Hopefully, the above article has provided you with the initial steps you need to take 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.

Also, do yourself a favor and subscribe to WPCompendium.org to be notified via email when we publish new articles and tutorials on WordPress security and tutorials about new WordPress security plugins.

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com

***

Originally published as How To Protect Your WordPress Site From A Brute-Force Attack.