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 world’s most popular content management system and the online publishing platform of choice 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 by hackers wanting to score a “big win”.

In April 2013 a mass brute-force attack began hitting WordPress installations on virtually every WP hosting server in existence around the world.

These attacks were caused by botnets (computers infected with viruses and programmed to attack other vulnerable computers).

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)

There are many methods hackers use to try and break into WordPress sites. One of these is by trying to guess the site admin’s login username and password. This is achieved with software programs that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re using predictable user names and weak passwords that are easy to guess, your site can be easily hacked by the script’s repeated attempts to guess your site’s login details.

This is called a “brute-force” attack.

What Are Botnets

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 private computers that have been compromised and infected with malicious code, which are then controlled remotely as a group, often without the unsuspecting computer owners even being aware of this.

Botnets are typically used to send out mass spam emails.

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 infecting computer networks all around the globe since 2009 …

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 world since 2009. Screenshot source: SecureList.com)

The ongoing botnet attacks are highly distributed and well organized. 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 user administration areas. The attack continued after this, with over 30,000 WordPress sites being hacked each day.

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

WordPress is often the target of malicious attacks by hackers, due to its popularity

(WordPress is frequently the target of mass attacks by hackers)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are many very good reasons why you should continue using WordPress if you are concerned about the security of your online business.

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

Important Info

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

Mike Little, the co-founder 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)

How To Protect Your WordPress Website From Being Brute-Force Attacked – 10 Security Measures

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

If hackers can exploit a way to remotely take control of your website, that website or blog can then be used as a “bot” in a planned cyber attack against other valuable sites.

Additional undesirable effects of having your website hacked and your site security compromised include being blacklisted by Google, having stealthy spam links advertising things like gambling, discounted fashion, etc. in your content, malicious redirects to phishing sites and other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and many other nasties.

The truth is that brute-force software bots are looking for security exploits and trying to break into your website as you are reading this page. Whether they will successfully break in will depend on how challenging you can make it for hackers or bots to keep trying until they either can discover how to get access, or give up and decide to look for a less protected target.

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

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

Hackertarget - WordPress Security Check(WP Security Scan Product image: Hackertarget.com)

You will see that the test returns a number of results and information about your website …

Website Security Check

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

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

Website Security Scan(Source: BlogDefender site)

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 in your site can be valuable information to hackers, as this can inform them about any potential holes or weaknesses, especially in older versions.

If your website is powered by WordPress and you’re not proactive steps to bullet-proof your site, it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your website, because these attacks are systematically targeting WordPress installations worldwide!

When a website gets compromised, site owners can find themselves “locked out” of their own site, or notice that their files have been interfered with or even entirely wiped out. Typically, most compromised sites will be infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache and aggravation of discovering that your site has been hacked into, we have listed below 10 essential and effective security checks that will help to prevent your WordPress site from being brute-force attacked.

Useful Info

Note: Some of the measures below require some technical understanding of how to modify core WordPress and 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 professional WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Get In Touch With Your Host

Contact your webhosting provider and ask them exactly what systems have been put in place to help prevent your site from botnet attacks, and what they do to ensure that your files and data get regularly backed up.

Check that your host backs up your sites and that, if anything goes wrong, you can easily recover your site.

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

You should never rely just on your web host for your site backups. Instead, learn how to maintain your WordPress site or pay someone to get this done for you and develop a habit of religiously performing a full site maintenance routine on a regular basis (e.g. weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

  • All unnecessary files and data are removed,
  • All 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 maintenance routine looks like this …

Maintaining your WP site regularly backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP website frequently backed up and up-to-date is vitally important for WordPress security. Screenshot image: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WordPress web site completely backed up and up-to-date. WordPress 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 site maintenance yourself, pay someone 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 many plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Backup, Copy & Protect Your WP Website With Backup Creator WordPress Plugin

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

The mass brute force botnet attack on WordPress sites was mostly attempting to compromise website admin panels and gain access to the site by exploiting WordPress sites using “admin” as their username.

For website security purposes, don’t set up a WordPress site with the username admin. This is the first area hackers will test. If your site’s user name is admin, you will should change this immediately.

We have created a detailed step-by-step tutorial created especially for non-technical admin users on how to change your login username here: Changing Your Admin Username In WordPress To A Different Username

Security Measure #4 – Make Sure Your Password Is Strong

A “brute force” attack occurs when malicious software continually tries to guess the right combination of characters in a username and password that will unlock your website.

Unless you put some measure in place to stop the brute-force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just keep attacking your site until it eventually gets access.

Weak passwords, therefore, become really easy targets for hacking attacks. Make sure that you change your password to a string that is at least eight or nine characters long, with upper and lowercase letters, and add a few “special” characters (^%$#&@*).

Tip

Roboform is a password tool that lets you generate different difficult passwords …

Roboform is a password tool that lets you easily create secure passwords(You can use a password management program like Roboform to create passwords)

We have created a step-by-step tutorial on how to change your login password here: How To Reset Passwords

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

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

wp-config.php file

(wp-config.php)

If hackers break into your website, they will normally look for the wp-config.php file, because this is the file that contains important information about your site’s database, security keys, etc. Getting access to this information would allow someone 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, prevent people from 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 – Delete Or Rename Unnecessary Blog Installation Files

Delete or rename your install.php, upgrade.php and readme.html files.

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

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

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress installations come with a built-in editor feature that allows you to edit plugin and theme code inside the dashboard.

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

WP Theme Editor Menu

(Accessing the WordPress theme editor via the WP dashboard menu)

The WordPress theme editor allows anyone accessing your site’s admin to view and change your 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 editing your wp-config.php file.

Security Measure #9 – Protect The WordPress Uploads Directory

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

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

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

(WordPress uploads folder)

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

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 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 – Security Plugins

Several security plugins for WordPress are available that will address many common security issues WordPress site owners face, such as preventing unauthorized users from accessing your site, protecting your website from malicious software, preventing injections of code into files, etc.

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

SecureScanPro - complete security software for WordPress

(SecureScanPro – WordPress total security software)

SecureScanPro is easy to install and easy to use, and does a great job of addressing 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 Solution

Blog Defender(Blog Defender WordPress Security Plugin)

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

BlogDefender shows you where the security weaknesses in your WordPress site are …

Blog DefenderAnd lets you fix these quickly and easily …

Blog Defender Security Solution For WordPressIf you don’t want to buy a premium 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 secure platform, but neglecting simple maintenance tasks like keeping your WP core files, plugins and WP themes up-to-date, tightening file and data protection and taking other necessary precautions can expose your site to attacks 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, you cannot ignore the importance of securing your web site.

As one last reminder, below is the advice given by a security expert to all WordPress users following the large-scale 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, WordPress security is very important if you run a WordPress site. Hopefully, this article has given you the initial guidelines and help you need to prevent brute force attacks on your WordPress site. 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 technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified via email when we publish new tips on WordPress security and tutorials about new WordPress security plugins.

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie

***

Originally published as How To Protect Your WordPress Site From A Brute-Force Attack.