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 SecurityPowering millions of websites worldwide makes WordPress an obvious target for malicious attacks by hackers.

In April 2013 a large-scale brute force attack hit WordPress installations across almost every WP host server in existence.

These attacks were caused by botnets (infected computer networks programmed to attack other sites).

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 ways hackers try to break into WordPress sites. One of these is by trying to guess the site’s administration login username and password. This is achieved with scripts and tools that can guess hundreds of possible login combinations in minutes.

If you’re using weak usernames and predictable passwords, your site can be easily hacked by repeated attempts to work out your site’s login details.

This is called a “brute-force” attack.

Botnets – What Are They?

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)

A “Botnet” is a network of computers that have been compromised and infected with malicious code or software, which are then controlled remotely as a group, typically without the computer owners even being aware that this is taking place.

Botnets are regularly used to blast out mass spam emails.

The screenshot below was taken from a site that monitors online security showing the locations of the command centers of a botnet that has been actively infecting computer networks all around the globe since 2009 called “Zeus” …

The Zeus botnet 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 globe since 2009. Image: SecureList.com)

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

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

WordPress is the world's most popular CMS making it a frequent target for attempted hacking attacks

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

Does This Mean We Should Stop Using WordPress?

No. In fact, there are lots of very good reasons why you should continue using WordPress if you are concerned at all about the security of your web presence.

To understand why WordPress is a secure platform for websites, see this article: Is WordPress A Secure Platform For Websites?

Info

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

Mike Little, one of the co-founders of WordPress, made the following 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 Site From Brute-Force Attacks – 10 Security Checks

You may think that the information in your website offers little to no value to hackers, but the reality is that all websites have some value to a malicious user.

If a hacker can exploit a security flaw that allows them to compromise the control of your blog, your blog can then be used to target larger and more valued sites.

Additional undesirable consequences of having your website hacked and your site security compromised include getting blacklisted by Google, having spammy links advertising things like gambling, cheap offers on brand names, etc. inserted into your content and meta data, malicious redirects to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The reality is that hackers are probably searching for vulnerabilities and trying to hack into your web site as you are reading this right now. Whether they will do this successfully depends on how challenging you can make things for them to keep trying until they work out how to get access, or give up and go look for an easier target.

How Much Information About Your WordPress 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(WordPress Security Scan Source: https://hackertarget.com/wordpress-security-scan)

You will see that the check will yield a number of results and details about your site …

Hackertarget - WP Security Scan

(WordPress security check results. Product image source: Hackertarget.com)

It should be obvious after using the scanning tool that if you are able to access all of this information about your site, then hackers can too.

Hackertarget - WP Security Scan(Screenshot image: 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 are all valuable information to hackers, as this informs them about potential vulnerabilities, especially where the owners haven’t updated their sites.

If your website runs on WordPress and you are not preventive steps to harden your site, it’s practically guaranteed that, at some point in time, someone will attempt to hack your installation, because these attacks are systematically targeting WordPress sites worldwide!

Whenever a website is compromised, website owners can discover much to their dismay that they have been “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, most sites will be infected with malicious scripts or viruses without the owner even being aware that this has occurred.

To avoid the heartache that comes with discovering that your website has been hacked into, below are ten simple, yet essential and effective security checks that will help to protect your WordPress site from brute-force botnet attacks.

Disclaimer

Note: A few of the recommended steps below need some technical understanding of how to modify core WordPress and/or server files. If you have no web skills, or don’t want to mess around with code on your site, then ask your web host or search for a WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Get In Touch With Your Web Host

Get in touch with your host and ask them what precautions have been put into place to help prevent your site from brute-force attacks, and what they are doing to ensure that your WordPress sites are being backed up.

It is important to make sure that your webhosting service provider regularly backs up your sites and that, if anything happens, you can quickly and easily get back your site.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Site Frequently Up-To-Date

Never rely only on your hosting company for site backups. Instead, learn how to manage your WordPress site or get this service done for you and maintain a habit of performing a complete site maintenance routine on a regular basis (e.g. weekly, monthly, etc …)

A full WordPress maintenance routine ensures that:

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

A proper WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WordPress website or blog fully backed up and updated is. 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 don’t want to learn how to do WP site maintenance yourself, pay a professional to do it but make sure it gets done. Backing up your site is the next most important thing you must do after making sure that you still have a pulse!

If you don’t want to back up your files manually, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Backup, Duplicate And Protect Your WP Websites And Blogs With Backup Creator Plugin For WP

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

the worldwide brute force botnet attack on WordPress is mostly an attempt to compromise website administrator panels and gain access to the site by exploiting WP installations with “admin” as the account name.

For website security purposes, don’t install sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your blog’s username is admin, then change this immediately.

We have created a step-by-step tutorial on how to change your WordPress admin username here: Changing Your WordPress Username From Admin To A More Secure User Name

Security Measure #4 – Avoid Weak Passwords

A “brute force” attack occurs when malicious software continually and persistently tries to guess the right combination of password and username characters that will give them access to your site.

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

Weak passwords, therefore, are really easy targets for brute-force attacks. Make sure that you change your password to something containing at least 8 characters long, and that includes upper and lowercase letters, and “special” characters (e.g. ^, $, *, etc).

Tip

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

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

We have created a simple step-by-step tutorial created especially for admin users on how to change your login password here: How To Change A Password In WordPress

Security Measure #5 – Prevent Access To Your WP Config File

The wp-config.php file contains important information about your website’s database and is used to define advanced WordPress options.

wp-config.php

(wp-config.php)

If a hacker breaks into your website, they will typically try to access 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.

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 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 WP Installation Files

Rename or delete your install.php, upgrade.php and readme.html files.

These files can be removed after installation. If you don’t want to remove these files, then just rename them.

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

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the admin menu)

This allows anyone accessing your site to view and modify your theme files, or cause mayhem 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 – Protect 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 online users. All someone has to do to see the contents stored in the “uploads” directory is visit your directory using their web browser …

(WordPress uploads directory)

(WordPress uploads directory)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, someone could upload unauthorized file types or 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 blank file named “index.php”) to your uploads directory, and so on. Again, it’s best to seek professional help if you are unsure about what to do.

Security Measure #10 – Install Security Plugins

There are some great WordPress security plugins available that specifically address most security issues WordPress website owners face, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site from malicious software, preventing injections of code into files, etc.

Many WordPress plugins address some but not all areas of WordPress security. One WordPress security 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 - WP complete security plugin

(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 issues that WordPress users need to address.

Another security plugin you may want to consider using is BlogDefender.

Blog Defender Security Plugin

Blog Defender(Blog Defender Security Plugin)

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

BlogDefender shows you where potential security weaknesses in your WordPress installation are …

Blog Defender Security Plugin For WordPressAnd lets you easily fix these …

Blog DefenderIf you don’t want to buy 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 very secure platform, but neglecting basic maintenance tasks like making sure that your WP software, WP plugins and WordPress themes are kept updated to their latest versions, tightening file and data protection 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 website or blog is something you cannot afford to ignore.

As a final reminder, below is the advice given by an expert on web security to all WordPress users after 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, this information has shown you what to do to prevent brute-force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a professional 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 via email whenever we publish new articles and tutorials 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)

***