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 SecurityBeing the world’s most popular content management system makes WordPress an obvious target for hackers.

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

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

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 use to try and break into a WordPress site is by trying to guess the site admin’s login username and password. To attempt this, hackers use software tools and scripts that automatically tries to guess hundreds of possible logins in minutes.

If you’re using weak usernames and passwords, your website could be an easy target for hacking attempts.

This is called a “brute force” attack.

Botnet Definition

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)

”Botnets” are networks of private computers that have been compromised and infected with malicious scripts or software code, which are then controlled remotely as a group, often without the computer owners even being aware that this is happening.

Botnets are normally used used to blast out mass spam emails from computers of unsuspecting users.

Below is a screenshot taken from an online security monitoring site showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the globe since 2009 called “Zeus” …

The Zeus botnet has been actively compromising computer networks all around the globe since 2009.

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

These were well organized and highly distributed attacks. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack, when millions of attempts to force their way into WordPress site administration areas took place. The worldwide attacks then continued, with over 30,000 WordPress sites and blogs being hacked each day.

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

WordPress often comes under attack by hackers, due to its popularity

(WordPress is frequently the target of large-scale 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 many good reasons why you should choose WordPress if you are concerned about the security of your web presence.

To understand what makes WordPress a very secure platform for websites, read this article: Is WordPress Secure?

Info

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

Mike Little, one of the co-founders of WordPress with Matt Mullenweg, said this 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)

Protecting Your WordPress Site From Brute-Force Attacks – Ten Security Points

Every site with a vulnerability provides an opportunity to hackers. No website is completely safe from being attacked. Business websites, personal blogs, government sites … even sites owned by web security and anti-hacking experts can and have been targeted.

If a malicious user can find a way to gain remote access and control of your site, that web site can then be employed as a “bot” in a planned cyber attack against more valuable web sites.

Additional undesirable impacts of having your site hacked and your site security compromised include being blacklisted by Google, having spammy links advertising things like gambling, discounted fashion, etc. inserted in your content and meta data, malicious redirects to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasty things.

The harsh reality is that hackers are probably scouring for security exploits and trying to break into your web site at this very moment. Whether they will achieve this depends on how hard you will make things for them to keep trying until they work out how to get access, or give up and go look for a less secure target.

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

Does your website run on WordPress? If so visit a site like Hackertarget.com and run your site through their WordPress security check …

Hackertarget - WP Security Scan(WP Security Check Product image: Hackertarget.com)

You will see that the test will display various results and details about your website …

WordPress Security Scan

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

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

Hackertarget - Website Security Scan(Screenshot: BlogDefender.com)

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 potentially valuable information to hackers, as this informs them about any exploitable holes or weaknesses, especially where the owners haven’t updated their sites.

If your website is driven by WordPress and you are not preventive steps to bolster the security of your site, it’s practically guaranteed 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 installations worldwide!

When a website gets hacked, webmasters will find themselves completely “locked out” of their own site, or notice that their content has been altered or even entirely wiped out. Often, most sites will become infected with malicious scripts or viruses without the owner even being aware that this has occurred.

To help avoid the heartache and aggravation of having your website or blog being hacked into, we have listed below ten simple, yet essential and effective security checks that will help to protect your WordPress site from being brute-force attacked.

Important

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

***

Security Measure #1 – Contact Your Hosting Company

Contact your hosting provider and ask them exactly what security precautions are in place to protect your site from being attacked, and what they do to make sure that your files and data get backed up.

Check that your host is backing up your sites and that, if disaster strikes, you can quickly and easily get back your site.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Or Blog Frequently Updated

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

A complete WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

Maintaining your WordPress site frequently backed up and updated is vitally important for WordPress security.(Maintaining your WordPress 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 it is to maintain your WordPress site frequently backed up and up-to-date. 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 do not want to learn how to do WordPress maintenance yourself, get someone else 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 you still have a pulse!

If you don’t want to perform manual backups, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Back Up, Duplicate And Keep Your WP Sites 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 is mostly attempting to compromise site admin panels and gain access to the site by exploiting WP installations that used “admin” as their account name.

For reasons of website security, don’t set up WordPress sites with the username admin. This is the first area hackers will test. If your blog’s username is “admin”, then change it immediately.

For a simple step-by-step tutorial that shows you how to change your username, go here: How To Change Your WordPress Admin User Name To A Different Username

Security Measure #4 – Use A Strong Password

A “brute force” attack occurs when malicious software continually and persistently hits a username and password field with different strings of characters trying to guess the right login combination that will give the hacker access to your website.

Unless some measure is put into place to stop the brute force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just continue attacking your site until it eventually gets access.

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

Tip

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

Roboform is a password management software you can use to create different  passwords(Roboform is a password management software you can use to help you generate different secure passwords)

For a step-by-step tutorial for admin users on how to change your password, go here: How To Change The Login Password

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

(WordPress WP Config file)

If a hacker breaks into your website, they will typically look for your wp-config.php file, because this file contains your WordPress database information, 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 people accessing 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 Website 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 removed. If you don’t want to remove these files, then just rename them.

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

Hackers search for vulnerabilities they can exploit in outdated WordPress versions, including out-of-date versions of plugins and themes.

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

Security Measure #8 – Disable The Theme Editor

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

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the admin menu)

The WordPress theme editor lets anyone accessing your site’s admin area see and make changes to your WordPress theme templates, and cause havoc on your site.

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

The “uploads” folder stores all the media files that get uploaded to your website.

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

(WordPress has an uploads directory where your media files are stored)

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

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this can become a serious threat to the security of your site.

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

Security Measure #10 – WordPress Security Plugins

A number of security plugins for WordPress are available that specifically address most security issues faced by WordPress website owners, such as preventing hackers from accessing vital areas of your site, protecting your files from malicious software, preventing unauthorized file uploads, etc.

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

SecureScanPro - WordPress complete security plugin

(SecureScanPro – WP security software)

SecureScanPro is easy to install and easy to use, and fixes 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 Product Suite

Blog Defender Security Suite(Blog Defender)

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

BlogDefender scans you WordPress installation for potential security weaknesses …

Blog DefenderAnd lets you easily fix these …

Blog Defender Security Product Suite For WordPressIf 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 secure platform, but neglecting essential maintenance tasks like keeping your WordPress software, plugins and themes updated to their latest versions, tightening file and data security and taking other necessary precautions can expose your website 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 simply cannot ignore.

As one last reminder of the importance of website security, below is the advice given by an expert on web 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 given you the initial guidelines and direction you need to prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified when we publish new information on WordPress security and reviews of new security plugins.

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie

***