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 leading 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 become an easy target for attacks from hackers wanting to score a “big win”.

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

These attacks were caused by infected computer networks programmed to attack other vulnerable sites, also commonly known as “botnets”.

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 ways hackers try to break into a WordPress site. One of these is by trying to guess the site’s administration login username and password. This can be achieved with software programs and scripts that can guess hundreds of login permutations in minutes.

If you’re using weak user names and weak passwords that are easy to guess, your site could be an easy target for hacking attempts.

This is called a “brute force” attack.

Botnet Definition

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

Botnets are typically used to blast out mass spam emails from the infected computers of compromised user accounts.

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 compromising computer networks all around the world 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 world 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 in the initial attack, when millions of attempts to force their way into WordPress users administration areas took place. The mass brute force attacks then continued, with over 30,000 WordPress sites and blogs being hacked per day.

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

Being the world's most popular content management system makes WordPress a target for hacking attempts

(Powering millions of websites worldwide makes WordPress a target for hacker attacks)

Does This Mean We Should Stop Using WordPress?

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

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

Info

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

Mike Little, one of the co-founders of WordPress, made this comment 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)

How To Protect Your WordPress Website From Brute Force Attacks – 10 Security Measures

You may think that your site is of little value to hackers, but the reality is that to a hacker, every website provides an opportunity to benefit at your expense.

If hackers can exploit a flaw in your security setup that allows them to gain any form of control of your website or blog, the website can then be employed as part of a larger network of “bots” to target larger and more valuable sites.

Additional undesirable consequences of being hacked and your site security compromised include being blacklisted by search engines, having spammy links promoting things like viagra, cheap offers on brand names, etc. inserted into your content and meta data, malicious redirects to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and many other nasty things.

The truth is that software-driven bots are trying to break into your site right now. Whether they can successfully hack in will depend on how difficult you have made it for hackers or botnets to keep persisting until they work out a way to get in, or give up and decide to look for an easier target.

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

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

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

You will see that the check will return various results and details about your site …

Website Security Check

(website security scan results. Screenshot image: Hackertarget.com)

It should be obvious after using the scanning tool that if you can freely access all of this information, so can hackers.

Website Security Check(Product image source: Blog Defender)

The ability to see which version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories can all be potentially valuable information to hackers, as this informs them about exploitable holes or weaknesses, especially where site owners haven’t updated their sites.

If your website runs on WordPress and you are not taking appropriate steps to toughen up your site, it’s practically guaranteed that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically hitting 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 entirely wiped out. Often, compromised sites will become infected with malicious software without the owner even being aware that this has occurred.

To avoid the heartache and frustration of discovering that your website has been hacked into, we have listed below ten essential and effective security measures that will help to protect your WordPress site from brute-force attacks.

Info

Note: A few of the recommended steps shown below need some technical understanding of how to modify core WordPress or server files. If you lack these technical skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress technical provider for help.

***

Security Measure #1 – Get In Touch With Your Host

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

It is important to make sure that your webhosting provider is regularly backing up your server files and that, if disaster strikes, you can quickly and easily get back your files and data.

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

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

A full WordPress maintenance routine ensures that:

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

A full WP maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WP web site fully backed up and up-to-date. WP maintenance is not hard or time-consuming, but it must be done to ensure the security of your website. If you do not want to learn how to do WordPress maintenance yourself, pay someone to do it but make sure it gets done. Backing up your site is the next 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. Learn about a WordPress backup plugin that can fully automate your site backups here: Back Up, Copy & Protect Your WordPress Site With Backup Creator WP Plugin

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

The mass brute-force attack on WordPress sites was mostly attempting to compromise website admin panels by exploiting installations that used “admin” as the account name.

For reasons of website security, avoid installing a WordPress site with the username “admin”. This is the first thing hackers will test. If your blog’s username is admin, then make sure you change this immediately.

For a detailed tutorial created especially for WordPress users that shows you how to change your login username, go here: How To Change Your Admin Username In WordPress To A More Secure User Name

Security Measure #4 – Use Strong Passwords

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 them access to your website.

Unless some measure is put into place to stop the brute-force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually breaks into your admin area.

Passwords that are easy to guess, therefore, are very easy targets for attacks. Make sure that you change your password combination to a string that is at least 8 or 9 characters long, and that includes upper and lowercase letters, combined with a few “special” characters (%^#$@&*).

Tip

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

You can use a password software tool like Roboform to create unguessable passwords(You can use a password management tool like Roboform to help you generate hard-to-crack passwords)

We have created a detailed tutorial for WordPress users on how to change your login password here: Changing The Login Password

Security Measure #5 – Secure Your WP Config File

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

wp-config.php file

(wp-config.php file)

If a hacker breaks into your website, they will try to access the wp-config.php file, because this is the file that contains your WordPress database information, security keys, etc. Getting access to this information would allow a hacker 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 people from being able to easily find 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 – Rename Or Delete Unnecessary Site Installation Files

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

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

Security Measure #7 – Upgrade Your WordPress Blog, Themes And Plugins

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

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

Security Measure #8 – Disable Your Theme Editor

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

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

WordPress Theme Editor Menu

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

The WordPress theme editor feature allows anyone accessing your site to see and modify your theme template files, and create mayhem on your site.

To prevent unauthorized people from being able to access 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 – Secure The WordPress Uploads Folder

The “uploads” directory contains all the media that gets uploaded to your 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 visit the directory using their browser …

(WordPress uploads folder)

(WordPress uploads folder)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers, this could compromise the security of your website.

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 called “index.php”) to your uploads directory, and so on. Again, it’s best to consult a professional if you are not sure about what to do.

Security Measure #10 – Use Security Plugins

There are some great security plugins for WordPress available that will address most security issues WordPress site owners face, such as preventing unauthorized users from gaining access to vital information about your site, protecting your files from malicious software, preventing unauthorized file uploads, etc.

Most 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 damage to your site is SecureScanPro.

SecureScanPro - WP total security software solution

(SecureScanPro – security software solution for WordPress)

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

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

Blog Defender WordPress Security Product Suite

Blog Defender(Blog Defender)

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

BlogDefender scans you website for potential security weaknesses …

Blog Defender Security SolutionAnd 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, then use various free WP plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure platform, but neglecting essential maintenance tasks like updating your WordPress software, plugins and themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.

Regardless of the type of business you run or plan to run online and how small you think your web presence is, you simply cannot ignore the importance of web security.

As a final reminder, below is the advice given by a security expert to all WordPress users following the mass 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, 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 professional WordPress technical provider in our WordPress Services Directory.

Also, please remember to subscribe to WPCompendium.org to receive notifications when we publish new tutorials on WordPress security and reviews of new WordPress security plugins.

***

"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group

***