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 often comes under attack by hackers, due to its global popularity.

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

These attacks were caused by infected computer networks programmed to attack other vulnerable computers, also commonly known as “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 will attempt to break into WordPress sites is by trying to guess the site admin’s login username and password. This can be done with software tools that can guess hundreds of login permutations in minutes.

If you’re using easy-to-guess user names and predictable passwords, your website can be easily hacked by a malicious software’s repeated attempts to work out your site’s login details.

This is called a “brute force” login attack.

Botnet – What Is This?

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.org)

”Botnets” are networks of private computers that have been compromised and infected with malicious software, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is going on inside their machine.

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

The screenshot below was 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 world since 2009 …

The Zeus botnet has been actively compromising 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: SecureList.com)

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

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

Being the world's most used CMS makes WordPress a target for hacking attacks

(WordPress powers millions of sites worldwide, which makes it an obvious target for malicious attempts by hackers)

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

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

We explain why WordPress is a secure web platform in this article: Are Open Source CMS Platforms Like WordPress Secure?

Info

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

Mike Little, the co-founder of WordPress, said this 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)

Protecting Your WordPress Blog From Brute Force Attacks – Ten Security Measures

You may think that the information in your website or blog offers little to no value to hackers, but the reality is that to a hacker, all websites are an opportunity to profit or benefit at your expense.

If a malicious user can find a software vulnerability in your security, that web site can then be used as a “bot” in a planned cyber-attack against larger and more valued web sites.

Additional undesirable results of being hacked and your site security compromised include being blacklisted by Google, having stealthy spam links promoting things like online meds, cheap offers on brand names, etc. inserted into your content and page title and descriptions, redirecting visitors to phishing sites and other websites, drive-by downloads (adding malware on your visitors’ computers), and lots of other nasties.

The harsh reality is that hackers are probably looking for vulnerabilities and trying to break into your website or blog at this very moment. Whether they will achieve this or not, will depend on how challenging you have made it for them to keep persisting until they can discover how to get access, or give up and decide to look for a less protected target.

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

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

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

You will see that the test returns a number of results and details about your site setup …

Website Security Check

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

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

Hackertarget - Website Security Scan(Source: BlogDefender website)

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 any potential vulnerabilities, especially in older versions.

If your website runs on WordPress and you are not taking steps to bullet-proof your site, we can practically guarantee that, at some point, someone will attempt to hack your installation, because these attacks are systematically hitting WordPress installations worldwide!

Typically, when a website is compromised, blog owners will find themselves “locked out” of their own site, or notice that their files have been vandalized or even entirely wiped out. Typically, sites will become infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To help avoid the heartache and frustration (and significant loss of valuable business data) of discovering that your website has been hacked into, below are 10 essential and effective security measures that will help to protect your WordPress site from being attacked by brute-force hackers.

Info

Note: Some of the steps shown below need some technical skills to modify core WordPress and/or 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 technical provider for assistance.

***

Security Measure #1 – Contact Your Web Host

Get in touch with your hosting company and ask them exactly what security systems they have put into place to protect your site from brute force attacks, and what they do to ensure that your server files and data get backed up.

It’s important to check that your host is regularly backing up your server files and that, if anything should happen, you can quickly and easily get back your files and data.

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

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

A proper WordPress maintenance routine ensures that:

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

A proper WP site maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WP website or blog frequently backed up and updated is. WordPress 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 WordPress maintenance yourself, get someone else to do it but make sure it gets done. Backing up your site is the next most important thing you should do after making sure that you are still breathing!

If you don’t want to back up your data manually, there are many plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Back Up, 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 sites was mostly attempting to compromise website admin panels by exploiting WP installations that used “admin” as their account name.

For reasons of website security, don’t install a WordPress site with the username admin. This is the first thing hackers will test. If your blog’s username is admin, then change it immediately.

For a step-by-step tutorial that shows you how to change your admin username, go here: Changing Your Admin Username In WordPress

Security Measure #4 – Use Strong 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 unlock your site.

Unless some measure is put into place to stop the brute force attack from happening (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 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 to a string that is 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 feel 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 program that lets you generate secure login passwords(Roboform is a password program you can use to create different secure login passwords)

We have created a detailed tutorial for non-technical admin users on how to change your admin password here: Changing A Password In WordPress

Security Measure #5 – Protect Your wp-config.php File

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)

If hackers break into your website, they will typically try to access 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 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, you must prevent people from being able to easily find 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 Website Installation Files

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

These files are not required after installation and can be deleted. If you don’t want to delete these files, just rename them.

Security Measure #7 – Update Your WordPress CMS, Themes And Plugins To Their Latest Version

Hackers look for vulnerabilities they can exploit in older WordPress versions, including outdated versions of WP plugins and themes.

Make sure to keep all of your installation 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 plugin and theme code inside the dashboard.

You can access the 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 blog’s admin area to view and make changes to your theme templates, or cause mayhem on your site.

To prevent people from being able to access the 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 Your WordPress Uploads Directory

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

Normally, this folder is visible to anyone online. All a person needs to do to view all of the contents stored in your “uploads” directory is navigate to your directory using a web browser …

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

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

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, anyone could upload unauthorized file types to your site.

Protecting your directories will prevent unauthorized people from viewing 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 get professional help if you are unsure about what to do.

Security Measure #10 – Security Plugins

There are some great security plugins for WordPress available that specifically address common security issues faced by WordPress site owners, such as preventing unauthorized users from accessing your site, protecting your files from brute-force attacks, preventing unauthorized file uploads, etc.

Many 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 files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - total security plugin for WordPress

(SecureScanPro – WordPress total security plugin)

SecureScanPro is easy to install and easy to use, and addresses 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 Product Suite For WordPress Websites & Blogs

Blog Defender Security Suite For WordPress Blogs(Blog Defender Security Solution)

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

BlogDefender scans you WordPress installation for potential security holes …

Blog Defender Security Suite For WordPress SitesAnd then shows you how to fix these quickly and easily …

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

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting essential maintenance tasks like ensuring that your WordPress software, plugins and themes are kept up-to-date, 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, you simply cannot ignore the importance of securing your web site.

As a final reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users after the worldwide 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, the information in this article will help 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 technical provider in our WordPress Services Directory.

Also, please remember to subscribe to WPCompendium.org to receive notifications when we publish new tutorials on WordPress security and reviews of new security plugins and solutions.

***

"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now

***