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 a target for hacking attacks.

In early 2013, WordPress installations around the world were subjected to a global-scale brute force attack.

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

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 methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. This can be done using software tools and scripts that can work through hundreds of login combinations in minutes.

If you’re not using strong usernames or unguessable passwords, your website could be an easy target for hacking attempts.

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

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

A “Botnet” is a network of computers that have been infected with malicious software, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is going on.

Botnets are often used to send out 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 world since 2009 called “Zeus” …

ZeuS is 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. Source: SecureList.com)

These botnet attacks on WordPress sites are well organized and highly distributed. 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 site admin areas occurred. The brute-force attacks then continued, with over 30,000 WordPress sites and blogs being hacked per day.

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

WordPress often is targeted by hackers, due to its popularity

(WordPress is the world’s most popular CMS which makes it a frequent target for hackers)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are many great reasons why you should choose WordPress if you are concerned about the security of your online presence.

We explain why WordPress is a secure platform for websites in this article: How Secure Is WordPress?

Important

It’s important to note that, in the case of April 2013 brute-force botnet attack described above, was no specific vulnerability in WordPress being exploited (the same script was also targeting sites built using other applications like Joomla).

Mike Little, the co-founder 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 Being Brute-Force Attacked – Ten Security Points

Every web site with a vulnerability has value to hackers. An unsecured site presents malicious users with a platform for launching DDoS attacks, spreading malware and engaging in information theft.

If a hacker can exploit a flaw in your web software and compromise the control of your website or blog, the website or blog can then be employed to attack larger and more highly-valued websites.

Additional undesirable effects of being hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links advertising things like gambling, discounted fashion, etc. inserted into your content, redirecting visitors to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The reality is that brute-force software bots are probably trying to break into your blog at this very moment. Whether they can hack in successfully will depend on how hard or easy you can make it for hackers or bots to keep persisting until they work out a way to get access, or are forced to give up and decide to look for an easier target.

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

If you visit a site like Hackertarget.com and run your website through their WordPress security check …

Hackertarget - WordPress Security Scan(WP Security Scan Screenshot source: Hackertarget.com)

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

Hackertarget - WordPress Security Check

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

It should be obvious after using the above tool that if you can see all of this information about your WordPress website, then hackers can too.

Hackertarget - Website Security Check(Screenshot source: BlogDefender website)

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 useful information to hackers, as this informs them about any vulnerabilities, especially in older versions.

If your website runs on WordPress and you’re not taking steps to harden your site, then it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your installation, because these attacks are systematically hitting WordPress installations worldwide!

When a website or blog gets broken into, webmasters can find themselves “locked out” of their own site, or notice that their content has been altered or even entirely wiped out. Often, sites will be infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache and frustration that comes with having your website or blog being hacked into, below are 10 essential and effective security checks that will help to prevent your WordPress site from brute-force attacks.

Useful Info

Note: A few of the measures listed below require some technical skills 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 service provider for help.

***

Security Measure #1 – Contact Your Webhosting Company

Contact your hosting provider and ask them what systems have been put into place to protect your site from brute force attacks, and what is done to ensure that your WordPress sites are being regularly backed up.

Check that your webhosting service provider backs up your sites and that, if disaster strikes, you can quickly and easily recover your files.

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

You should never rely just on your webhosting company for site backups. Instead, learn how to manage your WordPress site or pay someone to get this service done for you and develop a habit of religiously performing a full site maintenance routine frequently (e.g. weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WordPress web site fully backed up and updated is. WordPress site maintenance is not hard or time-consuming, but it must be done to ensure the security of your website. If you do not want to learn how to do WP maintenance yourself, pay someone to do it but make sure this gets done. Backing up your site is the next most important thing you should 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 automate your backup process here: Back Up, Duplicate & Keep Your WordPress Web Sites Protected With Backup Creator WP Plugin

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

the worldwide brute-force botnet attack on WordPress sites was mostly attempting to compromise site admin panels by exploiting installations using “admin” as their account name.

For website security purposes, don’t set up sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your blog’s user name is “admin”, then change this immediately.

For a simple tutorial that shows you how to change your username, go here: How To Change Your WP Username From Admin To A More Secure User Name

Security Measure #4 – Choose A Strong Password

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

Unless some measure is put into place to stop the brute force attack (see further below for a couple of effective ways to do this), the “bot” will just continue to attack your site until it eventually works out the combination.

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

Practical Tip

If you have trouble coming up with strong passwords or you are reluctant to set up different passwords for all your online logins, then use a password management software tool like Roboform …

Roboform is a password program you can use to create different strong login passwords(Roboform is a password program you can use to help you generate different passwords)

For a tutorial on how to change your admin password, go here: What To Do If You Need To Change A Password In WordPress

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

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

wp-config.php

(wp-config.php file)

If a hacker breaks into your WordPress website, they will typically try to access the wp-config.php file, because this is the file that contains your WordPress database details, 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 attacks and even being used as part of a bot net, therefore, prevent people viewing 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 WordPress 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 remove these files, then just rename them.

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

Hackers are always on the lookout for vulnerabilities they can exploit in outdated WordPress versions, including outdated versions of themes and plugins.

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

Security Measure #8 – Disable The Theme Editor

WordPress installations come with a built-in editor that lets administrators edit plugin and theme code inside the dashboard.

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

WP Theme Editor Menu

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

This means that anyone logging into your site can view and modify your files, or create mayhem on your site.

To prevent 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 – Prevent Access To The WordPress Uploads Directory

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

Normally, this folder is visible to anyone online. All a person needs to do to see the contents stored in your “uploads” directory is visit your directory using a web browser …

(WordPress uploads folder)

(WordPress uploads directory)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, this could compromise 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 an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to use a professional if you are unsure about what to do.

Security Measure #10 – Use Security Plugins

A number of security plugins for WordPress are available that specifically address most common security issues faced by WordPress site owners, such as preventing hackers from gaining access to vital areas of your site, protecting your site from malicious scripts, preventing unauthorized file uploads, etc.

Most 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 potential issues that could lead to hackers accessing your site files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - total security software for WordPress

(SecureScanPro – complete security plugin for WordPress)

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 great security plugin you may want to consider using is BlogDefender.

Blog Defender

Blog Defender(Blog Defender)

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

BlogDefender scans you website for security weaknesses …

Blog Defender Security Product SuiteAnd then shows you how to quickly fix these …

Blog DefenderIf you don’t want to buy a security plugin like SecureScanPro or BlogDefender, then use various free plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting simple 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.

No matter what 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 securing your site.

As one last reminder, below is the advice given by a security expert to all WordPress users following 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 of the utmost importance if you run a WordPress site. Hopefully, this article has given you the initial guidelines and help you need 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.

We also recommend subscribing to WPCompendium.org to receive notifications whenever we publish new tips on WordPress security and tutorials about WordPress security plugins and solutions.

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)

***