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 SecurityBeing the world’s most popular content management system makes WordPress an easy target for attempted attacks by hackers.

In 2013 a mass brute force attack hit WordPress installations on virtually every web host in existence around the world.

These attacks were caused by botnets (infected computer networks programmed to attack other sites with security vulnerabilities).

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 ways hackers try to break into WordPress sites. One of these is by trying to guess the site’s administration login username and password. This is done using software programs that can guess hundreds of possible logins in minutes.

If you’re not using strong usernames or unguessable passwords, your site can be easily hacked by repeated attempts to work out your site’s login details.

This is called a “brute-force” 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.org)

”Botnets” are networks of computers that have been infected with malicious code or software, which can then be controlled remotely as a group, often without the computer owners even being aware of this.

Botnets are often used to blast out mass spam emails.

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 infecting computer networks all around the world since 2009 called “Zeus” …

The Zeus botnet 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. Screenshot: SecureList.com)

These were highly distributed and well organized attacks. Over 90,000 IP addresses were identified by a number of hosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress user administration areas. The large-scale brute force attacks then continued, with over 30,000 WordPress blogs being hacked every day.

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

WordPress is often the target of attacks by hackers, due to its popularity

(WordPress is frequently the target of worldwide malicious attempts by hackers, due to its popularity)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

We explain why WordPress is a secure web platform in this article: Are Open Source Web Platforms Like WordPress Secure? What Every Blog Owner Needs To Know About WordPress

Useful Information

