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 is often the target of malicious attacks by hackers, due to its global popularity.

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

These attacks were caused by computer networks infected with malware and programmed to attack other installations (called “botnets”).

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

Brute Force Attacks – Definition

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’s administration login username and password. To do 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 can be an easy target for hackers.

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/botnet)

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

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

Below is a screenshot taken from an internet security monitoring site showing the locations of the command centers of ZeuS – a botnet that has been actively infecting 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.

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

These were well organized and highly distributed botnet attacks on WordPress. Over 90,000 IP addresses were identified by several webhosting companies just in the initial attack, when millions of attempts to force their way into WordPress users admin areas occurred. The brute force attacks continued after this, with over 30,000 WordPress sites being hacked per day.

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

WordPress powers millions of websites and blogs around the world, making it an obvious target for hacking

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

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

No. In fact, there are lots of great reasons why you should continue using WordPress if you are concerned at all about the security of your online business.

We explain what makes WordPress a very secure web platform in 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 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, made this comment 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 Measures

Every website or blog with a vulnerability offers some potential value to hackers. No website or blog Large, medium and small business websites, personal blogs, government sites … even web sites owned by online security experts can and have been targeted.

If someone can discover a vulnerability, your website or blog can then be used as a “bot” in a planned cyber attack against other valuable sites.

Additional undesirable consequences of having your website hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links advertising things like viagra, porn, etc. inserted into your content, malicious redirects to phishing sites and other websites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The harsh reality is that software-driven bots are very likely looking for security weaknesses and trying to hack into your blog right now. Whether they will be successful depends on how difficult you can make things for hackers and bots to keep persisting until they either discover a way to get access, or are forced to give up and decide to look for a less secure target.

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

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

Hackertarget - WP Security Check(Website Security Check Product image source: https://hackertarget.com/wordpress-security-scan)

You will see that the check returns a number of results and information about your WordPress setup …

Hackertarget - WP Security Check

(WP security check results. Image source: Hackertarget.com)

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

Hackertarget - WordPress Security Check(Screenshot: BlogDefender website)

Being able to see what 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 can all be potentially valuable information to hackers, as these can inform them about any exploitable security vulnerabilities, especially in older versions.

If your site or blog runs on WordPress and you’re not precautionary steps to bolster the security of your site, then we can practically guarantee that, at some point in time, someone will attempt to hack your installation, because these brute force attacks are systematically hitting WordPress sites around the world!

When a site is compromised, blog owners will find themselves completely “locked out” of their own site, or notice that their files have been interfered with or even that their content has been completely wiped out. Typically, sites will be infected with malicious scripts without the owner even being aware of it.

To avoid the heartache (and potential financial loss) of having your site being hacked into, below are 10 simple, yet essential and effective security measures that will help to prevent your WordPress site from being attacked by brute-force botnet hacking attempts.

Useful Information

Note: Some of the steps listed 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 professional WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Host

Contact your host and ask them exactly what security measures they have put in place to protect your site from being attacked, and what they are doing to make sure that your server files and data are being backed up.

Make sure that your web host backs up your server files and that, if disaster strikes, you can quickly and easily get your files and data back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Frequently Up-To-Date

Never rely on your hosting provider 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 performing a complete site maintenance routine frequently (e.g. weekly, fortnightly, 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 WordPress software, plugins and themes are up-to-date,
  • etc …

A complete WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WP website or blog completely backed up and up-to-date. WP site 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 don’t want to learn how to do WordPress site maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website 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 WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Back Up, Clone & Protect Your WordPress Web Site With Backup Creator Plugin For WordPress

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

the worldwide brute-force attack on WordPress is mostly an attempt to compromise site admin panels by exploiting WP sites using “admin” as the account name.

For security purposes, avoid installing WordPress sites with the username “admin”. This is the first area hackers will test. If your blog’s user name is “admin”, you should change it immediately.

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

Security Measure #4 – Avoid Weak Passwords

A “brute force” attack occurs when a malicious script persistently hits a username and password field with different character strings in an attempt to guess the right combination 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 simple and effective suggestions for doing this), the “bot” will just continue attacking your site until it eventually gets access.

Weak passwords, therefore, are very easy targets for botnets. Make sure that you change your password to a string that is at least 8 characters long, and that includes upper and lowercase letters, and add a few “special” characters (%^#$@&*).

Useful Tip

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

Roboform is a password program you can use to help you generate very secure passwords(You can use a password software tool like Roboform to help you generate hard-to-crack passwords)

For a detailed step-by-step tutorial that shows you how to change your login password, go here: What To Do If You Need To Change Your Password

Security Measure #5 – Prevent Your wp-config.php File From Being Easily 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 file

(WP Config file)

If a hacker breaks into your WordPress website, they will search for the 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.

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 WordPress 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 – Keep Your WordPress CMS, Themes & Plugins Up-To-Date

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

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

Security Measure #8 – Disable Your Theme Editor

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

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

WP Theme Editor Menu

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

This means that anyone logging into your site’s admin can view and change your theme templates, or cause havoc on your site.

If you want to prevent 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 – Remove Access To The Site’s Uploads Directory

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

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

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

(WordPress uploads folder)

If any directories in your website have vulnerabilities that can be exploited by malicious users, anyone could upload unauthorized file types to 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, 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 – WordPress Security Plugins

There are a number of security plugins for WordPress available that will address many common security issues faced by WordPress website owners, such as preventing hackers from gaining access to vital information about your site, protecting your files from malicious scripts, preventing injections of code into files, etc.

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

SecureScanPro - WordPress total security software solution

(SecureScanPro – total security software for WordPress)

SecureScanPro is easy to install and easy to use, and does a great job of fixing most of the security areas that WordPress users need to address.

Another plugin you may want to consider using is BlogDefender.

Blog Defender Security Plugin For WordPress

Blog Defender Security Product Suite(Blog Defender)

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

BlogDefender scans you WordPress site for potential security weaknesses …

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

Blog Defender Security PluginIf you don’t want to invest in a premium security plugin like SecureScanPro or BlogDefender, you can use various free WP plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure web platform, but neglecting simple maintenance tasks like keeping your WordPress software, plugins and WordPress themes up-to-date, tightening file and data protection and taking other necessary precautions can expose your site to malicious by hackers and bots.

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

As one last reminder of the importance of website security, below is the advice given by a security expert to all WordPress users after the worldwide brute force attacks by botnets 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 very important if you run a WordPress site. Hopefully, the information in this article 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 professional WordPress service provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to be notified whenever we publish new articles on WordPress security and reviews of new security plugins and solutions.

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)

***