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 world’s leading content management system and the preferred online publishing platform for millions of websites and loved by thousands of website developers and website designers, it’s inevitable that at some point in time, WordPress will come under attack by hackers.

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

These attacks were caused by computer networks infected with viruses and programmed to attack other computers (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)

One of the many ways hackers use to try and break into WordPress sites is by trying to guess the site admin’s login username and password. This can be done using scripts and software that can work through hundreds of login permutations in minutes.

If you’re using obvious user names and weak passwords that are easy to guess, your site can be easily hacked by repeated attempts to work out your site’s login details.

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

”Botnets” are networks of computers that have been compromised and infected with malicious code or software, which are then controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge or awareness.

Botnets are typically used to send out mass spam emails.

Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of ZeuS – a botnet that has been actively compromising computer networks all around the globe since 2009 …

ZeuS is a botnet that has been actively compromising computer networks all around the globe since 2009.

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

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

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

Powering millions of websites and blogs worldwide makes WordPress an obvious target for hackers

(WordPress often comes under attack 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 very good reasons why you should use WordPress if you are concerned at all about the security of your web presence.

We explain why WordPress is a secure web platform in this article: How Secure Is WordPress?

Info

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

Mike Little, one of the co-founders of WordPress with Matt Mullenweg, made the following 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 Being Brute-Force Attacked – 10 Security Checks

Every website or blog with a security vulnerability can be an opportunity to hackers. A compromised website not only provides hackers opportunities to improve their hacking skills and win “respect” from their peers, but it can also be a resource for launching denial of service attacks, spreading malware and participating in information theft.

If hackers can discover a vulnerability, the blog can then be employed as part of a larger network of “bots” to target larger and more valuable web sites.

Additional undesirable results of having your website hacked include getting blacklisted by search engines, having spammy links advertising things like online meds, porn, etc. in your content and page title and descriptions, redirecting visitors to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasties.

The truth is that malicious bots are most likely trying to break into your blog right now. Whether they can get in successfully or not, depends on how hard you will make it for hackers and botnets to keep trying until they either find a way to get access, or are forced to decide to look for a more vulnerable target.

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

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

WordPress Security Scan(Hackertarget – WP Security Check Screenshot: https://hackertarget.com/wordpress-security-scan)

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

Hackertarget - Website Security Scan

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

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

WP Security Check(Product 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 on your server can be useful information to hackers, as these can inform them about any exploitable vulnerabilities, especially in older versions.

If your website runs on WordPress and you’re not taking appropriate steps to toughen up your site, it’s practically guaranteed that, at some point in time, someone will attempt to hack your installation, because these brute-force attacks are systematically hitting WordPress sites all the world!

When a website or blog is compromised, webmasters will find themselves completely “locked out” of their own site, or notice that their content has been interfered with or that everything has been entirely wiped out. Often, most sites will become infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache and aggravation that comes with having your site being hacked into, below are 10 essential and effective security measures that will help to prevent your WordPress site from being brute force attacked.

Useful Information

Note: Some of the recommended steps listed below need some technical skills to modify core WordPress and server files. If you lack these technical skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress service provider for assistance.

***

Security Measure #1 – Contact Your Hosting Provider

Get in touch with your webhosting service provider and ask them exactly what security precautions they have put into place to protect your site from botnet attacks, and what they are doing to make sure that your files and data get backed up.

Make sure that your hosting provider backs up your server files and that, if disaster strikes, you can quickly and easily recover your files.

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

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

A proper WordPress maintenance routine ensures that:

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

A full WP site maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WordPress website fully backed up and updated. 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 site is the second most important thing you should do after making sure that your heart is still beating!

If you don’t want to perform manual backups, there are many free and paid WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Backup, Copy & Keep Your WP Website Protected With Backup Creator WP Plugin

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

The mass brute-force botnet attack on WordPress is mostly an attempt to compromise site administrator panels by exploiting installations that used “admin” as their account 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 username is admin, you should change it immediately.

For a detailed tutorial that shows you how to change your admin username, go here: Changing Your WordPress User Name From Admin To A Different Username

Security Measure #4 – Your Password

A “brute force” attack occurs when malicious software continually and persistently tries to guess the right combination of characters in a username and password that will give the hacker entry to your website.

Unless you put some measure in place to stop the brute-force attack from happening (see further below for a couple of 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 very easy targets for botnets. Make sure that you change your password to a string that contains at least eight characters long, and that includes upper and lowercase letters, and add a few “special” characters (e.g. ^, $, *, etc).

Practical Tip

If you have trouble coming up with strong passwords or feel 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 software tool like Roboform to generate secure login passwords(You can use a password management tool like Roboform to help you generate unbreakable passwords)

For a detailed step-by-step tutorial on how to change your WordPress admin password, go here: What To Do If You Need To Reset Passwords

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

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

If hackers break into your WordPress site, they will try to access 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, you must prevent people getting to 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

Delete or rename the install.php, upgrade.php and readme.html files from your server.

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

Security Measure #7 – Update Your WordPress Software, Plugins And Themes

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

Make sure to always keep your WordPress files, plugins, themes, etc. up-to-date.

Security Measure #8 – Disable The Theme Editor

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

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

WP Theme Editor Menu

(The WordPress theme editor is accessible using the WP dashboard menu)

This means that anyone logging into your site can view and modify your theme templates, and create havoc on your site.

If you want to prevent people from being able to access 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 contains all the media files that get uploaded to your website.

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

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

(WordPress uploads folder)

If any directories in your website have vulnerabilities that can be exploited by malicious users, this could compromise 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 file with nothing in it named “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 – Use Security Plugins

A number of great security plugins for WordPress are available that specifically address common security issues faced by WordPress site owners, such as preventing hackers from accessing your site, protecting your website from malicious scripts, preventing unauthorized file uploads, 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 files and causing damage to your site is SecureScanPro.

SecureScanPro - security software solution for WordPress

(SecureScanPro – total security software solution for WordPress)

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

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

Blog Defender Security Suite For WordPress

Blog Defender WordPress Security Plugin(Blog Defender)

This product 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 Security SuiteAnd lets you quickly fix these …

Blog DefenderIf you don’t want to invest in a 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 simple maintenance tasks like making sure that your WordPress core files, WordPress plugins and WP themes are kept updated to their latest versions, tightening file and data security and taking other necessary precautions can have disastrous consequences.

No matter what type of business you run or plan to run online and how small you think your web presence is, securing your web sites is something you cannot ignore.

As a final reminder of the importance of website security, below is the advice given by a web security expert to all WordPress users after the global brute-force attacks on WordPress in 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 has given you the initial steps you need to take 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 WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified via email whenever we publish new articles on WordPress security and tutorials about WordPress security plugins.

***

"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

***