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 SecurityPowering millions of sites around the world makes WordPress a frequent target for hackers.

In early 2013, WordPress installations around the world were subjected to mass brute force attacks.

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

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)

One of the many ways hackers will attempt to break into a WordPress site is by trying to guess the site admin’s login username and password. To attempt this, hackers use scripts and tools that can work through hundreds of possible login combinations in minutes.

If you’re using easy-to-guess login details, your website could be an easy target for hackers.

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

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

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

The screenshot below was 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 compromising 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. Screenshot source: SecureList.com)

These botnet attacks are well organized and highly distributed. Over 90,000 IP addresses were identified by a number of hosting companies in the initial attack alone, when millions of attempts to force their way into WordPress site admin areas took place. The attack continued after this, with over 30,000 WordPress sites and blogs being hacked per day.

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

WordPress often is targeted by hackers

(Being the world’s most used content management system makes WordPress an obvious target for hacking attacks)

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

No. In fact, there are many good reasons why you should choose 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, see this article: Is WordPress A Secure Website Platform?

Useful Info

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

Mike Little, one of the co-founders of WordPress, made this comment about the botnet 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)

How To Protect Your WordPress Blog From Brute-Force Attacks – 10 Security Points

You may think that your website is of little value to hackers, but the reality is that to a hacker, every website is an opportunity to profit or benefit at your expense.

If hackers can hack and take over your blog, that website or blog can then be used to target other highly-valued sites.

Additional undesirable impacts of being hacked include being blacklisted by Google, having spammy links promoting things like gambling, discounted fashion, etc. inserted into your content and page title and descriptions, redirecting visitors to phishing sites and other websites, drive-by downloads (adding malware on your visitors’ computers), and lots of other nasties.

The harsh reality is that brute-force software bots are probably looking for security exploits and trying to break into your website at this very moment. Whether they will successfully break in will depend on how hard you can make things for hackers and bots to keep trying until they find a way to break in, or give up and go look for an easier target.

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

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

Hackertarget - WP Security Scan(Hackertarget – Website Security Check Screenshot source: Hackertarget.com)

You will see that the scan will return a number of results and information about your WordPress installation …

Hackertarget - WordPress Security Scan

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

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

Website Security Scan(Screenshot source: Blog Defender)

Being able 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 can be potentially valuable information to hackers, as this informs them about potential security vulnerabilities, especially where the owners haven’t updated their sites.

If your site or blog is driven by WordPress and you are not taking 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 installations around the world!

When a website or blog gets broken into, webmasters will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been altered or that everything has been entirely wiped out. Typically, most compromised sites will become infected with malicious software without the owner even being aware that this has occurred.

To avoid the heartache and aggravation of discovering that your web site has been hacked into, we have listed below ten essential and effective security measures that will help to protect your WordPress site from brute-force attacks.

Important Info

Note: A few of the recommended measures listed below require some technical skills to modify core WordPress and server files. If you are not technical-minded, or don’t want to mess around with file code, then ask your web host or a professional WordPress technical provider for assistance.

***

Security Measure #1 – Contact Your Host

Contact your hosting provider and ask them what measures have been put into place to protect your site from being attacked, and what they do to make sure that your server files and data get backed up.

It is important to make sure that your hosting provider is backing up your sites and that, if disaster strikes, you can easily recover your files and data.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Regularly Updated

Never rely just on your webhosting provider for site backups. Instead, learn how to maintain your WordPress site or get this service done for you and develop a habit of religiously performing a full site maintenance routine on a regular basis (e.g. weekly, monthly, etc …)

A full WordPress maintenance routine ensures that:

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

A proper WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WP site regularly 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. 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 second most important thing you should do after making sure that you are still breathing!

If you don’t want to perform manual backups, there are a number of WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Back Up, Duplicate & Keep Your WP Web Site Protected With Backup Creator Plugin For WordPress

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

the worldwide brute-force botnet attack on WordPress sites was mostly attempting to compromise website admin panels by exploiting WP sites with “admin” as their username.

For reasons of website security, never install sites with the username “admin”. This is the first area hackers will test. If your site’s user name is admin, change this immediately.

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

Security Measure #4 – Use Strong Passwords

A “brute force” attack occurs when a malicious script continually tries to guess the right password and username character string that will give the hacker access to your website.

Unless you put some measure in place to stop the brute force attack (see further below for a couple of simple and effective ways to do this), the “bot” will just continue to attack your site until it eventually “cracks” the code.

Weak passwords, therefore, are very easy targets for botnets. Make sure that you change your password combination to something containing at least eight or nine characters long, with upper and lowercase letters, combined with a few “special” characters (e.g. ^, #, &, etc).

Tip

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

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

For a simple tutorial on how to change your password, go here: How To Reset The Login Password

Security Measure #5 – Prevent Access To 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.php

(wp-config.php)

If hackers break into your site, they will typically look for 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 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, you must prevent people finding 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

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 delete these files, just rename them.

Security Measure #7 – Upgrade Your WordPress Blog, Themes & Plugins To Their Latest Version

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

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

Security Measure #8 – Disable The Theme Editor

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

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

WordPress Theme Editor Menu

(The WordPress theme editor is accessible via the WP main menu)

This allows anyone accessing your site to view and modify your theme template files, or create havoc on your site.

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 – Prevent Access To Your Site’s Uploads Directory

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

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

(WordPress has an uploads folder where all of your media files are stored)

(WordPress uploads folder)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers, someone could upload unauthorized file types to 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, adding 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 use a professional if you are not sure about what to do.

Security Measure #10 – WordPress Security Plugins

There are a number of great WordPress security plugins available that will address many common security issues faced by WordPress website owners, such as preventing hackers from accessing vital areas of your site, protecting your website from botnets, preventing injections of code into files, 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 issues that could lead to hackers accessing your website files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - security software for WordPress

(SecureScanPro – WordPress security software)

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

Blog Defender WordPress Security Plugin

Blog Defender WordPress Security Solution(Blog Defender)

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

BlogDefender shows you where potential security weaknesses in your web site are …

Blog Defender WordPress Security SuiteAnd lets you fix these quickly, easily and inexpensively …

Blog Defender Security Suite For WordPressIf you don’t want to purchase a premium 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 web platform, but neglecting simple maintenance tasks like updating your WordPress software, WP plugins and 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 securing your website or blog.

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 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 information will help keep your WordPress site protected from brute-force attacks. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

Also, don’t forget to subscribe to WPCompendium.org to receive notifications via email whenever we publish new information on WordPress security and tutorials about new security plugins and solutions.

***

"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

***