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.

WP SecurityWhen you are the world’s most popular content management system and the online publishing platform of choice for millions of websites and loved by thousands of website developers and web designers, it’s inevitable that at some point in time, WordPress will become an easy target for attacks by hackers wanting to score a “big win”.

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

These attacks were caused by computers infected with viruses and programmed to attack other computers, also commonly known as “botnets”.

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

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 use to try and break into WordPress sites 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 predictable usernames and predictable passwords, your site can be an easy target for hacking attempts.

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 infected with malicious code, which can then be controlled remotely as a group, often without the unsuspecting computer owners’ knowledge or awareness.

Botnets are normally used used to blast mass spam emails.

Below is a screenshot 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 world since 2009 …

The Zeus botnet has been actively infecting computer networks all around the world since 2009.

(The Zeus botnet has been actively compromising computer networks all around the world since 2009. Screenshot image: SecureList.com)

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

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

WordPress often is targeted by hackers

(Being the world’s most used CMS makes WordPress a target for hacking attempts)

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

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

To understand why WordPress is a secure platform for websites, read this article: Are Open Source CMS Platforms Like WordPress Secure?

Important Info

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

Mike Little, one of the co-founders of WordPress with Matt Mullenweg, made this 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 Measures

Every blog with a security vulnerability offers some value to hackers. A compromised website or blog not only offers hackers opportunities to improve their hacking skills and win “respect” among their peers, but it can also acts as a valuable platform for launching stealth attacks, spreading malware and participating in information theft.

If a hacker can exploit a security flaw, the site can then be employed as a “bot” to attack more highly-valued sites.

Additional undesirable effects of having your site hacked and your site security compromised include getting blacklisted by Google, having spammy links promoting things like online meds, discounted fashion, etc. in your content and meta data, redirecting visitors to phishing sites and other websites, drive-by downloads (adding malware on your visitors’ computers), and many other nasty things.

The reality is that hackers are probably searching for vulnerabilities and trying to break into your website or blog right now. Whether they can successfully break into your site or not, will depend on how challenging you have made things for hackers and botnets to continue trying until they can find a way to get access, or are forced to decide to look for a less protected target.

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

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

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

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

Hackertarget - WP Security Scan

(Hackertarget – WP security scan results. Source: Hackertarget.com)

It should be obvious after using the above tool that if you are able to freely access all of this information, hackers can too.

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

Being able to see what 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 are all valuable information to hackers, as this informs them about any potential holes or weaknesses, especially in older versions.

If your website is powered by WordPress and you are not preventive steps to harden your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your website, because these brute-force attacks are systematically hitting WordPress installations worldwide!

Typically, whenever a site gets compromised, webmasters will find themselves “locked out” of their own site, or notice that their content has been vandalized or that everything has been entirely wiped out. Typically, compromised sites will be infected with malicious scripts without the owner’s knowledge or awareness.

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

Important

Note: A few of the measures listed below require some technical understanding of how to modify core WordPress and/or server files. If you lack these technical skills, or don’t want to mess around with code on your site, then ask your web host or a professional WordPress technical provider for assistance.

***

Security Measure #1 – Get In Touch With Your Webhosting Service Provider

Get in touch with your host and ask them what security precautions have been put in place to protect your site from brute-force attacks, and what they are doing to ensure that your files and data get regularly backed up.

Check that your hosting provider regularly backs up your server files and that, if disaster strikes, you can easily recover your site.

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

You should never rely only on your webhosting provider for your site backups. Instead, learn how to manage your WordPress site or get this service done for you and develop a habit of religiously performing a full site maintenance routine on a regular basis (e.g. daily, weekly, fortnightly, 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 WP plugins, themes and software components are up-to-date,
  • etc …

A complete WordPress maintenance routine looks like this …

Maintaining your WordPress site completely backed up and updated is vitally important for WordPress security.(Maintaining your WordPress web site completely backed up and up-to-date is vitally important for WordPress security. Source: WPTrainMe.com)

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

If you don’t want to back up your site manually, there are a number of free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Copy & Protect Your WordPress Websites And Blogs With Backup Creator WordPress Plugin

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

The mass brute force botnet attack on WordPress is mostly an attempt to compromise website admin panels by exploiting sites using “admin” as the username.

For website security reasons, avoid installing WordPress sites with the username admin. This is the first area hackers will test. If your blog’s username is “admin”, change this immediately.

For a detailed step-by-step tutorial for non-technical admin users on how to change your login username, go here: Changing Your WordPress Username From Admin To A More Secure Username

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when a malicious script persistently tries to guess the right username and password character string that will unlock your site.

Unless some measure is put into place to block the brute-force attack (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just keep attacking 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 combination to a string containing at least eight characters long, with upper and lowercase letters, combined with “special” characters (e.g. ^, #, &, etc).

Useful Tip

Roboform is a password management software you can use to help you generate different unguessable passwords …

Roboform is a password tool you can use to help you generate different secure login passwords(You can use a password management tool like Roboform to generate hard-to-crack passwords)

We have created a tutorial created especially for non-technical WP admin users that shows you how to change your admin password here: What To Do If You Need To Reset WordPress Passwords

Security Measure #5 – Deny Access To Your WP Config 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 a hacker breaks into your site, they will normally search 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.

In order to protect your WordPress site from attacks and even being used as part of a bot net, therefore, you must 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 your install.php, upgrade.php and readme.html files.

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

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

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

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

Security Measure #8 – Disable The Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor using the WP main menu)

The WordPress theme feature lets anyone accessing your blog’s admin view and modify your WordPress theme templates, and cause havoc on your site.

If you want to prevent people from accessing 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 Site’s 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 a person needs to do to view the contents stored in the “uploads” folder is visit your directory using their browser …

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

(WordPress uploads directory)

If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, anyone 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, adding a blank index.php file (this is literally an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to use a professional if you are not sure about what to do.

Security Measure #10 – Security Plugins

There are a number of WordPress security plugins available that specifically address most common security issues WordPress site owners face, such as preventing unauthorized users from gaining access to vital areas of 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 does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WP total security software solution

(SecureScanPro – complete security plugin for WordPress)

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

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

Blog Defender Security Suite

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

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

BlogDefender shows you where potential security holes in your web site are …

Blog DefenderAnd then shows you how to fix these quickly and easily …

Blog Defender WordPress 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 WP installation, plugins and 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 kind of business you run or plan to run online and how small you think your web presence is, you cannot afford to ignore the importance of securing your web site.

As one last reminder, below is the advice given by an expert on website security to all WordPress users after the worldwide 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 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 service provider in our WordPress Services Directory.

Also, please remember to subscribe to WPCompendium.org to be notified whenever we publish new articles on WordPress security and reviews of new security plugins and solutions.

***

"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

***