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 SecurityWordPress powers millions of sites worldwide, making it a target for hacker attacks.

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

These attacks were caused by networks of infected computers programmed to attack other vulnerable installations, also commonly known as “botnets”.

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

Brute Force Attacks – An Overview

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 a WordPress site. One of these is by trying to guess the site admin’s login username and password. To achieve this, hackers use software tools that can guess hundreds of possible login combinations in minutes.

If you’re not using strong usernames or unguessable passwords, your website could be easily hacked by persistent attempts to guess your site’s login details.

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)

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

Botnets are normally used used to send mass spam emails.

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 infecting computer networks all around the world since 2009 called “Zeus” …

The Zeus botnet 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. Screenshot source: SecureList.com)

The botnet attacks were highly distributed and well organized. Over 90,000 IP addresses were identified by several hosting companies in the initial attack, when millions of attempts to force their way into WordPress site admin areas occurred. The large-scale brute-force attacks then continued, with over 30,000 WordPress sites and blogs being hacked each day.

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

Powering millions of websites and blogs around the world makes WordPress a target for hacking

(WordPress powers millions of websites and blogs around the world, which makes it an obvious target for hacking)

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 choose WordPress if you are concerned at all about the security of your online presence.

To learn what makes WordPress a very secure web platform, read this article: Are Open Source Platforms Like WordPress Secure?

Important Info

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

Mike Little, one of the co-founders of WordPress, 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 Being Brute Force Attacked – Ten Security Checks

Every website or blog with a vulnerability has some value to hackers. An unsecured website presents hackers with a platform for launching denial of service attacks, spreading malware and to engage in information theft.

If a hacker can exploit a way to gain remote access and control of your site, your web site can then be employed as a “bot” to attack more valuable websites.

Additional undesirable results of having your website hacked and your site security compromised include being blacklisted by Google, having spammy links promoting things like viagra, cheap offers on brand names, etc. inserted in your content, malicious redirects to phishing sites and other websites, drive-by downloads (adding malware on your visitors’ computers), and many other nasty things.

The truth is that malicious bots are most likely looking for security weaknesses and trying to hack into your blog as you are reading this article right now. Whether they will break in successfully depends on how difficult or easy you have made things for hackers and bots to continue trying until they can find how to break in, or give up and decide to look for an easier target.

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

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

Website Security Check(WP Security Check Screenshot: https://hackertarget.com/wordpress-security-scan)

You will see that the scan will display various results and information about your WordPress installation …

WordPress Security Check

(website security scan results. Product image: Hackertarget.com)

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

Website Security Scan(Screenshot image: BlogDefender website)

The ability 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 potentially valuable information to hackers, as these can inform them about potentially exploitable security vulnerabilities, especially in older versions.

If your site or blog is driven by WordPress and you are not taking steps to harden your site, then we can practically guarantee that, at some point, someone will attempt to hack your site, because these brute force attacks are systematically targeting WordPress sites around the world!

When a website or blog gets compromised, webmasters will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been vandalized or even that their content has been completely wiped out. Typically, most sites will become infected with malicious software or viruses without the owner’s knowledge or awareness.

To help avoid the heartache and aggravation of discovering that your web site has been hacked into, below are 10 simple, yet essential and effective security measures that will help to prevent your WordPress site from botnet attacks.

Important

Note: Some of the measures listed below require some technical skills to modify core WordPress and server files. If you are not technical, 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 – Get In Touch With Your Host

Get in touch with your hosting service provider and ask them exactly what security systems are in place to help prevent your site from being attacked, and what they do to make sure that your files and data get regularly backed up.

It’s important to check that your host regularly backs up your server files and that, if disaster strikes, you can easily recover your files and data.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Regularly Maintained

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

A proper WordPress maintenance routine ensures that:

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

A full WP site maintenance routine looks like this …

Maintaining your WordPress installation completely backed up and updated is vitally important for WordPress security.(Maintaining your WordPress web site completely 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 web site backed up and up-to-date. WordPress 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 do not want to learn how to do WordPress 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 plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Backup, Copy & Keep Your WordPress Site Protected With Backup Creator WP Plugin

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

The mass brute force attack on WordPress is mostly attempting to compromise website admin panels and gain access to sites by exploiting sites that used “admin” as the account name.

For security purposes, avoid setting up 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.

We have created a tutorial on how to change your admin username here: How To Change Your WordPress Admin User Name To A Different User Name

Security Measure #4 – Change Your Password

A “brute force” attack occurs when malicious software continually and persistently hits a username and password field with different character strings trying to guess the right combination that will give them entry to your site.

Unless some measure is put into place to prevent the brute-force attack (see further below for a couple of simple and effective ways to do this), the “bot” will just continue attacking your site until it eventually works out the combination.

Passwords that are easy to guess, therefore, become really easy targets for brute-force attacks. Make sure that you change your password combination to a string that is at least eight or nine characters long, with both upper and lowercase letters, combined with “special” characters (%^#$@&*).

Useful Tip

Roboform is a password management program that lets you easily generate different secure passwords …

Roboform is a password software that lets you create different secure passwords(Roboform is a password management tool you can use to create different secure passwords)

For a detailed tutorial on how to change your WordPress admin password, go here: What To Do If You Need To Reset A Password In WordPress

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

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

(wp-config.php file)

If a hacker breaks into your WordPress site, they will normally try to access 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 attacks and even being used as part of a bot net, therefore, prevent your wp-config.php file from being easily accessed. 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 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 remove these files, then just rename them.

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

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

Make sure to always keep all of your software files, plugins, themes, etc. up-to-date.

Security Measure #8 – Disable The Theme Editor

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

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

WordPress Theme Editor Menu

(The WordPress theme editor can be accessed via the WordPress main menu)

The WordPress theme editor lets anyone accessing your site see and modify all of your files, and create havoc on your site.

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

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

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

(WordPress uploads folder)

(WordPress uploads folder)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, someone could upload unauthorized file types to 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, uploading a blank index.php file (this is literally an empty file called “index.php”) to your uploads directory, and so on. Again, it’s best to hire a professional if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

Some great WordPress security plugins are available that will address most common security issues faced by WordPress site owners, such as preventing hackers from accessing your site, protecting your website from brute-force attacks, preventing injections of code into files, 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 issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - WordPress total security software solution

(SecureScanPro – WordPress total security software solution)

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

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

Blog Defender Security Product Suite For WordPress Web Sites

Blog Defender Security Product Suite For WordPress(Blog Defender Security Solution For WordPress Web Sites)

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 installation for potential security vulnerabilities …

Blog DefenderAnd then shows you how to fix these quickly …

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

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting basic maintenance tasks like keeping your WP core files, plugins and themes up-to-date, tightening file and data security and taking other necessary precautions can have disastrous consequences.

Regardless of the type of business you run or plan to run online and how small you think your web presence is, you simply cannot afford to ignore the importance of securing your website.

As one last reminder of the importance of website security, below is the advice given by a security expert to all WordPress users following the mass brute force attacks by botnets 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 of the utmost importance if you run a WordPress site. Hopefully, this information will help 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 technical provider in our WordPress Services Directory.

Also, do yourself a favor and subscribe to WPCompendium.org to receive notifications whenever we publish new articles and tutorials on WordPress security and tutorials about new 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

***