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 SecurityWordPress is the world’s most popular CMS which makes it an obvious target for hacking attempts.

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

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

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 methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site’s administration login username and password. To attempt this, hackers use software programs that automatically tries to guess hundreds of login permutations in minutes.

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

This is called a “brute force” attack.

Botnet – What Is This?

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 code or scripts, which are then controlled remotely as a group, typically without the unsuspecting computer owners even being aware that this is going on in their device.

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

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

The ongoing botnet attacks are well organized and highly distributed. Over 90,000 IP addresses were identified by several hosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress users admin areas. The mass attack then continued, with over 30,000 WordPress sites and blogs being hacked per day.

Coverage of the April 2013 mass 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, Tech Crunch, PC Magazine, BBC News, and even on the official US Department of Homeland Security website …

WordPress often is targeted by hackers, due to its global popularity

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

Does This Mean We Should Stop Using WordPress?

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

We explain what makes WordPress a very secure web platform in this article: Is WordPress Secure? What Every Website Owner Needs To Know About WordPress Security

Useful Information

It’s important to note that, in the case of April 2013 mass brute-force botnet attack described above, there was actually no WordPress vulnerability being exploited (the same script was also attacking sites built using applications like Joomla).

Mike Little, the co-founder of WordPress, said this 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 Brute-Force Attacks – 10 Security Measures

Every website with a security vulnerability can be an opportunity to hackers. No matter what 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 securing your website. Large, medium and small web sites, personal blogs, government websites … even sites owned by online security experts can and have been targeted.

If a malicious user can exploit a way to take over your website or blog, your site can then be used to attack larger and more valued web sites.

Additional undesirable impacts of having your site hacked and your site security compromised include getting blacklisted by Google, having spammy links advertising things like casinos, porn, etc. inserted into your content and page title and descriptions, malicious redirects to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The harsh reality is that malicious bots are probably trying to break into your website right now. Whether they will achieve this or not, will depend on how difficult you can make it for them to keep persisting until they can discover how to get access, or are forced to decide to look for a more vulnerable target.

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

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

WordPress Security Check(WP Security Check Image source: https://hackertarget.com/wordpress-security-scan)

You will see that the scan will return various results and details about your website …

WP Security Scan

(WordPress security check results. Screenshot: Hackertarget.com)

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

Hackertarget - WordPress Security Check(Image source: Blog Defender)

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

If your website is powered by WordPress and you’re not precautionary steps to bolster the security of your site, it’s practically guaranteed that, at some point in time, someone will attempt to hack your website, because these brute-force attacks are systematically targeting WordPress installations worldwide!

Typically, when a website gets compromised, webmasters can find themselves completely “locked out” of their own site, or notice that their content has been altered or that everything has been entirely wiped out. Typically, sites will become infected with malicious software without the owner even being aware that a security breach has taken place.

To avoid the heartache and aggravation (and significant financial loss) that comes with discovering that your website has been hacked into, we have listed below 10 essential and effective security measures that will help to prevent your WordPress site from being attacked by brute-force hackers.

Note

Note: Some of the steps below require some technical skills to modify core WordPress 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 assistance.

***

Security Measure #1 – Get In Touch With Your Hosting Service Provider

Get in touch with your host and ask them what systems are in place to protect your site from botnet attacks, and what they are doing to ensure that your WordPress sites get regularly backed up.

Check that your webhosting service provider backs up your server files and that, if disaster strikes, you can easily recover your site.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Or Blog Frequently Up-To-Date

Never rely only on your webhosting provider for site backups. Instead, learn how to maintain and manage your WordPress site or get this service done for you and develop a habit of performing a complete WordPress site maintenance routine on a regular basis (e.g. daily, weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

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

A proper WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WordPress web site backed up and up-to-date. WP maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website or blog. If you don’t want to learn how to do WP maintenance yourself, pay a professional to do it but make sure it gets done. Backing up your site is the next most important thing you must do after making sure that you still have a pulse!

If you don’t want to back up your site manually, there are a number of plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Backup, Copy & Keep Your WP Websites Protected With Backup Creator Plugin For WP

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

The large scale brute force attack on WordPress is mostly an attempt to compromise site administrator panels and gain access to sites by exploiting WP sites that used “admin” as their username.

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

We have created a simple tutorial on how to change your login username here: How To Change Your Admin User Name In WordPress

Security Measure #4 – Use A Strong Password

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

Unless some measure is put into place to stop 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 breaks into your admin area.

Weak passwords, therefore, become really easy targets for botnets. Make sure that you change your password to a string that contains at least 8 characters long, with upper and lowercase letters, and add a few “special” characters (e.g. %, #, *, etc).

Useful Tip

You can use a password management software tool like Roboform to create unbreakable passwords …

Roboform is a password management program that lets you easily create secure login passwords(You can use a password management program like Roboform to generate very secure passwords)

We have created a step-by-step tutorial created especially for non-technical admin users that shows you how to change your login password here: Changing Passwords

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

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

wp-config.php

(wp-config.php file)

If a hacker breaks into your website, they will 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 someone to change anything in your database, create a user account, upload files and take control of your site.

To protect your WordPress site from attacks and even being used as part of a bot net, therefore, prevent your wp-config.php file from being easily 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 Installation Files

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

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

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

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

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

Security Measure #8 – Disable The Theme Editor

WordPress installations come with a built-in editor feature that lets you edit theme and plugin code inside the dashboard.

In WordPress, you can access the WordPress Theme Editor by selecting Appearance > Editor in the dashboard menu …

WordPress Theme Editor Menu

(The WordPress theme editor can be accessed using the WordPress dashboard menu)

The WordPress theme feature lets anyone accessing your blog’s admin view and edit your WordPress files, and create mayhem on your site.

To prevent unauthorized people from being able to access the 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 WordPress “uploads” folder contains all the media that gets uploaded to your WordPress site.

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

(WordPress uploads directory)

(WordPress uploads directory)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by malicious users, someone can upload unauthorized file types or compromise the security of your website.

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 an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to hire a professional if you are unsure about what to do.

Security Measure #10 – Use Security Plugins

There are several WordPress security plugins available that specifically address common security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital areas of your site, protecting your files from brute-force attacks, preventing unauthorized file uploads, etc.

Most 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 - complete security software for WordPress

(SecureScanPro – total security software for WordPress)

SecureScanPro is easy to install and easy to use, and does a great job of fixing most of the security issues that WordPress users need to address.

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

Blog Defender Security Solution

Blog Defender WordPress Security Product Suite(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 the security weaknesses in your website are …

Blog Defender Security Product SuiteAnd then shows you how to fix these quickly and easily …

Blog Defender Security PluginIf you don’t want to buy a premium 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 secure web platform, but neglecting simple maintenance tasks like keeping your WP installation, WP plugins and WordPress themes up-to-date, tightening file and data security and taking other necessary precautions can expose your website to attacks by hackers and bots.

No matter what 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 website security.

As one last reminder, below is the advice given by a web security expert to all WordPress users following the worldwide 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, the above 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 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 via email when we publish new tips on WordPress security and reviews of WordPress security plugins and solutions.

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)

***