It’s important to note that, in the case of the worldwide brute-force botnet attack described above, there was actually no WordPress vulnerability being exploited (the same script was also targeting 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 botnet 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 – Ten Security Checks

Every blog with a security vulnerability can be an opportunity to hackers. A vulnerable site not only provides new hackers opportunities to improve their skills and win “respect” from their peers, but it can also acts as a valuable platform for launching denial of service attacks, distributing malware and as a source of information theft.

If someone can find a vulnerability that allows them to gain control of your web site, that site can then be used as a “bot” to attack larger and more valued websites.

Additional undesirable consequences of being hacked include getting blacklisted by Google, having stealthy spam links promoting things like online meds, cheap offers on brand names, etc. inserted into your content and page title and descriptions, redirecting visitors to phishing sites or other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasty things.

The truth is that hackers are very likely scouring for vulnerabilities and trying to break into your web site right now. Whether they can do this successfully or not, depends on how difficult or easy you will make it for them to continue trying until they either discover a way to break in, or decide to look for a more vulnerable target.

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

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

Website Security Check(Hackertarget – WordPress Security Check Screenshot: https://hackertarget.com/wordpress-security-scan)

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

Website Security Check

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

It should be obvious after using this scanning tool that if you are able to freely access all of this information about your WordPress website, then so can hackers.

Website Security Check(Screenshot image: 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 are all potentially valuable information to hackers, as these can inform them about potential vulnerabilities, especially in older versions.

If your website is powered by WordPress and you’re not precautionary steps to toughen up your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your website, because these attacks are systematically hitting WordPress sites all the world!

When a site is hacked, webmasters will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been vandalized or even that their content has been entirely wiped out. Often, most sites will become infected with malicious scripts or viruses without the owner even being aware that this has taken place.

To avoid the heartache that comes with having your website being hacked into, below are 10 essential and effective security checks that will help to protect your WordPress site from brute-force botnet attacks.

Important Info

Note: Some of the recommended measures listed 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 code on your site, then ask your web host or a professional WordPress technical provider for assistance.

***

Security Measure #1 – Get In Touch With Your Webhosting Company

Get in touch with your webhosting provider and ask them what precautions they offer to protect your site from being attacked, and what is done to ensure that your WordPress sites get regularly backed up.

Check that your webhosting service provider regularly backs up your sites and that, if disaster strikes, you can easily get back your files and data.

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

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

A proper WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WordPress website or blog fully backed up and up-to-date is. WordPress maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website. If you don’t want to learn how to do WordPress site 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 you are still breathing!

If you don’t want to perform manual backups, there are many free and paid plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Backup, Copy And Protect Your WP Web Site With Backup Creator WordPress Plugin

Security Measure #3 – Make Sure That Your Username Is Not “Admin”

The mass brute-force botnet attack on WordPress is mostly an attempt to compromise site admin panels and gain access to sites by exploiting WP installations using “admin” as the username.

For website security purposes, avoid setting up WordPress sites with the username “admin”. This is the first area hackers will test. If your site’s user name is admin, you need to change it immediately.

We have created a simple step-by-step tutorial for WordPress admin users on how to change your username here: Changing Your WordPress User Name From Admin To Another Username

Security Measure #4 – Make Sure Your Password Is Secure

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

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

Passwords that are easy to guess, therefore, become really easy targets for bot attacks. Make sure that you change your password combination to something containing at least eight characters long, and that includes upper and lowercase letters, combined with a few “special” characters (e.g. %, #, *, etc).

Tip

Roboform is a password management tool that lets you easily generate different unbreakable passwords …

Roboform is a password management software that lets you generate different  passwords(You can use a password program like Roboform to help you generate passwords)

We have created a simple tutorial for non-technical WordPress users that shows you how to change your login password here: How To Reset A Password In WordPress

Security Measure #5 – Deny Access To 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 file

(wp-config.php file)

If a hacker breaks into your site, they will typically look for the wp-config.php file, because this is the file that contains your database details, 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 your wp-config.php file from being accessible. 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 Site Installation Files

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

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

Security Measure #7 – Keep Your WordPress CMS, Plugins And Themes Up-To-Date

Hackers are always on the lookout for vulnerabilities in outdated versions of WordPress that can be exploited, including out-of-date versions of themes and plugins.

Ensure that all of your WordPress installation files, themes, plugins, etc. are always up to date.

Security Measure #8 – Disable The Theme Editor

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

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

WordPress Theme Editor Menu

(The WordPress theme editor is accessible using the main menu)

The WordPress theme editor lets anyone accessing your site view and edit your WP theme templates, or cause mayhem on your site.

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 – Remove Access To Your WordPress Uploads Folder

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

By default, this folder is visible to online users. All a person needs to do to see the contents stored in your site’s “uploads” directory is visit the directory using a web browser …

(WordPress has an uploads directory where your media files are stored)

(WordPress uploads directory)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers, this can threaten the security of your website.

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, adding a blank index.php file (this is literally a file with nothing in it named “index.php”) to your uploads directory, and so on. Again, it’s best to ask help from someone who knows what they are doing if you are unsure about what to do.

Security Measure #10 – Install WordPress Security Plugins

A number of great WordPress security plugins are available that specifically address common security issues faced by WordPress website owners, such as preventing hackers from accessing your site, protecting your files from botnets, preventing unauthorized file uploads, etc.

Many WordPress plugins address some but not all areas of WordPress security. One WordPress plugin that does a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your site files and causing damage to your site is SecureScanPro.

SecureScanPro - total security software for WordPress

(SecureScanPro – complete security software solution for WordPress)

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

Another great plugin you may want to consider using is BlogDefender.

Blog Defender Security Plugin For WordPress Web Sites

Blog Defender(Blog Defender WordPress Security Product Suite)

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

BlogDefender scans you web site for potential security holes …

Blog DefenderAnd lets you fix these quickly …

Blog Defender Security Suite For WordPress Websites & BlogsIf you don’t want to invest in a security plugin like SecureScanPro or BlogDefender, you can 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 updating your WordPress software, WordPress plugins and WordPress themes, tightening file and data protection and taking other necessary precautions can expose your site to malicious by hackers and bots.

Regardless of the type 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 web site.

As a final 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 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, this information 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.

Also, please subscribe to WPCompendium.org to receive notifications when we publish new tips on WordPress security and reviews of 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

***