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

In April 2013 a large-scale brute force attack hit WordPress installations across almost every host server in existence.

These attacks were caused by computer networks infected with malware and programmed to attack other vulnerable installations (called “botnets”).

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

About 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)

There are many methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site’s administration login username and password. To attempt this, hackers use software tools that automatically tries to guess hundreds of possible logins in minutes.

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

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

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

Botnets are often used to send 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 infecting 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.

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

These botnet attacks on WordPress are well organized and highly distributed. Over 90,000 IP addresses were identified by several hosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress user admin areas. The mass brute-force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

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

WordPress powers millions of websites around the world, which makes it an obvious target for attacks by malicious users

(WordPress is often the target of malicious attacks by hackers, due to its global popularity)

Does This Mean WordPress Is Not Secure And We Should Stop Using It?

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

To understand why WordPress is a secure platform for websites, read this article: Is WordPress Secure?

Important

It’s important to note that, in the case of April 2013 brute-force 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 Brute Force Attacks – 10 Security Checks

Every site with a vulnerability offers some value to hackers. A vulnerable blog offers malicious users with a valuable resource to launch denial of service attacks, spread malware and engage in information theft.

If someone can find a way to break in and take over your blog, that website can then be used as part of a larger network of “bots” to target other valuable websites.

Additional undesirable results of having your site hacked and your site security compromised include being blacklisted by Google, having spammy links promoting things like gambling, cheap offers on brand names, etc. inserted into your content, redirecting visitors to phishing sites or other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasty things.

The truth is that software-driven bots are trying to break into your blog while you are reading this article at this very moment. Whether they will successfully get in or not, depends on how difficult or easy you will make it for hackers and botnets to continue trying until they work out how to get access, or give up and decide to look for a more vulnerable target.

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

If you visit Hackertarget.com and run your website through their WordPress security scan …

WordPress Security Check(Website Security Check Product image: Hackertarget.com)

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

WP Security Check

(Hackertarget – WP security scan results. Screenshot image: Hackertarget.com)

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

Website Security Scan(Image source: Blog Defender)

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

If your website runs on WordPress and you are not taking appropriate steps to harden your site, then it’s practically guaranteed that, at some point in time, someone will attempt to hack your website, because these brute force attacks are systematically targeting WordPress sites around the world!

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

To help avoid the heartache and aggravation (and significant loss of valuable business data) of discovering that your web site has been hacked into, below are 10 essential and effective security measures that will help to prevent your WordPress site from being brute-force attacked.

Info

Note: A few of the recommended measures below require some technical skills 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 search for a WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Webhosting Company

Get in touch with your hosting company and ask them exactly what security systems have been put in place to help prevent your site from being attacked, and what they do to ensure that your site files are regularly being backed up.

Make sure that your web host backs up your sites and that, if disaster strikes, you can easily get back your files.

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

You should never rely just on your host 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 frequently (e.g. weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

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

A complete WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WordPress website or blog 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, pay a professional to do it but make sure it gets done. Backing up your site is the second most important thing you must 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 fully automate your backup process here: Backup, Copy And Protect Your WordPress Websites With Backup Creator Plugin For WP

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

the worldwide brute force attack on WordPress is mostly an attempt to compromise site admin panels and gain access to sites by exploiting sites with “admin” as the account name.

For reasons of website security, avoid installing a WordPress site with the username admin. This is the first area of potential vulnerability hackers will test. If your site’s user name is “admin”, then make sure you change this immediately.

We have created a tutorial for WordPress admin users that shows you how to change your login username here: Changing Your WordPress Admin User Name To A Different User Name

Security Measure #4 – Change Your Password

A “brute force” attack occurs when a malicious script persistently hits a login or password field with different strings of characters 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 (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually “cracks” the code.

Weak passwords, therefore, become very easy targets for attacks. Make sure that you change your password to something that contains at least eight or nine characters long, and that includes upper and lowercase letters, combined with “special” characters (^%$#&@*).

Tip

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

Roboform is a password management software that lets you create strong passwords(Roboform is a password management software you can use to generate different passwords)

We have created a detailed step-by-step tutorial on how to change your WordPress admin password here: What To Do If You Need To Change Your Password In WordPress

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

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

WP Config file

(wp-config.php file)

If hackers break into your website, they will typically look for your wp-config.php file, because this is the file that contains your WordPress database information, security keys, etc. Getting access to this information would allow them 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 your wp-config.php file from being easily accessed. 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 Site Installation Files

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

You can remove these files after installation, as they are unnecessary. If you don’t want to delete 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 in older versions of WordPress that can be exploited, including outdated versions of plugins and themes.

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

Security Measure #8 – Disable Your Theme Editor

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

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

WordPress Theme Editor Menu

(The WordPress theme editor can be accessed via the WP main menu)

The WordPress theme editor allows anyone accessing your site to view and modify your WordPress theme template files, or cause 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 – Prevent Access To The WordPress Uploads Directory

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

Normally, this folder is visible to anyone online. All someone has to do to see all of the contents stored in the “uploads” directory is navigate to your directory using a web browser …

(WordPress uploads folder)

(WordPress has an uploads folder where media content is stored)

If any files stored in his folder have vulnerabilities that can be exploited by hackers, someone could upload unauthorized file types or 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, adding a blank index.php file (this is literally a file with nothing in it called “index.php”) to your uploads directory, and so on. Again, it’s best to get professional assistance if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

There are several security plugins for WordPress available that will address most security issues WordPress site owners face, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site from botnets, preventing injections of code into files, 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 issues that could lead to hackers accessing your files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - complete security software solution for WordPress

(SecureScanPro – security software solution for WordPress)

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

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

Blog Defender Security Solution For WordPress Websites

Blog Defender(Blog Defender Security Product Suite)

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

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

Blog Defender Security SolutionAnd then shows you how to fix these quickly, easily and inexpensively …

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

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting essential maintenance tasks like keeping your WordPress core files, WP plugins and themes up-to-date, tightening file and data protection and taking other necessary precautions can expose your site to attacks by hackers and bots.

No matter what kind of business you run or plan to run online and how small you think your web presence is, website security 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 a security expert to all WordPress users after the large-scale 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 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 professional WordPress technical provider in our WordPress Services Directory.

Also, do yourself a favor and subscribe to WPCompendium.org to receive notifications via email when we publish new tips on WordPress security and tutorials about new WordPress security plugins and solutions.

***

"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

***