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 CMS platform and the preferred online publishing platform used by millions of websites and loved by thousands of website developers and web designers, it’s inevitable that at some point in time, WordPress will come under attack from hackers.

In 2013 a worldwide brute force attack struck 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 sites with security vulnerabilities).

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 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 guess hundreds of login permutations in minutes.

If you’re not using strong usernames or unguessable passwords, your website could be easily hacked by 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/botnet)

A “Botnet” is a network of computers that have been compromised and infected with malicious scripts or software, which are then controlled remotely as a group, typically without the computer owners’ knowledge or awareness.

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

The screenshot below was taken from an online security monitoring site showing the locations of the command centers of ZeuS – a botnet that 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 world since 2009.

(ZeuS is a botnet that has been actively compromising computer networks all around the globe since 2009. Source: SecureList.com)

These were highly distributed and well organized botnet attacks on WordPress sites. Over 90,000 IP addresses were identified by a number of hosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress site admin areas. The worldwide brute-force attacks continued after this, with over 30,000 WordPress blogs being hacked per day.

News of the April 2013 mass brute-force botnet attack was reported by all of the major webhosting companiesand leading technology media 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 often is targeted by hackers

(WordPress powers millions of websites around the world, making it an obvious target for hacking attacks)

Does This Mean We Shouldn’t Use WordPress Anymore?

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 online presence.

To learn what makes WordPress a very secure web platform, read this article: Concerned About WordPress Security? What Every Business Owner Needs To Know About WordPress Security

Info

It’s important to understand that, in the case of the brute force attack described above, was no specific vulnerability in WordPress 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, 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 Site From Brute Force Attacks – Ten Security Points

You may think that the information in your website offers little to no value to hackers, but the reality is that every website has value to a malicious user.

If hackers can access and compromise the control of your website, the website can then be employed as part of a larger network of “bots” to target more highly-valued web 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 online meds, cheap offers on brand names, etc. in your content and meta data, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasties.

The reality is that brute-force software bots are searching for vulnerabilities and trying to hack into your web site while you are reading this article right now. Whether they will break in depends on how hard or easy you will make things for them to continue trying until they find a way to get access, or give up and go look for a less secure target.

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

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

WP Security Scan(Hackertarget – WordPress Security Check Screenshot image: Hackertarget.com)

You will see that the check returns various results and information about your site setup …

Hackertarget - WP Security Scan

(Hackertarget – website security check results. Source: Hackertarget.com)

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

WordPress Security Check(Screenshot image: BlogDefender.com)

The ability 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 can all be potentially useful information to hackers, as this can inform them about any holes or weaknesses, especially in older versions.

If your website is powered by WordPress and you’re not preventive steps to toughen up your site, then it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your installation, because these brute force attacks are systematically targeting WordPress sites around the world!

When a website is broken into, 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 altered or even entirely wiped out. Often, most sites will become infected with malicious software or viruses without the owner’s knowledge or awareness.

To help avoid the heartache and frustration (and potential financial loss) of discovering that your website or blog 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 brute-force attacked.

Important

Note: A few of the recommended steps below need some technical understanding of how to modify core WordPress and server files. If you are not technical-minded, or don’t want to mess around with code on your site, then ask your web host or a professional WordPress service provider for help.

***

Security Measure #1 – Contact Your Web Host

Get in touch with your webhosting service and ask them exactly what security systems are in place to protect your site from being attacked, and what they are doing to make sure that your WordPress sites are being regularly backed up.

It is important to check that your hosting company regularly backs up your sites and that, if anything goes wrong, you can easily recover your files and data.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Regularly Updated

Never rely only on your hosting service 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 religiously 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 removed,
  • All WordPress data and files are free of errors, optimized and backed up,
  • All WP plugins, themes and software components are up-to-date,
  • etc …

A full WP site maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WordPress installation regularly backed up and updated is. WP 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 site maintenance yourself, get someone else to do it but make sure this gets done. Backing up your site is the second most important thing you should do after making sure that your heart is still beating!

If you don’t want to back up your files manually, there are a number of free and paid WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Backup, Clone And Protect Your WP Web Site With Backup Creator Plugin For WordPress

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

The mass brute force botnet attack on WordPress is mostly an attempt to compromise site administrator panels and gain access to sites by exploiting sites using “admin” as the user name.

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

We have created a detailed tutorial for non-technical WordPress users that shows you how to change your login username here: Changing Your WordPress Username From Admin To A More Secure User Name

Security Measure #4 – Make Sure Your Password Is Strong

A “brute force” attack occurs when malicious software continually hits a login or password field with different strings of characters trying to guess the right combination that will unlock your site.

Unless you put some measure in place to block 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, make very easy targets for hacking attacks. Make sure that you change your password combination to something that is at least eight or nine characters long, with upper and lowercase letters, combined with “special” characters (%^#$@&*).

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 software tool like Roboform …

You can use a password management software tool like Roboform to help you generate very secure passwords(Roboform is a password management tool you can use to create strong passwords)

For a tutorial created especially for WP admin users on how to change your admin password, go here: What To Do If You Need To Reset Your WordPress Password

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

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

wp-config.php

(wp-config.php)

If a hacker breaks into your WordPress website, they will typically look for your 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 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 being attacked and even being used as part of a bot net, therefore, 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 – Rename Or Delete Unnecessary 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 delete these files, just rename them.

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

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

Make sure to keep your WordPress software files, themes, plugins, etc. up-to-date.

Security Measure #8 – Disable The Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor using the WordPress admin menu)

This allows anyone accessing your site to see and make changes to all of your files, and cause havoc on your site.

If you want to prevent people from being able to access the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Protect Your Site’s Uploads Directory

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

Normally, this folder is visible to online users. All someone has to do to see the contents in the “uploads” folder is visit the directory using their browser …

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

(WordPress uploads folder)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by malicious users, someone could upload unauthorized file types to your site.

Protecting your directories will prevent unauthorized people from accessing 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 a file with nothing in it named “index.php”) to your uploads directory, and so on. Again, it’s best to hire a professional if you are unsure about what to do.

Security Measure #10 – Install WordPress Security Plugins

Some great WordPress security plugins are available that will address most common security issues faced by WordPress website owners, such as preventing hackers from accessing your site, protecting your website from malicious scripts, preventing unauthorized file uploads, etc.

Most WordPress plugins address some but not all areas of WordPress security. One security plugin that seems to do 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 - WordPress security plugin

(SecureScanPro – WordPress complete security plugin)

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

Another plugin you may want to consider using is BlogDefender.

Blog Defender

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

Blog Defender 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 holes in your WordPress installation are …

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

Blog DefenderIf you don’t want to buy a security plugin like SecureScanPro or BlogDefender, you can use various free plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting basic maintenance tasks like updating your WordPress installation, plugins and themes, tightening file and data security and taking other necessary precautions can expose your site to malicious 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, securing your website is something you simply cannot ignore.

As a final reminder of the importance of keeping your websites protected, below is the advice given by a security expert to all WordPress users following the global brute force attacks 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, website security is very important if you run a WordPress site. Hopefully, the above information has shown you what to do to keep your WordPress site protected from brute-force attacks. If you need any further help or assistance with WordPress security, please consult a WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

Also, do yourself a favor and subscribe to WPCompendium.org to be notified via email when we publish new tips on WordPress security and tutorials about WordPress security plugins.

***

"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com

***