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 SecurityPowering millions of websites worldwide makes WordPress an obvious target for hacking attacks.

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

These attacks were caused by computers infected with viruses and programmed to attack other vulnerable installations (called “botnets”).

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

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)

One of the many ways hackers will attempt to break into a WordPress site is by trying to guess the site admin’s login username and password. To attempt this, hackers use scripts and tools that can work through hundreds of possible logins in minutes.

If you’re using weak login details, your site could be easily hacked by a software’s repeated attempts to guess your site’s login details.

This is called a “brute force” login attack.

Botnets

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)

”Botnets” are networks of private computers that have been infected with malicious code, which are then controlled remotely as a group, typically without the computer owners even being aware that this is taking place.

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

The screenshot below was taken from an online 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 world since 2009.

(ZeuS is a botnet that has been actively compromising computer networks all around the globe since 2009. Image source: SecureList.com)

The botnet attacks on WordPress were highly distributed and well organized. 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 site administration areas occurred. The brute force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked each day.

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

Powering millions of sites worldwide makes WordPress an obvious target for hacker attacks

(WordPress is the world’s most used content management system which makes it a target for attempted attacks by malicious users)

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

No. In fact, there are many very good reasons why you should choose WordPress if you are concerned at all about the security of your web presence.

We explain why WordPress is a secure web platform in this article: Are Open Source CMS Platforms Like WordPress Secure?

Info

It’s important to understand that, in the case of the 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, 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 Being Brute-Force Attacked – 10 Security Measures

You may think that the information in your website provides little to no value to hackers, but the reality is that to a hacker, all websites are an opportunity to gain some benefit at your expense.

If a malicious user can hack and remotely control your web site, the site can then be used as a “bot” to attack more valuable websites.

Additional undesirable impacts of having your website hacked include getting blacklisted by Google, having stealthy spam links promoting things like casinos, porn, etc. in your content and meta data, malicious redirects to phishing sites, drive-by downloads (adding malicious software on your visitors’ computers), and lots of other nasties.

The harsh reality is that hackers are probably trying to hack into your site while you are reading this page. Whether they will do this successfully or not, depends on how hard or easy you can make it for hackers and botnets to keep persisting until they can discover how to get in, or are forced to give up and go look for an easier target.

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

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

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

You will see that the scan will display a number of results and information about your WordPress setup …

Website Security Check

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

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

WP Security Check(Screenshot image: Blog Defender)

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

If your website is powered by WordPress and you are not proactive steps to bolster the security of your site, we can practically guarantee that, at some point, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically targeting WordPress installations around the world!

Whenever a website gets hacked, webmasters can find themselves “locked out” of their own site, or notice that their files have been interfered with or even entirely wiped out. Typically, compromised sites will become infected with malicious scripts without the owner even being aware that this has happened.

To help avoid the heartache of discovering that your website 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 hackers.

Disclaimer

Note: A few of the recommended measures listed below need some technical skills to modify core WordPress and/or server files. If you are not technical-minded, or don’t want to mess around with code on your site, then ask your web host or a professional WordPress service provider for assistance.

***

Security Measure #1 – Contact Your Web Host

Contact your webhosting provider and ask them what security systems they have put into place to protect your site from brute-force attacks, and what is done to make sure that your WordPress sites get backed up.

Check that your hosting company is backing up your sites and that, if disaster strikes, you can easily get back your site.

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 hosting provider 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 regular basis (e.g. weekly, monthly, etc …)

A full 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 software, themes and plugins are up-to-date,
  • etc …

A full WordPress maintenance routine looks like this …

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

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

If you don’t want to perform manual backups, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Back Up, Copy And Protect Your WordPress Websites With Backup Creator Plugin For WordPress

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

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

For reasons of website security, never set up WordPress sites with the username admin. This is the first thing hackers will test. If your site’s user name is admin, then change this immediately.

For a simple step-by-step tutorial for non-technical WordPress admin users on how to change your username, go here: Changing Your WP Username From Admin To Another Username

Security Measure #4 – Change Your Password

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

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

Weak passwords, therefore, make very easy targets for botnets. Make sure that you change your password to a string that contains at least 8 characters long, with both upper and lowercase letters, combined with a few “special” characters (%^#$@&*).

Tip

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

Roboform is a password program that lets you easily generate strong passwords(Roboform is a password management program you can use to create different secure passwords)

For a detailed tutorial for non-technical WP admin users on how to change your WordPress admin password, go here: How To Reset A Password In WordPress

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

The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced WordPress options.

WordPress WP Config file

(wp-config.php file)

If a hacker breaks into your site, they will search for the 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 them 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, you must 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

Rename or delete your install.php, upgrade.php and readme.html files.

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

Security Measure #7 – Keep Your WordPress Site, Themes & Plugins Up-To-Date

Hackers look for vulnerabilities they can exploit in older versions of WordPress, 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 installations come with a built-in editor feature that allows the site administrator to edit plugin and theme files from the dashboard area.

In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor from the main menu …

WP Theme Editor Menu

(Accessing the WordPress theme editor via the admin menu)

This allows anyone accessing your blog’s admin to view and make changes to your WordPress theme templates, and cause mayhem on your site.

If you want to prevent people from accessing 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 – Protect Your WordPress Uploads Folder

The WordPress “uploads” folder stores all the media that gets uploaded to your blog.

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

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

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

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

Protecting your directories will prevent online users 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 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 – Use Security Plugins

A number of great security plugins for WordPress are available that specifically address most common security issues WordPress site owners face, such as preventing hackers from gaining access to vital information about 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 WordPress security plugin that does a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your site files and damaging your site is SecureScanPro.

SecureScanPro - total security plugin for WordPress

(SecureScanPro – WP total security software)

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

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

Blog Defender

Blog Defender WordPress Security Plugin(Blog Defender Security Plugin For WordPress)

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

BlogDefender shows you where the security holes in your web site are …

Blog Defender Security Plugin For WordPress SitesAnd lets you fix these quickly, easily and inexpensively …

Blog Defender Security SuiteIf you don’t want to buy a premium 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 basic maintenance tasks like making sure that your WP core files, plugins and themes are kept updated to their latest versions, tightening file and data protection and taking other necessary precautions can expose your website to malicious 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, website security is something you cannot ignore.

As a final reminder of the importance of keeping your websites protected, 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, the information in 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 consult a WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

Also, don’t forget to subscribe to WPCompendium.org to receive notifications whenever we publish new tutorials on WordPress security and tutorials about WordPress security plugins and solutions.

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie

***