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 SecurityWordPress powers millions of sites worldwide, which makes it an easy target for hacking attacks.

In early 2013 a global brute force attack began hitting WordPress installations on virtually every WP host server in existence around the world.

These attacks were caused by networks of infected computers programmed to attack other vulnerable installations (called “botnets”).

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

What Are 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 WordPress sites. One of these is by trying to guess the site’s administration login username and password. To achieve 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 could be an easy target for hackers.

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

A “Botnet” is a network of private computers that have been infected with malicious scripts or 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 regularly used to blast 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 compromising computer networks all around the world since 2009.

(ZeuS is a botnet that has been actively compromising computer networks all around the globe since 2009. Source: SecureList.com)

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

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

WordPress powers millions of sites worldwide, which makes it a target for hackers

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

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are many good reasons why you should use WordPress if you are concerned at all about website security.

We explain why WordPress is a secure platform for websites in this article: Why WordPress Is A Secure Platform For Websites –

Important

It’s important to understand that, in the case of the brute force attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using platforms like Joomla).

Mike Little, one of the co-founders 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 Blog From Brute-Force Attacks – Ten Security Points

You may think that your website or blog has no significant value to hackers, but the reality is that to a hacker, all websites are an opportunity to gain some advantage at your expense.

If hackers can exploit a software vulnerability in your security, the website or blog can then be used as part of a larger network of “bots” to target more valued web sites.

Additional undesirable impacts of being hacked and your site security compromised include getting blacklisted by Google, having spammy links promoting things like casinos, cheap offers on brand names, etc. inserted in your content and page title and descriptions, malicious redirects to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasty things.

The harsh reality is that brute-force software bots are very likely looking for exploits and trying to break into your website or blog right now. Whether they can break into your site successfully or not, depends on how hard or easy you can make it for hackers to continue trying until they either work out a way to get in, or give up and decide to look for a more vulnerable target.

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

Do you own a WordPress site? If so, visit a site like Hackertarget.com and run your website through their WordPress security check …

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

You will see that the check will return various results and details about your website …

WordPress Security Scan

(Hackertarget – website security scan results. Image source: Hackertarget.com)

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

Hackertarget - Website Security Scan(Source: BlogDefender site)

Being able to see which version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories can be useful information to hackers, as these can inform them about any security weaknesses, especially where the owners haven’t updated their sites.

If your website runs on WordPress and you are not taking steps to bolster the security of your site, then we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically targeting WordPress sites worldwide!

Whenever a site gets compromised, webmasters will find themselves “locked out” of their own site, or notice that their files have been modified or that everything has been entirely wiped out. Often, sites will become infected with malicious software or viruses without the owner’s knowledge or awareness.

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

Useful Information

Note: A few of the recommended measures shown below require some technical skills to modify core WordPress and/or 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 service provider for help.

***

Security Measure #1 – Get In Touch With Your Host

Contact your host and ask them exactly what systems have been put into place to protect your site from brute-force attacks, and what is done to ensure that your files and data get backed up.

Check that your hosting service backs up your sites and that, if anything should happen, you can easily get your files back.

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

Never rely on your web host for site backups. Instead, learn how to maintain your WordPress site or pay someone to get this service done for you and maintain a habit of religiously performing a full WordPress site maintenance routine on a frequent basis (e.g. daily, weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

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

A full WP maintenance routine looks like this …

Maintaining your WordPress website or blog regularly backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website completely backed up and updated is vitally important for WordPress security. Screenshot source: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WordPress website or blog fully backed up and updated is. WP 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 WordPress maintenance yourself, pay someone to do it but make sure this gets done. Backing up your website is the next 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 a number of plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Backup, Copy And Protect Your WP Site With Backup Creator Plugin For WP

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

The large scale brute-force attack on WordPress sites was mostly an attempt to compromise website administrator panels and gain access to the site by exploiting installations that used “admin” as their user name.

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

For a simple tutorial that shows you how to change your admin username, go here: How To Change Your Admin Username In WordPress

Security Measure #4 – Choose A Strong Password

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

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

Passwords that are easy to guess, therefore, become very easy targets for hackers. Make sure that you change your password to something containing at least eight characters long, with upper and lowercase letters, and add a few “special” characters (e.g. %, $, *, etc).

Useful Tip

You can use a password tool like Roboform to generate very secure passwords …

Roboform is a password tool that lets you easily create very secure passwords(You can use a password program like Roboform to generate hard-to-crack passwords)

We have created a step-by-step tutorial that shows you how to change your login password here: What To Do If You Need To Reset Your Password

Security Measure #5 – Secure Your WP Config 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 file

(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 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 easily accessible. 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

Delete or rename 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, then just rename them.

Security Measure #7 – Keep Your WordPress Files, Themes And Plugins Up-To-Date

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

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

Security Measure #8 – Disable The Theme Editor

WordPress comes with a built-in editor feature that allows administrators to edit plugin and theme code inside the dashboard area.

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

WordPress Theme Editor Menu

(The WordPress theme editor is accessible via the admin menu)

The WordPress theme editor allows anyone accessing your blog’s admin to view and modify your WP theme files, and create mayhem 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 – Secure Your Site’s Uploads Folder

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

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

(WordPress uploads folder)

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

If any directories in your website have weaknesses or vulnerabilities that can be exploited by malicious users, this could become a serious threat to the security of your website.

Protecting your directories will prevent online users 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 an empty file named “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 Security Plugins

There are a number of great security plugins for WordPress available that will address most common security issues WordPress site owners face, such as preventing unauthorized users from gaining access to vital information about your site, protecting your website from malicious software, preventing unauthorized file uploads, etc.

Many WordPress plugins address some but not all areas of WordPress security. One plugin that does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.

SecureScanPro - total security software for WordPress

(SecureScanPro – total security software 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 plugin you may want to consider using is BlogDefender.

Blog Defender WordPress Security Suite

Blog Defender(Blog Defender Security Plugin For WordPress)

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

BlogDefender shows you where potential security holes in your website are …

Blog Defender Security PluginAnd then shows you how to quickly and easily fix these …

Blog Defender WordPress Security SuiteIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, you can use various free plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure web platform, but neglecting basic maintenance tasks like updating your WordPress installation, plugins and WordPress themes, tightening file and data security and taking other necessary precautions can expose your website to malicious by hackers and bots.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, you cannot 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, this article will help 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 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 reviews of new WordPress security plugins.

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)

***