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 CMS platform and the preferred online publishing platform 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 come under attack by hackers wanting to score a “big win”.

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

These attacks were caused by botnets (infected computer networks programmed to attack other computers 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)

There are many ways hackers try to break into WordPress sites. One of these is by trying to guess the site’s administration login username and password. To attempt this, hackers use scripts and software that automatically tries to guess hundreds of possible logins in minutes.

If you’re not using strong usernames or unguessable passwords, your site can be an easy target for hacking attempts.

This is called a “brute force” attack.

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

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

Botnets are regularly used to send out mass spam emails from 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 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. Image source: SecureList.com)

These were highly distributed and well organized 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 user administration areas. The worldwide attacks then continued, with over 30,000 WordPress sites being hacked every day.

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

WordPress is the world's most used CMS making it an obvious target for hacking

(WordPress often is targeted by hackers)

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

No. In fact, there are many very good reasons why you should use WordPress if you are concerned at all about the security of your web presence.

To learn what makes WordPress a very secure platform for websites, read this article: Can You Build A Secure Business Online Using WordPress?

Important Info

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

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

Preventing Your WordPress Website From Brute-Force Attacks – Ten Security Checks

Every blog with a security vulnerability has some value to hackers. A vulnerable website or blog not only presents new hackers opportunities to improve their hacking skills and claim “bragging rights” from their peers, but it can also be a valuable resource for launching denial of service attacks, spreading malware and participating in information theft.

If a hacker can exploit a software security flaw, the website or blog can then be employed as a “bot” in a planned cyber attack against more valued websites.

Additional undesirable results of having your site hacked and your site security compromised include getting blacklisted by search engines, having spammy links advertising things like online meds, cheap offers on brand names, etc. inserted in 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 many other nasty things.

The truth is that brute-force software bots are most likely looking for security exploits and trying to hack into your website as you are reading this article. Whether they will get in successfully depends on how challenging you have made things for hackers to keep persisting until they can discover how to break in, or decide to look for a less secure target.

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

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

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

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

Hackertarget - WP Security Check

(Hackertarget – website security scan results. Screenshot image: 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 - WordPress Security Scan(Image source: Blog Defender)

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 can be potentially useful information to hackers, as this informs them about any security vulnerabilities, especially in older versions.

If your website is powered by WordPress and you are not taking appropriate steps to bullet-proof your site, then we can practically guarantee that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically targeting WordPress sites worldwide!

Whenever a website or blog gets broken into, website owners will find themselves completely “locked out” of their own site, or notice that their files have been interfered with or even that their content has been completely wiped out. Often, sites will be infected with malicious software or viruses without the owner even being aware that this has taken place.

To help avoid the heartache that comes with having your web site being hacked into, we have listed below 10 simple, yet essential and effective security checks that will help to prevent your WordPress site from brute-force botnet attacks.

Disclaimer

Note: A few of the recommended steps listed below require some technical skills to modify core WordPress or server files. If you are not technical, 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 – Get In Touch With Your Host

Contact your hosting provider and ask them what security precautions have been put into place to protect your site from being attacked, and what is done to ensure that your files and data are being regularly backed up.

It’s important to make sure that your hosting service backs up your server files and that, if anything should happen, you can easily get back your files and data.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Regularly Maintained

Never rely only on your host for your site backups. Instead, learn how to maintain and manage your WordPress site or get this done for you and maintain a habit of religiously performing a complete WordPress site maintenance routine on a frequent basis (e.g. daily, weekly, monthly, etc …)

A proper WordPress maintenance routine ensures that:

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

A full WordPress site maintenance routine looks like this …

Maintaining your WP website or blog backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress website backed up and up-to-date is vitally important for WordPress security. Source: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WP installation backed up and updated. WP maintenance is not hard 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 this gets done. Backing up your website 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 files manually, there are many WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Backup, Clone & Keep Your WordPress Websites Protected With Backup Creator WordPress Plugin

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

The large scale brute-force botnet attack on WordPress sites was mostly an attempt to compromise website admin panels by exploiting installations that used “admin” as the username.

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

For a detailed tutorial that shows you how to change your login username, go here: Changing Your WordPress Admin Username

Security Measure #4 – Your Password

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

Unless some measure is put into place to block the brute-force attack (see further below for a couple of simple and effective ways to do this), the “bot” will just continue attacking your site until it eventually “cracks” the code.

Weak passwords, therefore, become very easy targets for hacking 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, combined with “special” characters (e.g. %, #, *, etc).

Tip

If you have trouble coming up with strong passwords or are reluctant to set up different passwords for all your online logins, then use a password program like Roboform …

You can use a password tool like Roboform to create really secure passwords(Roboform is a password management software that lets you generate secure passwords)

We have created a step-by-step tutorial on how to change your password here: How To Change Passwords In WordPress

Security Measure #5 – Prevent Your wp-config.php File From Being Visible

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

wp-config.php

(wp-config.php file)

If hackers break into your website, they will typically look for your 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.

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 accessible. 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 Blog Installation Files

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

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

Security Measure #7 – Keep Your WordPress Blog, Themes And Plugins Up-To-Date

Hackers are always on the lookout for vulnerabilities in earlier versions of WordPress that they can exploit, including outdated versions of plugins and themes.

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

Security Measure #8 – Disable Your Theme Editor

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

In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor in your admin menu …

WP Theme Editor Menu

(Accessing the WordPress theme editor using the dashboard menu)

This means that anyone logging into your site’s admin can see and edit your WP theme templates, and create havoc on your site.

To prevent unauthorized people from accessing 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 – Remove Access To The Site’s Uploads Folder

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

Normally, this folder is visible to anyone online. All someone has to do to view the contents in your site’s “uploads” directory is visit the directory using a web browser …

(WordPress uploads directory)

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

If any files stored in his folder have vulnerabilities that can be exploited by hackers, someone could upload unauthorized file types or compromise 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 an empty file called “index.php”) to your uploads directory, and so on. Again, it’s best to hire a professional if you are not sure about what to do.

Security Measure #10 – Security Plugins

Some great security plugins for WordPress are available that will address many common security issues WordPress website owners face, such as preventing unauthorized users from accessing vital areas of 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 plugin that does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your site files and damaging your site is SecureScanPro.

SecureScanPro - WordPress security software

(SecureScanPro – 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 great plugin you may want to look at using is BlogDefender.

Blog Defender Security Solution For WordPress

Blog Defender Security Suite For WordPress Websites(Blog Defender)

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

BlogDefender scans you WordPress installation for security vulnerabilities …

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

Blog Defender Security Solution For WordPressIf 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 very secure web platform, but neglecting basic maintenance tasks like updating your WordPress installation, WP plugins and themes, tightening file and data protection and taking other necessary precautions can expose your website 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, you cannot afford to ignore the importance of web security.

As a final reminder of the importance of keeping your websites protected, below is the advice given by a web security expert to all WordPress users following the global brute force attacks 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, website security is very important 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 consult a WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified via email whenever we publish new articles and tutorials 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

***