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 most popular CMS platform in the world and the preferred online publishing platform used by millions of businesses and loved by thousands of website developers and website designers, it’s inevitable that at some point in time, WordPress will come under attack from hackers wanting to score a “big win”.

In April 2013 a worldwide brute-force attack hit WordPress installations across virtually every WP hosting server in existence.

These attacks were caused by botnets (computers infected with malware and programmed to attack other computers with security vulnerabilities).

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 will attempt to break into WordPress sites is by trying to guess the site’s administration login username and password. This is achieved using software tools and scripts that can work through hundreds of login possibilities in minutes.

If you’re using obvious user names and predictable passwords, your website could be an easy target for hackers.

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

A “Botnet” is a network of computers that have been compromised and infected with malicious code, which can then be controlled remotely as a group, typically without the unsuspecting computer owners even being aware that this is happening.

Botnets are typically used to blast mass spam emails.

Below is a screenshot taken from an internet 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 infecting computer networks all around the globe since 2009.

(The Zeus botnet has been actively compromising 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 hosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress site administration areas. The large-scale brute-force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked per day.

News of this brute-force botnet attack was widely reported in all 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 …

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

(WordPress is often the target of 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 lots of great reasons why you should choose WordPress if you are concerned at all about the security of your web presence.

We explain what makes WordPress a very secure web platform in this article: How Secure Is WordPress?

Useful Info

It’s important to understand that, in the case of the brute force botnet attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using applications 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)

Preventing Your WordPress Website From Brute Force Attacks – Ten Security Measures

You may think that the information in your website or blog provides no value to hackers, but the reality is that every website is valuable to a malicious user.

If a hacker can hack and gain remote access of your website, the website or blog can then be used as a “bot” in a planned cyber-attack against larger and more highly-valued websites.

Additional undesirable results of having your site hacked include being blacklisted by Google, having spammy links advertising things like online meds, cheap offers on brand names, etc. inserted into your content and page title and descriptions, 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 truth is that software-driven bots are probably trying to break into your website or blog right now. Whether they will break into your site successfully depends on how challenging you can make it for them to keep persisting until they discover how to break in, or are forced to give up and decide to look for a more vulnerable target.

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

If you visit a site like Hackertarget.com and run your website through their WordPress security check …

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

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

WP Security Check

(Hackertarget – WordPress security check results. Screenshot source: Hackertarget.com)

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

WordPress Security Scan(Product image: BlogDefender.com)

Being able to see which 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 on your server are all valuable information to hackers, as this informs them about exploitable security vulnerabilities, especially where site owners haven’t updated their files.

If your website runs on WordPress and you are not taking steps to toughen up your site, we can practically guarantee that, at some point, someone will attempt to hack your installation, because these brute force attacks are systematically hitting WordPress installations around the world!

Whenever a website is broken into, blog owners will find themselves “locked out” of their own site, or notice that their files have been modified or even that their content has been completely wiped out. Often, most compromised sites will become infected with malicious software without the owner’s knowledge or awareness.

To help avoid the heartache that comes with having your website or blog being hacked into, we have listed below ten essential and effective security measures that will help to protect your WordPress site from brute force botnet attacks.

Note

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

***

Security Measure #1 – Contact Your Web Host

Contact your hosting service provider and ask them exactly what security precautions have been put in place to help prevent your site from being attacked, and what they are doing to make sure that your server files and data get backed up.

Make sure that your web host backs up your sites and that, if anything should happen, you can quickly and easily get your files and data back.

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

Never rely just on your webhosting 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 religiously performing a full site maintenance routine on a frequent basis (e.g. weekly, fortnightly, etc …)

A proper WordPress maintenance routine ensures that:

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

A complete WordPress maintenance routine looks like this …

Maintaining your WordPress web site fully backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP site backed up and up-to-date is vitally important for WordPress security. Image: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WP web site backed up and up-to-date is. WordPress site maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website. 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 next 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. Learn about a WordPress backup plugin that can automate your backup process here: Backup, Clone & Keep Your WordPress Website Protected With Backup Creator Plugin For WordPress

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

The large scale brute-force attack on WordPress is mostly attempting to compromise site administrator panels by exploiting WordPress sites using “admin” as their username.

For reasons of website security, avoid installing 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 it immediately.

For a simple tutorial created especially for WP admin users on how to change your admin username, go here: How To Change Your WordPress Username From Admin To A More Secure 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 in an attempt to guess the right combination 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 effective suggestions for doing this), the “bot” will just continue to attack your site until it eventually breaks into your admin area.

Weak passwords, therefore, are very easy targets for attacks. Make sure that you change your password to a string that contains at least eight or nine characters long, with upper and lowercase letters, and “special” characters (e.g. %, $, @, etc).

Tip

Roboform is a password program you can use to generate different strong passwords …

Roboform is a password management software that lets you easily create strong login passwords(You can use a password management program like Roboform to help you generate very secure passwords)

We have created a tutorial for non-technical WP admin users that shows you how to change your WordPress admin password here: How To Change Your Password

Security Measure #5 – Prevent Access To The wp-config.php File

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

WordPress WP Config file

(wp-config.php file)

If hackers break into your WordPress site, they will normally search for the wp-config.php file, because this is the file that contains your WordPress database details, 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.

To protect your WordPress site from attacks and even being used as part of a bot net, therefore, you must 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 – Rename Or Delete Unnecessary Site 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 deleted. If you don’t want to remove these files, then just rename them.

Security Measure #7 – Update Your WordPress CMS, Themes & Plugins

Hackers are always on the lookout for vulnerabilities in previous versions of WordPress that can be exploited, including outdated versions of WordPress plugins and themes.

Ensure that all of your installation 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 you edit plugin and theme code from the dashboard area.

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the dashboard menu)

The WordPress theme editor feature allows anyone accessing your site to view and make changes to your WordPress theme files, and cause mayhem on your site.

To prevent unauthorized 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 – Secure The WordPress Uploads Directory

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

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

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

(WordPress uploads directory)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by malicious users, this could compromise the security of your website.

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 get professional help if you are not sure about what to do.

Security Measure #10 – Use Security Plugins

Some great WordPress security plugins are available that will address most common security issues WordPress site owners face, such as preventing hackers from accessing vital areas of your site, protecting your site 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 potential issues that could lead to hackers accessing your site files and damaging your site is SecureScanPro.

SecureScanPro - WordPress total security software

(SecureScanPro – complete security software solution for WordPress)

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

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

Blog Defender Security Solution For WordPress Websites & Blogs

Blog Defender(Blog Defender)

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

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

Blog Defender Security PluginAnd lets you fix these quickly, easily and inexpensively …

Blog Defender Security Product Suite For WordPressIf you don’t want to invest in a security plugin like SecureScanPro or BlogDefender, then use various free plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting essential maintenance tasks like updating your WordPress software, WP plugins and WordPress themes, tightening file and data protection and taking other necessary precautions can expose your website to attacks by hackers and bots.

Regardless of the 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, below is the advice given by a web 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, WordPress 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 seek help from a professional WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications when we publish new articles on WordPress security and tutorials about WordPress security plugins and solutions.

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org

***