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 often comes under attack by hackers, due to its global popularity.

In 2013 a worldwide brute force attack began hitting WordPress installations across virtually every WP host server in existence.

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

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)

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 using obvious login details, your website can be easily hacked by a script’s repeated attempts to work out your site’s login details.

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)

A “Botnet” is a network of private computers that have been compromised and infected with malicious code, which are then controlled remotely as a group, often without the computer owners even being aware that this is taking place.

Botnets are regularly used to send out mass spam emails from the infected computers of unsuspecting users.

The screenshot below was 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 globe since 2009 called “Zeus” …

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

(The Zeus botnet has been actively infecting computer networks all around the world since 2009. Screenshot source: SecureList.com)

These ongoing botnet attacks on WordPress sites are well organized and highly distributed. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress users administration areas. The mass attacks continued after this, with over 30,000 WordPress sites and blogs being hacked each day.

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

WordPress is the world's most popular content management system which makes it a natural target for attempted hacker attacks

(WordPress often is targeted by hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are lots of great reasons why you should use WordPress if you are concerned at all about the security of your website.

To learn why WordPress is a secure web platform, read this article: Is WordPress Secure?

Important

It’s important to understand 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 targeting sites built using applications like Joomla).

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

Preventing Your WordPress Blog From Brute Force Attacks – Ten Security Measures

You may think that the information in your site has no value to hackers, but the reality is that all websites are valuable to a malicious user.

If a malicious user can find a way to compromise the control of your website, the blog can then be employed as a “bot” to attack more valuable sites.

Additional undesirable consequences of having your website hacked include getting blacklisted by search engines, having spammy links advertising things like casinos, discounted fashion, etc. inserted into your content, redirecting visitors to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasties.

The reality is that hackers are probably trying to break into your website while you are reading this page at this very moment. Whether they can break into your site successfully depends on how difficult you can make it for them to keep trying until they can either find how to break in, or are forced to give up and go look for an easier target.

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

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

Hackertarget - WP Security Check(Hackertarget – Website Security Scan Source: https://hackertarget.com/wordpress-security-scan)

You will see that the scan returns a number of results and information about your website …

Website Security Scan

(WordPress security check results. Product image: Hackertarget.com)

It should be obvious after using the above tool that if you can freely access all of this information about your WordPress website, then hackers can too.

Hackertarget - WP Security Check(Source: BlogDefender.com)

Being able 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 are all valuable information to hackers, as this informs them about potentially exploitable vulnerabilities, especially where site owners haven’t updated their software versions.

If your website is powered by WordPress and you’re not preventive steps to bullet-proof your site, then we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these attacks are systematically hitting WordPress installations worldwide!

Whenever a website is compromised, webmasters can find themselves “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, most compromised sites will be infected with malicious scripts without the owner’s knowledge or awareness.

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

Important Info

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

***

Security Measure #1 – Get In Touch With Your Web Host

Get in touch with your webhosting service and ask them what precautions are in place to protect your site from being attacked, and what they are doing to make sure that your server files and data are being regularly backed up.

Make sure that your web host regularly backs up your sites and that, if disaster strikes, you can easily get back your files.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Frequently Maintained

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 develop a habit of religiously performing a complete 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 deleted,
  • All WordPress data and files are free of errors, optimized and backed up,
  • All WP software, plugins and themes are up-to-date,
  • etc …

A proper WP site maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WP installation 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 WordPress site maintenance yourself, get someone else 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 still have a pulse!

If you don’t want to perform manual backups, there are many free and paid plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Backup, Copy & Keep Your WP Website Protected With Backup Creator WP Plugin

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

the worldwide brute-force botnet attack on WordPress sites was mostly attempting to compromise site admin panels and gain access to sites by exploiting WP sites that used “admin” as their user name.

For reasons of website security, avoid setting up sites with the username “admin”. This is the first thing hackers will test. If your site’s username is “admin”, you should change this immediately.

For a tutorial created especially for non-technical WordPress users on how to change your username, go here: How To Change Your WordPress Admin Username To A More Secure User Name

Security Measure #4 – Make Sure Your Password Is Secure

A “brute force” attack occurs when a malicious script persistently hits a username and password field with different character strings in an attempt to guess the right login combination that will unlock your site.

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

Weak passwords, therefore, are very easy targets for hacking attacks. Make sure that you change your password to something containing at least eight or nine characters long, with both upper and lowercase letters, and “special” characters (^%$#&@*).

Practical Tip

You can use a password management program like Roboform to generate difficult passwords …

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

We have created a simple step-by-step tutorial that shows you how to change your admin password here: How To Reset Your Password In WordPress

Security Measure #5 – Protect Your wp-config.php File

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 a hacker breaks into your website, they will try to access your wp-config.php file, because this file contains your WordPress database details, 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 attacks and even being used as part of a bot net, therefore, you must 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 Blog Installation Files

Delete or rename 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, Themes And Plugins Up-To-Date

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress comes with a built-in editor feature that allows administrators to edit theme and plugin files inside the dashboard area.

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

WP Theme Editor Menu

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

This allows anyone accessing your blog to view and edit your WP theme templates, and cause havoc on your site.

If you want 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 – Secure Your WordPress Uploads Folder

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

Normally, this folder is visible to anyone online. All a person needs to do to see all of the contents stored in the “uploads” folder is navigate to your directory using their browser …

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

(WordPress uploads folder)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers, anyone could upload unauthorized file types to your site.

Protecting your directories will prevent online users 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 blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to ask for assistance from someone with experience if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

There are a number of great security plugins for WordPress available that specifically address most security issues faced by WordPress site owners, such as preventing hackers from accessing your site, protecting your site from botnets, 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 potential issues that could lead to hackers accessing your site files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - security software for WordPress

(SecureScanPro – security software solution for WordPress)

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

Another plugin you may want to look at using is BlogDefender.

Blog Defender Security Suite For WordPress Websites & Blogs

Blog Defender Security Solution(Blog Defender WordPress Security Solution)

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

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

Blog Defender Security SuiteAnd lets you 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 plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure platform, but neglecting basic maintenance tasks like keeping your WordPress core files, plugins and themes updated to their latest versions, tightening file and data protection and taking other necessary precautions can expose your site to attacks 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 web site is something you cannot afford to ignore.

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

We also recommend subscribing to WPCompendium.org to receive notifications when we publish new tutorials on WordPress security and tutorials about new security plugins and solutions.

***

"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

***