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 SecurityWhen you are the world’s leading content management system and the online publishing platform of choice used by millions of businesses and loved by thousands of website developers and web designers, it’s inevitable that at some point in time, WordPress will come under attack from hackers.

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

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

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)

There are many methods hackers use to try and break into WordPress sites. One of these is by trying to guess the site’s administration login username and password. This can be done with software tools that can work through hundreds of possible login combinations in minutes.

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

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.org)

”Botnets” are networks of private computers that have been compromised and infected with malicious scripts or software code, which are then controlled remotely as a group, often without the computer owners even being aware of this.

Botnets are typically used to send out mass spam emails.

The screenshot below was taken from a site that monitors online security 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 compromising computer networks all around the world since 2009.

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

These were well organized and highly distributed botnet attacks. Over 90,000 IP addresses were identified by a number of webhosting companies just in the initial attack, when millions of attempts to force their way into WordPress users admin areas occurred. The worldwide attack then continued, with over 30,000 WordPress blogs being hacked per day.

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

WordPress powers millions of sites around the world, making it an obvious target for attempted hacking attacks

(WordPress powers millions of sites worldwide, making it an obvious target for attacks by hackers)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are lots of good reasons why you should continue using WordPress if you are concerned about website security.

To learn why WordPress is a secure platform for websites, see this article: How Secure Is WordPress?

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 applications like Joomla).

Mike Little, the co-founder of WordPress, 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 Being Brute-Force Attacked – 10 Security Checks

You may think that the information in your website or blog has no value to hackers, but the reality is that all websites are valuable to a malicious user.

If a malicious user can discover a web software weakness, your blog can then be used as part of a larger network of “bots” to target other valued web sites.

Additional undesirable effects of having your website hacked include getting blacklisted by Google, having spammy links promoting things like casinos, porn, etc. in your content and page title and descriptions, redirecting visitors to phishing sites, drive-by downloads (adding malicious software on your visitors’ computers), and lots of other nasty things.

The reality is that brute-force software bots are scouring for vulnerabilities and trying to hack into your web site while you are reading this. Whether they will successfully get in depends on how hard you can make things for hackers or botnets to continue persisting until they can either find a way to break in, or are forced to decide to look for an easier 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 – Website Security Check Screenshot source: Hackertarget.com)

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

Hackertarget - WP Security Scan

(Hackertarget – WordPress security check results. Screenshot image: Hackertarget.com)

It should be obvious after using the tool shown above that if you are able to see all of this information about your WordPress site, so can hackers.

WordPress Security Check(Image source: BlogDefender site)

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 can all be valuable information to hackers, as these can inform them about any security weaknesses, especially in older versions.

If your site or blog runs on WordPress and you’re not precautionary steps to toughen up your site, then 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 is hacked, webmasters can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been altered or even entirely wiped out. Often, sites will become infected with malicious scripts without the owner even being aware that a security breach has occurred.

To avoid the heartache that comes with discovering that your site has been hacked into, below are ten simple, yet essential and effective security measures that will help to prevent your WordPress site from being brute force attacked.

Important Info

Note: Some of the steps listed below need some technical skills to modify core WordPress or server files. If you have no web 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 – Get In Touch With Your Webhosting Service

Get in touch with your webhosting service provider and ask them exactly what systems have been put in place to protect your site from being attacked, and what is done to make sure that your server files get backed up.

Make sure that your host backs up your sites and that, if anything happens, you can quickly and easily get your site back.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Regularly Maintained

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

A proper WordPress maintenance routine ensures that:

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

A complete WP maintenance routine looks like this …

Maintaining your WP site backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP website or blog completely backed up and updated is vitally important for WordPress security. Screenshot image: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WP installation frequently backed up and updated is. 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 don’t want to learn how to do WordPress site maintenance yourself, get someone else to do it but make sure this 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 a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Duplicate & Protect Your WordPress Websites With Backup Creator Plugin For WP

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

The brute force botnet attack on WordPress is mostly attempting to compromise website admin panels by exploiting installations that used “admin” as the user name.

For website security reasons, avoid installing sites with the username admin. This is the first thing hackers will test. If your blog’s user name is admin, you should change this immediately.

We have created a simple tutorial on how to change your username here: Changing Your Admin User Name In WordPress To A Different User Name

Security Measure #4 – Your Password

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 them access to your site.

Unless some measure is put into place to block 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 “cracks” the code.

Weak passwords, therefore, are really easy targets for bot attacks. Make sure that you change your password combination to something that contains at least 8 characters long, with upper and lowercase letters, and add a few “special” characters (e.g. ^, #, *, etc).

Tip

Roboform is a password management tool that lets you create different passwords …

Roboform is a password software that lets you easily generate very secure passwords(You can use a password program like Roboform to generate secure login passwords)

For a simple tutorial that shows you how to change your password, go here: Changing WordPress Passwords

Security Measure #5 – Prevent Access To The wp-config.php File

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

wp-config.php

(wp-config.php file)

If a hacker breaks into your website, they will normally search 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 a hacker 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 – Delete Or Rename Unnecessary Installation Files

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

These files are completely unnecessary after installation and can be deleted. If you don’t want to delete these files, just rename them.

Security Measure #7 – Update Your WordPress Files, Themes And Plugins

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

Make sure to always keep all of your installation files, plugins, themes, etc. up-to-date.

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WordPress Theme Editor Menu

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

This means that anyone logging into your blog’s admin can see and make changes to all of your WordPress theme files, or cause havoc on your site.

If you want to prevent unauthorized people from being able to access the WordPress Theme editor, you will need to disable it. This can be done by adding code to your wp-config.php file.

Security Measure #9 – Remove Access To The WordPress Uploads Folder

The WordPress “uploads” folder stores all the media that gets uploaded to your site.

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

(WordPress uploads directory)

(WordPress uploads folder)

If any files stored in his folder have vulnerabilities that can be exploited by hackers, someone can upload unauthorized file types or compromise the security of your site.

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

Security Measure #10 – Install WordPress Security Plugins

Several WordPress security plugins are available that specifically address most security issues faced by WordPress website owners, such as preventing hackers from accessing your site, protecting your files from malicious scripts, preventing unauthorized file uploads, etc.

Most 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 site files and causing damage to your site is SecureScanPro.

SecureScanPro - WordPress total security software

(SecureScanPro – WP security software)

SecureScanPro is easy to install and easy to use, and takes care of 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 Solution

Blog Defender Security Suite For WordPress Blogs(Blog Defender Security Plugin)

Blog Defender 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 Security Plugin For WordPress SitesAnd lets you fix these quickly …

Blog DefenderIf you don’t want to purchase a premium 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 platform, but neglecting basic maintenance tasks like keeping your WP core files, plugins and themes up-to-date, 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, you simply cannot ignore the importance of website security.

As one last reminder, below is the advice given by an expert on website security to all WordPress users following the mass 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 of the utmost importance 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 seek help from a WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

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

***

"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya

***