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 around the world, which makes it an obvious target for attempted attacks by hackers.

In 2013 a worldwide brute-force attack began hitting WordPress installations on almost every web host in existence around the world.

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

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

What Are 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 WordPress sites. One of these is by trying to guess the site admin’s login username and password. This is achieved with software tools and scripts that can work through hundreds of possible logins in minutes.

If you’re using weak usernames and passwords that are easy to guess, your website can be an easy target for hacking attempts.

This is called a “brute-force” login attack.

What Are 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)

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, typically without the unsuspecting computer owners’ knowledge or awareness.

Botnets are regularly used to blast mass spam emails.

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 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 globe since 2009.

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

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

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

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

(WordPress is often the target of large-scale attacks by hackers)

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

No. In fact, there are lots of great 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 A Secure Website Platform?

Important

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

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

Protecting Your WordPress Blog From Being Brute Force Attacked – Ten Security Points

Every blog with a vulnerability provides an opportunity to hackers. An unsecured blog provides hackers with a valuable platform to launch denial of service attacks, spread malware and use your site to defraud innocent people.

If hackers can exploit a vulnerability in your security setup and gain remote control of your blog, that website or blog can then be used to attack more valuable sites.

Additional undesirable results of having your site hacked and your site security compromised include being blacklisted by search engines, having spammy links promoting things like casinos, discounted fashion, etc. inserted into your content and page title and descriptions, malicious redirects to phishing sites, drive-by downloads (adding malware on your visitors’ computers), and lots of other nasties.

The reality is that brute-force software bots are probably trying to hack into your website at this very moment. Whether they will hack in depends on how difficult or easy you will make things for hackers or botnets to continue trying until they can find how to break in, or are forced to give up and decide to look for a less secure target.

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

If you visit Hackertarget.com and run your site through their WordPress security check …

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

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

Hackertarget - WP Security Check

(Hackertarget – WordPress security check results. Source: Hackertarget.com)

It should be obvious after using the above tool that if you are able to see all of this information about your site, hackers can too.

WP Security Scan(Screenshot: BlogDefender.com)

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 can all be valuable information to hackers, as this can inform them about any potential security weaknesses, especially where the owners haven’t updated their sites.

If your site or blog runs on WordPress and you are not proactive steps to bullet-proof your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your installation, because these attacks are systematically targeting WordPress installations worldwide!

Typically, when a website or blog is broken into, webmasters will find themselves “locked out” of their own site, or notice that their files have been interfered with or even that their content has been completely wiped out. Often, compromised sites will become infected with malicious software without the owner’s knowledge or awareness.

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

Useful Info

Note: Some of the recommended steps shown below require some technical skills to modify core WordPress or server files. If you have no web skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress service provider for help.

***

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

Contact your web host and ask them what security precautions they have put into place to help prevent your site from brute force attacks, and what they are doing to make sure that your files and data get regularly backed up.

Check that your hosting company is regularly backing up your sites and that, if anything goes wrong, you can quickly and easily get back your site.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Or Blog Regularly Maintained

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

A complete WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

Maintaining your WP installation backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress installation fully backed up and updated is vitally important for WordPress security. Image source: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WP website 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 or blog. If you don’t want to learn how to do WP maintenance yourself, pay someone to do it but make sure this gets done. Backing up your site is the next 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 free and paid plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Back Up, Copy & Keep Your WP Site Protected With Backup Creator Plugin For WP

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

The mass brute-force botnet attack on WordPress is mostly attempting to compromise website administrator panels by exploiting WP sites with “admin” as the account name.

For security reasons, don’t set up WordPress sites with the username admin. This is the first area hackers will test. If your blog’s user name is admin, then make sure you change it immediately.

We have created a step-by-step tutorial on how to change your login username here: Changing Your WP Username From Admin To Another Username

Security Measure #4 – Make Sure Your Password Is Hard To Guess

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

Unless you put some measure in place to block the brute force attack from happening (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just continue attacking your site until it eventually breaks into your admin area.

Weak passwords, therefore, become very easy targets for botnets. Make sure that you change your password to a string that is at least eight characters long, with upper and lowercase letters, combined with “special” characters (e.g. ^, $, @, etc).

Tip

If you have trouble coming up with strong passwords or you are reluctant to set up different passwords for all your online logins, then use a password management tool like Roboform …

Roboform is a password management program that lets you easily create different  passwords(You can use a password management tool like Roboform to help you generate hard-to-crack passwords)

We have created a simple step-by-step tutorial for non-technical admin users that shows you how to change your password here: Changing The Login Password

Security Measure #5 – Protect Your WP Config File

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

wp-config.php

(wp-config.php file)

If a hacker breaks into your site, they will typically try to access 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 a hacker 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 – Delete Or Rename Unnecessary Installation Files

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

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

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

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress comes with a built-in editor that lets the administrator edit plugin and theme files inside the dashboard area.

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

WordPress Theme Editor Menu

(The WordPress theme editor is accessible using the WP dashboard menu)

This means that anyone logging into your blog’s admin can view and modify all of your WordPress theme files, and cause mayhem 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 – Prevent Access To Your Site’s Uploads Folder

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

By default, this folder is visible to online users. All someone has to do to see the contents in your “uploads” directory is visit the directory using their browser …

(WordPress uploads directory)

(WordPress uploads folder)

If any directories in your website have vulnerabilities that can be exploited by hackers or malicious users, someone can 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, adding 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 get professional assistance if you are unsure about what to do.

Security Measure #10 – Install WordPress Security Plugins

Several security plugins for WordPress are available that will address many common security issues faced by WordPress website owners, such as preventing hackers from gaining access to vital areas of your site, protecting your website from malicious scripts, preventing injections of code into files, 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 issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.

SecureScanPro - WordPress total security plugin

(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 areas that WordPress users need to address.

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

Blog Defender

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

Blog Defender is a suite of WordPress security video tutorials, WordPress plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender shows you where the security weaknesses in your WordPress site are …

Blog Defender Security Product Suite For WordPressAnd then shows you how to quickly and easily fix these …

Blog DefenderIf you don’t want to buy 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 secure platform, but neglecting essential maintenance tasks like keeping your WP software, WordPress plugins and themes up-to-date, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

No matter what type 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 simply cannot afford to ignore.

As one last reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users after the global brute force attacks 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, website security is of the utmost importance if you run a WordPress site. Hopefully, the above article has provided you with the initial guidelines and help you need to prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

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

***

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

***