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 powers millions of websites and blogs around the world, which makes it an obvious target for hacking attacks.

In early 2013, WordPress installations around the world were subjected to large-scale brute force attacks.

These attacks were caused by computer networks infected with malware and programmed to attack other vulnerable sites (called “botnets”).

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)

There are many methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. To achieve this, hackers use scripts and software that automatically tries to guess hundreds of login permutations in minutes.

If you’re using obvious user names and weak passwords that are easy to guess, your site can be easily hacked by a script’s repeated attempts to guess your site’s login details.

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)

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

Botnets are regularly used to send mass spam emails.

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

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 image: SecureList.com)

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

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

WordPress is the world's most popular content management system making it a target for hacking attempts

(WordPress is the world’s most used CMS making it a target for malicious attempts by hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are lots of good reasons why you should continue using WordPress if you are concerned at all about the security of your online presence.

We explain what makes WordPress a very secure web platform in this article: Are Open Source Web Platforms Like WordPress Secure?

Important Info

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

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

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

Every web site with a vulnerability offers some value to hackers. An unsecured website or blog not only presents hackers opportunities to improve their hacking skills and claim “bragging rights” from their peers, but it can also be a valuable resource for launching DDoS attacks, spreading malware and defrauding site visitors through information theft.

If a malicious user can exploit a vulnerability in the system, that website can then be employed as part of a larger network of “bots” to target larger and more highly-valued websites.

Additional undesirable effects of having your website hacked include getting blacklisted by search engines, having spammy links advertising things like online meds, 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 many other nasty things.

The truth is that software-driven bots are trying to hack into your website or blog as you are reading this article right now. Whether they will do this successfully or not, depends on how hard you will make it for them to continue trying until they either can discover how to get in, or decide to look for a less protected target.

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

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

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

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

Hackertarget - Website Security Check

(WP security scan results. Image source: Hackertarget.com)

It should be obvious after using the tool shown above that if you are able to freely access all of this information, so can hackers.

Website Security Check(Source: BlogDefender website)

The ability 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 in your site can all be potentially useful information to hackers, as these can inform them about potential vulnerabilities, especially in older versions.

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

When a website or blog gets hacked, site owners can find themselves completely “locked out” of their own site, or notice that their files have been modified 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 and frustration that comes with discovering that your web site has been hacked into, below are 10 essential and effective security checks that will help to prevent your WordPress site from being attacked by brute force botnet hacking attempts.

Useful Info

Note: Some of the measures listed below require some technical skills to modify core WordPress and server files. If you have no web editing 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 Web Host

Get in touch with your hosting service and ask them exactly what systems are in place to help prevent your site from brute force attacks, and what they do to ensure that your server files and data are regularly being backed up.

Make sure that your webhosting service is regularly backing up your server files and that, if anything should happen, you can easily get back your site.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Or Blog Regularly Updated

You should never rely only on your hosting service for your site backups. Instead, learn how to maintain your WordPress site or pay someone to get this service done for you and maintain a habit of religiously performing a complete site maintenance routine on a regular basis (e.g. weekly, fortnightly, etc …)

A full WordPress maintenance routine ensures that:

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

A proper WordPress maintenance routine looks like this …

Maintaining your WordPress site completely backed up and updated is vitally important for WordPress security.(Maintaining your WordPress web site backed up and updated is vitally important for WordPress security. Image source: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WordPress website frequently backed up and up-to-date. WordPress site 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 do not want to learn how to do WordPress site maintenance yourself, get someone else to do it but make sure it gets done. Backing up your website is the next most important thing you must do after making sure that your heart is still beating!

If you don’t want to back up your files manually, there are many free and paid plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Back Up, Clone & Protect Your WordPress Web Sites With Backup Creator WordPress Plugin

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

The large scale brute-force attack on WordPress sites was mostly attempting to compromise site administrator panels by exploiting WP sites using “admin” as their username.

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

We have created a detailed step-by-step tutorial for WordPress users that shows you how to change your admin username here: Changing Your WordPress User Name From Admin To Another User Name

Security Measure #4 – Use Strong Passwords

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

Unless you put some measure in place to block the brute force attack from happening (see further below for a couple of effective ways to do this), the “bot” will just continue to attack your site until it eventually gets access.

Weak passwords, therefore, make very easy targets for hacking attacks. Make sure that you change your password combination to a string that contains at least eight or nine characters long, with both upper and lowercase letters, combined with “special” characters (e.g. ^, #, @, etc).

Practical Tip

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

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

We have created a step-by-step tutorial on how to change your WordPress admin password here: How To Change Passwords

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

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

WP Config file

(WordPress WP Config file)

If hackers break into your 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 people finding 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

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

You can remove these files after installation. If you don’t want to remove these files, then just rename them.

Security Measure #7 – Upgrade Your WordPress Site, Plugins & Themes To Their Latest Version

Hackers are always on the lookout for vulnerabilities they can exploit in older versions of WordPress, including out-of-date versions of WordPress themes and plugins.

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

Security Measure #8 – Disable Your Theme Editor

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

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

WP Theme Editor Menu

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

The WordPress theme editor lets anyone accessing your site’s admin area view and edit your WordPress theme templates, or create mayhem on your site.

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

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

By default, this folder is visible to anyone online. All someone has to do to see all of the contents stored in the “uploads” directory is visit your directory using a web browser …

(WordPress has an uploads directory where media content is stored)

(WordPress uploads directory)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, anyone could upload unauthorized file types to 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, uploading 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 ask for assistance from someone who knows what they are doing if you are unsure about what to do.

Security Measure #10 – Use Security Plugins

Several security plugins for WordPress are available that specifically address common security issues WordPress site owners face, such as preventing hackers from accessing your site, protecting your site from malicious exploits, preventing unauthorized file uploads, etc.

Most WordPress plugins address some but not all areas of WordPress security. One security plugin that seems to do 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 - complete security software for WordPress

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

Blog Defender Security Suite

Blog Defender Security Solution For WordPress(Blog Defender)

This product 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 WordPress installation are …

Blog Defender Security SolutionAnd then shows you how to easily fix these …

Blog Defender Security Plugin For WordPressIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, you can use various free WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting simple maintenance tasks like updating your WordPress installation, WP plugins and themes, tightening file and data security and taking other necessary precautions can expose your site to attacks by hackers and bots.

No matter what type of business you run or plan to run online and how small you think your web presence is, web security is something you cannot afford to ignore.

As one last reminder, below is the advice given by an expert on website security to all WordPress users after the worldwide 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 has shown you what to do to keep your WordPress site protected from brute force attacks. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified via email when we publish new tutorials on WordPress security and tutorials about new 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

***