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 SecurityWordPress powers millions of sites worldwide, making it a target for hacking.

In 2013, WordPress installations around the world were subjected to mass brute force attacks.

These attacks were caused by botnets (computers infected with viruses and programmed to attack other sites with security vulnerabilities).

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

Brute Force Attacks – An Overview

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 a WordPress site is by trying to guess the site’s administration login username and password. This is done with software programs that can guess hundreds of possible login combinations in minutes.

If you’re using easy-to-guess login details, your site can be an easy target for hacking attempts.

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

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

Botnets are typically used to blast 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 infecting computer networks all around the world since 2009 called “Zeus” …

ZeuS is 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 globe since 2009. Screenshot image: SecureList.com)

The ongoing botnet attacks on WordPress were well organized and highly distributed. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress user administration areas. The mass brute-force attacks then continued, with over 30,000 WordPress sites and blogs being hacked every day.

News of the April 2013 mass brute-force botnet attack was widely reported in all the major webhosting companies, as well as the 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 …

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

(Powering millions of websites and blogs around the world makes WordPress an obvious target for hacker attacks)

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

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 business.

To learn what makes WordPress a very secure platform for websites, see this article: Are Open Source Web Platforms Like WordPress Secure? What Every Website Owner Needs To Know

Info

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

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

How To Protect Your WordPress Site From Brute-Force Attacks – Ten Security Measures

Every website or blog with a vulnerability offers potential value to hackers. A compromised website or blog not only offers hackers opportunities to improve their skills and win “respect” from their peers, but it can also acts as a valuable resource for denial of service attacks, spreading malware and as a source of information theft.

If hackers can exploit a way to remotely control your website, your website or blog can then be employed as a “bot” in a planned cyberattack against other highly-valued sites.

Additional undesirable consequences of being hacked and your site security compromised include getting blacklisted by Google, having spammy links promoting things like gambling, porn, etc. in your content and meta data, malicious redirects to phishing sites, drive-by downloads (adding malicious scripts on your visitors’ computers), and lots of other nasties.

The harsh reality is that software-driven bots are most likely trying to hack into your website right now. Whether they will achieve this or not, will depend on how difficult or easy you have made things for hackers to continue persisting until they can find how to get in, or are forced to give up and go look for a less protected target.

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

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

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

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

WordPress Security Check

(Hackertarget – WordPress security check results. Image source: Hackertarget.com)

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

Hackertarget - WordPress Security Scan(Product image source: Blog Defender)

Being able 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 in your site are all potentially useful information to hackers, as this informs them about potential holes or weaknesses, especially where the owners haven’t updated their files.

If your site or blog is powered by WordPress and you’re not proactive steps to bullet-proof your site, we can practically guarantee that, at some time in the near future, someone will attempt to hack your installation, because these brute force attacks are systematically targeting WordPress installations around the world!

Whenever a website is broken into, website owners can find themselves “locked out” of their own site, or notice that their content has been modified or even entirely wiped out. Typically, compromised sites will become infected with malicious scripts without the owner’s knowledge or awareness.

To help avoid the heartache and frustration that comes with having your web site being hacked into, we have listed below ten essential and effective security measures that will help to prevent your WordPress site from being attacked by brute-force hackers.

Warning

Note: A few of the measures below require some technical skills 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 search for a professional WordPress technical provider in our WordPress Services Directory.

***

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

Get in touch with your webhosting company and ask them what measures have been put into place to protect your site from brute force attacks, and what is done to ensure that your WordPress sites are being backed up.

It’s important to check that your webhosting provider is backing up your sites and that, if anything happens, you can quickly and easily get your files and data back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Regularly Updated

You should never rely just on your web host for your site backups. Instead, learn how to maintain your WordPress site or pay someone to get this done for you and maintain a habit of religiously performing a full site maintenance routine frequently (e.g. daily, weekly, monthly, etc …)

A proper WordPress maintenance routine ensures that:

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

A complete WP 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 WP website or blog completely backed up and up-to-date is vitally important for WordPress security. Screenshot: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WP site frequently 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 do not want to learn how to do WP maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website 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 data manually, there are many WordPress plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Back Up, Clone And Keep Your WP Website Protected With Backup Creator WP Plugin

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

The brute-force attack on WordPress is mostly attempting to compromise site admin panels by exploiting WP sites with “admin” as the user name.

For reasons of website security, don’t set up sites with the username admin. This is the first area hackers will test. If your site’s username is admin, then change it immediately.

For a simple step-by-step tutorial that shows you how to change your admin username, go here: How To Change Your Admin Username In WordPress To Another User Name

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when malicious software persistently tries to guess the right combination of characters in a password and username that will unlock your site.

Unless some measure is put into place to prevent the brute force attack (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually works out the combination.

Passwords that are easy to guess, therefore, are very easy targets for hackers. Make sure that you change your password combination to something containing at least 8 or 9 characters long, with upper and lowercase letters, combined with “special” characters (e.g. ^, #, @, etc).

Practical Tip

You can use a password management tool like Roboform to generate hard-to-crack passwords …

Roboform is a password program you can use to help you generate strong passwords(Roboform is a password management program you can use to help you generate different strong login passwords)

For a simple tutorial created especially for WordPress admin users that shows you how to change your admin password, go here: How To Reset Your WordPress Password

Security Measure #5 – Deny Access To Your WP Config File

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

wp-config.php

(wp-config.php)

If a hacker breaks into your WordPress site, they will normally 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 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 being attacked and even being used as part of a bot net, therefore, prevent your wp-config.php file from being 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 Site Installation Files

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

These files are completely unnecessary after installation and can be removed. If you don’t want to remove these files, then just rename them.

Security Measure #7 – Upgrade Your WordPress CMS, Themes And Plugins To Their Latest Version

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor via the WordPress dashboard menu)

The WordPress theme editor allows anyone accessing your blog’s admin area to see and edit your WordPress theme template files, and create mayhem on your site.

To prevent people from accessing your WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Prevent Access To Your WordPress Uploads Folder

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

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

(WordPress uploads folder)

(WordPress uploads directory)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, this can become a serious threat to the security of your site.

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

Security Measure #10 – Install Security Plugins

A number of WordPress security plugins are available that specifically address most security issues faced by WordPress site owners, such as preventing unauthorized users from accessing vital areas of your site, protecting your files from malicious software, preventing unauthorized file uploads, etc.

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

SecureScanPro - WP complete security plugin

(SecureScanPro – complete security plugin 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 consider using is BlogDefender.

Blog Defender WordPress Security Solution

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

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

BlogDefender shows you where potential security holes in your website are …

Blog DefenderAnd then shows you how to fix these quickly …

Blog Defender Security Plugin For WordPressIf you don’t want to invest in 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 very secure platform, but neglecting essential maintenance tasks like updating your WordPress installation, WP plugins and themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.

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

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 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, the information in this article will help 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.

We also recommend subscribing to WPCompendium.org to be notified whenever we publish new tutorials on WordPress security and tutorials about new WordPress security plugins and solutions.

***

"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)

***