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 SecurityPowering millions of websites and blogs worldwide makes WordPress a frequent target for malicious attempts by hackers.

In 2013 a global brute force attack struck WordPress installations across almost every host server in existence.

These attacks were caused by botnets (networks of infected computers programmed to attack other installations).

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

What Is A Brute Force Attack?

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 a WordPress site is by trying to guess the site’s administration login username and password. To attempt this, hackers use software tools that can guess hundreds of login combinations in minutes.

If you’re using predictable login details, your website could be an easy target for hacking attempts.

This is called a “brute force” login 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)

A “Botnet” is a network 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.

Botnets are regularly used to blast out mass spam emails.

Below is a screenshot taken from an internet security monitoring site showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the world since 2009 called “Zeus” …

The Zeus botnet has been actively compromising computer networks all around the globe since 2009.

(ZeuS is a botnet that has been actively compromising computer networks all around the globe since 2009. Image: 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, when millions of attempts to force their way into WordPress user admin areas took place. The attacks then continued, with over 30,000 WordPress sites being hacked each day.

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

WordPress is the world's most used content management system which makes it a target for hacking attacks

(WordPress is the world’s most popular CMS making it a frequent target for hackers)

Does This Mean We Should Stop Using WordPress?

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

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

Important

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

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

Protecting Your WordPress Website From Being Brute-Force Attacked – Ten Security Checks

You may think that the information in your site has nothing to offer to hackers, but the reality is that to a hacker, all websites provide an opportunity to gain some advantage at your expense.

If a malicious user can hack into and gain remote access of your site, the website can then be used as a “bot” to attack larger and more highly-valued web sites.

Additional undesirable results of having your website hacked include being blacklisted by search engines, having spammy links promoting 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 reality is that brute-force software bots are probably trying to hack into your web site at this very moment. Whether they will break in or not, depends on how challenging you can make things for them to continue trying until they either find a way to get access, or decide to look for a less protected target.

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

Does your website run on WordPress? If so visit Hackertarget.com and run your website through their WordPress security scan …

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

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

Website Security Check

(Hackertarget – WP security scan results. Screenshot source: Hackertarget.com)

It should be obvious after using this scanning tool that if you are able to access all of this information, then so can hackers.

Hackertarget - WordPress Security Check(Screenshot source: BlogDefender.com)

The ability 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 in your site are all potentially valuable information to hackers, as this can inform them about potential vulnerabilities, especially where site owners haven’t updated their software versions.

If your website is driven by WordPress and you’re not preventive steps to harden your site, it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your site, because these brute-force attacks are systematically hitting WordPress installations worldwide!

Typically, whenever a website or blog is compromised, blog owners will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been vandalized or that everything has been entirely wiped out. Typically, most compromised sites will be infected with malicious software or viruses without the owner even being aware of it.

To avoid the heartache of discovering that your web site has been hacked into, we have listed below 10 simple, yet essential and effective security measures that will help to protect your WordPress site from being brute force attacked.

Disclaimer

Note: A few of the measures listed below need some technical understanding of how to modify core WordPress and/or server files. If you have no technical skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress service provider for help.

***

Security Measure #1 – Contact Your Hosting Service Provider

Get in touch with your hosting service provider and ask them exactly what security precautions they offer to protect your site from botnet attacks, and what is done to ensure that your WordPress sites get regularly backed up.

Make sure that your webhosting service provider backs up your sites and that, if disaster strikes, you can easily get back your site.

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

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

A proper WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WordPress website fully backed up and up-to-date is. WP site maintenance is not hard or time-consuming, but it must be done to ensure the security of your website. If you don’t want to learn how to do WP site 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 perform manual backups, there are many 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, Clone & Protect Your WP Websites With Backup Creator Plugin For WP

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

the worldwide brute-force botnet attack on WordPress is mostly attempting to compromise site administrator panels and gain access to sites by exploiting sites with “admin” as the user name.

For 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”, then change this immediately.

For a tutorial for non-technical WP admin users on how to change your WordPress username, go here: Changing Your WordPress Username From Admin To Another User Name

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when malicious software continually hits a login or password field with different character strings trying to guess the right combination that will give the hacker access to your website.

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 continue to attack your site until it eventually gets access.

Passwords that are easy to guess, therefore, become really easy targets for hacking attacks. Make sure that you change your password combination to something containing at least eight or nine characters long, with both upper and lowercase letters, combined with a few “special” characters (e.g. %, $, @, etc).

Useful Tip

Roboform is a password tool that lets you easily create different passwords …

You can use a password management program like Roboform to help you generate strong login passwords(Roboform is a password management program that lets you generate different secure login passwords)

For a simple tutorial for WordPress admin users on how to change your admin password, go here: What To Do If You Need To Reset WordPress Passwords

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

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

WP Config file

(wp-config.php)

If hackers break into your website, they will normally search for your wp-config.php file, because this file 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.

In order to protect your WordPress site from being attacked and even being used as part of a bot net, therefore, you must prevent people 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 Installation Files

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

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

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

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress comes with a built-in editor that lets you edit theme and plugin code from the dashboard.

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

WP Theme Editor Menu

(The WordPress theme editor can be accessed via the WordPress main menu)

The WordPress theme feature lets anyone accessing your blog view and make changes to all of your WordPress files, and cause havoc 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 editing your wp-config.php file.

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

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

Normally, this folder is visible to all users online. All a person needs to do to see all of the contents in your site’s “uploads” directory is visit the directory using a web browser …

(WordPress uploads folder)

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

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

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 get professional help if you are not sure about what to do.

Security Measure #10 – WordPress Security Plugins

Some great WordPress security plugins are available that will address many common security issues faced by WordPress website owners, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site from botnets, preventing injections of code into files, etc.

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

SecureScanPro - security software for WordPress

(SecureScanPro – total security software solution 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 security plugin you may want to consider using is BlogDefender.

Blog Defender Security Plugin For WordPress Sites

Blog Defender Security Product Suite(Blog Defender)

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

BlogDefender scans you WordPress installation for security weaknesses …

Blog Defender Security Suite For WordPressAnd lets you fix these quickly, easily and inexpensively …

Blog DefenderIf you don’t want to purchase a premium 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 platform, but neglecting simple maintenance tasks like updating your WordPress software, WordPress plugins and WordPress themes, tightening file and data security 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, website security is something you cannot ignore.

As one last reminder, below is the advice given by an expert on web security to all WordPress users following the mass 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, website security is very important if you run a WordPress site. Hopefully, the above article has given you the initial steps you need to take to keep your WordPress site protected from brute force attacks. 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 service provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to receive notifications via email whenever we publish new tips on WordPress security and reviews of new WordPress security plugins.

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)

***