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 SecurityWhen you are the world’s leading CMS platform and the preferred online publishing platform 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 become a prime target for attacks by hackers wanting to score a “big win”.

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

These attacks were caused by botnets (computer networks infected with viruses and programmed to attack other sites).

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

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 is achieved using software programs that automatically tries to guess hundreds of login combinations in minutes.

If you’re using obvious user names and passwords, your website could 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)

A “Botnet” is a network of private computers that have been compromised and infected with malicious software, which are then controlled remotely as a group, typically without the computer owners’ knowledge or awareness.

Botnets are often used to blast out mass spam emails from computers of compromised user accounts.

Below is a screenshot taken from an internet security monitoring site 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 globe since 2009.

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

The botnet attacks were 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 worldwide attacks then continued, with over 30,000 WordPress sites and blogs being hacked every day.

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

Powering millions of websites and blogs worldwide makes WordPress an obvious target for attacks by malicious users

(WordPress powers millions of sites around the world, which makes it a natural target for attempted attacks by hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

To understand why WordPress is a secure web platform, see this article: Why WordPress Is A Secure Platform For Websites –

Info

It’s important to note that, in the case of April 2013 mass brute-force botnet attack described above, was no specific vulnerability in WordPress being exploited (the same script was also attacking sites built using other web platforms 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)

Preventing Your WordPress Website From Brute Force Attacks – Ten Security Points

You may think that your website or blog provides no value to hackers, but the reality is that to a hacker, all websites are an opportunity to profit or benefit at your expense.

If hackers can find a software weakness in your security, your web site can then be used to target other highly-valued web sites.

Additional undesirable results of being hacked and your site security compromised include being blacklisted by search engines, having spammy links promoting things like online meds, porn, etc. in your content, redirecting visitors to phishing sites or other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and lots of other nasties.

The harsh reality is that hackers are probably trying to break into your website while you are reading this page at this very moment. Whether they can achieve this or not, depends on how hard or easy you have made it for hackers to continue trying until they discover a way to get in, or are forced to decide to look for a less secure 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 …

WP Security Scan(Hackertarget – WP Security Scan Product image: https://hackertarget.com/wordpress-security-scan)

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

WordPress Security Scan

(Hackertarget – WP security check results. Screenshot source: Hackertarget.com)

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

Hackertarget - WP Security Check(Product image: Blog Defender)

Being able 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 on your server can be useful information to hackers, as this informs them about potentially exploitable security vulnerabilities, especially in older versions.

If your website is powered by WordPress and you are not precautionary 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 brute-force attacks are systematically hitting WordPress sites around the world!

Typically, whenever a site gets broken into, webmasters will find themselves completely “locked out” of their own site, or notice that their content has been modified or even entirely wiped out. Typically, most compromised sites will become infected with malicious software or viruses without the owner even being aware that this has taken place.

To avoid the heartache (and potential loss of valuable business data) of discovering that your website has been hacked into, below are ten simple, yet essential and effective security measures that will help to protect your WordPress site from being attacked by brute-force botnet hacking attempts.

Useful Information

Note: A few of the steps below require some technical understanding of how 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 assistance.

***

Security Measure #1 – Get In Touch With Your Web Host

Contact your hosting company and ask them exactly what systems have been put into place to protect your site from brute-force attacks, and what they are doing to ensure that your server files are being regularly backed up.

It is important to make sure that your host backs up your server files and that, if anything happens, you can quickly and easily get back your site.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Regularly Maintained

You should never rely only on your web host for your site backups. Instead, learn how to maintain your WordPress site or pay someone to get this done for you and develop a habit of performing a full 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 WP themes, plugins and software components are up-to-date,
  • etc …

A full WP site maintenance routine looks like this …

Maintaining your WordPress website backed up and updated is vitally important for WordPress security.(Maintaining your WP website regularly backed up and updated is vitally important for WordPress security. Image source: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WP installation completely backed up and updated is. WP 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 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 you still have a pulse!

If you don’t want to back up your site manually, there are many plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Back Up, Clone & Keep Your WordPress Web Site Protected With Backup Creator Plugin For WP

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

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

For reasons of website security, avoid setting up a WordPress site with the username admin. This is the first thing hackers will test. If your blog’s username is admin, then change it immediately.

For a simple tutorial created especially for non-technical admin users on how to change your username, go here: Changing Your WordPress Admin User Name

Security Measure #4 – Use Strong Passwords

A “brute force” attack occurs when malicious software continually tries to guess the right password and username characters that will unlock your site.

Unless you put some measure in place to stop the brute-force attack from happening (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just keep attacking your site until it eventually breaks into your admin area.

Weak passwords, therefore, are really easy targets for hacking attacks. Make sure that you change your password to something that contains at least 8 or 9 characters long, with upper and lowercase letters, and “special” characters (%^#$@&*).

Useful Tip

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

You can use a password management tool like Roboform to create strong login passwords(Roboform is a password management program that lets you create really secure passwords)

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

Security Measure #5 – Prevent Your wp-config.php File From Being Found

The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced options for WordPress.

wp-config.php

(wp-config.php file)

If hackers break into your site, they will typically look for the wp-config.php file, because this is the file that 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, prevent people from being able to easily access 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 – Rename Or Delete Unnecessary Installation Files

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

You can remove these files after installation. If you don’t want to remove these files, then just rename them.

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

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

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 feature that allows administrators to edit theme and plugin files from the dashboard.

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

WordPress Theme Editor Menu

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

The WordPress theme editor allows anyone accessing your site to view and edit all of your theme files, and cause havoc on your site.

To prevent people from accessing 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 Site’s Uploads Directory

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

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

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

(WordPress uploads directory)

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

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

Security Measure #10 – Install WordPress Security Plugins

There are a number of security plugins for WordPress available that will address common security issues faced by WordPress site owners, such as preventing hackers from accessing your site, protecting your files from brute-force attacks, preventing injections of code into files, etc.

Many 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 - WP security software

(SecureScanPro – complete security software solution for WordPress)

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

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

Blog Defender

Blog Defender WordPress Security Product Suite(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 the security weaknesses in your website are …

Blog Defender Security Suite For WordPressAnd then shows you how to fix these quickly …

Blog Defender Security Product Suite For WordPress Websites & BlogsIf you don’t want to purchase a premium 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 very secure platform, but neglecting simple maintenance tasks like keeping your WordPress software, plugins and themes up-to-date, 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, you cannot afford to ignore the importance of web security.

As one last reminder of the importance of website security, below is the advice given by an expert on website security to all WordPress users after the large-scale brute-force attacks 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 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 professional WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

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

***

"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum

***