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 used CMS which makes it an easy target for hackers.

In 2013 a global brute force attack hit WordPress installations on almost every WP hosting server in existence around the world.

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

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 admin’s login username and password. This is achieved using scripts and software that automatically tries to guess hundreds of possible logins in minutes.

If you’re using weak user names and passwords, your site can be an easy target for hackers.

This is called a “brute force” login 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/botnet)

A “Botnet” is a network of computers that have been infected with malicious code, which can then be controlled remotely as a group, often without the unsuspecting computer owners’ knowledge.

Botnets are typically used to blast mass spam emails from the infected computers of compromised user accounts.

Below is a screenshot taken from an online security monitoring site showing the locations of the command centers of ZeuS – a botnet that 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.

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

These were highly distributed and well organized attacks. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack, when millions of attempts to force their way into WordPress users admin areas occurred. The large-scale brute-force attacks then continued, with over 30,000 WordPress sites being hacked per day.

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

Powering millions of sites around the world makes WordPress an obvious target for hacking attempts

(Being the world’s most used content management system makes WordPress a target for hacker attacks)

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 use WordPress if you are concerned about the security of your online presence.

To learn what makes WordPress a very secure platform for websites, read this article: How Secure Is WordPress?

Important Info

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

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

How To Protect Your WordPress Website From Being Brute Force Attacked – 10 Security Points

Every blog with a vulnerability can be seen as an opportunity to hackers. A compromised blog presents hackers with a resource to launch DDoS attacks, spread malware and engage in information theft.

If hackers can discover a flaw in the security setup, your website can then be used as a “bot” in a planned cyber attack against larger and more highly-valued sites.

Additional undesirable effects of having your site hacked and your site security compromised include being blacklisted by search engines, having spammy links promoting things like online meds, porn, etc. in your content and page title and descriptions, malicious redirects to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasties.

The reality is that brute-force software bots are most likely looking for security weaknesses and trying to break into your website or blog while you are reading this article at this very moment. Whether they will successfully hack into your site depends on how difficult or easy you will make things for hackers to keep trying until they either can work out a way to get in, or give up and decide to look for a less protected target.

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

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

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

You will see that the test will yield a number of results and information about your site …

WordPress Security Check

(WP security scan results. Product image: Hackertarget.com)

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

WordPress Security Scan(Source: BlogDefender website)

Being able 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 can be valuable information to hackers, as this informs them about exploitable security weaknesses, especially in older versions.

If your site or blog runs on WordPress and you are not proactive steps to bullet-proof your site, then it’s practically guaranteed that, at some point in time, someone will attempt to hack your site, because these brute force attacks are systematically targeting WordPress installations around the world!

Whenever a site is broken into, webmasters can 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 completely wiped out. Typically, most compromised sites will be infected with malicious software without the owner’s knowledge or awareness.

To help avoid the heartache and aggravation of having your website or blog being hacked into, below are 10 essential and effective security checks that will help to protect your WordPress site from being attacked by brute-force botnet hacking attempts.

Important

Note: A few of the measures below need some technical understanding of how to modify core WordPress and 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 search for a professional WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Web Host

Get in touch with your hosting provider and ask them exactly what precautions have been put into place to protect your site from being attacked, and what is done to make sure that your files and data are regularly being backed up.

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

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Frequently Maintained

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

A complete WordPress maintenance routine ensures that:

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

A full WordPress site maintenance routine looks like this …

Maintaining your WP site regularly backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP 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 important it is to maintain your WP installation backed up and up-to-date. WP site maintenance is not hard or time-consuming, but it must be done to ensure the security of your website. If you do not want to learn how to do WP maintenance yourself, pay a professional to do it but make sure this gets done. Backing up your website is the next most important thing you should do after making sure that you still have a pulse!

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

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

The mass brute force botnet attack on WordPress is mostly attempting to compromise site admin panels and gain access to sites by exploiting WP sites that used “admin” as the username.

For security purposes, never set up a WordPress site with the username “admin”. This is the first area hackers will test. If your site’s username is “admin”, change this immediately.

We have created a simple tutorial that shows you how to change your admin username here: How To Change Your Admin User Name In WordPress To A Different User Name

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

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

Unless some measure is put into place to prevent the brute-force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually “cracks” the code.

Passwords that are easy to guess, therefore, become very easy targets for attacks. Make sure that you change your password to a string that is at least eight or nine characters long, with both upper and lowercase letters, combined with a few “special” characters (%^#$@&*).

Practical Tip

You can use a password program like Roboform to help you generate secure passwords …

Roboform is a password tool that lets you generate really secure passwords(Roboform is a password tool that lets you create different secure login passwords)

We have created a step-by-step tutorial created especially for WP admin users that shows you how to change your WordPress password here: What To Do If You Need To Change Your Password

Security Measure #5 – Prevent Your wp-config.php File From Being Visible

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

wp-config.php file

(wp-config.php)

If a hacker breaks into your website, they will typically 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.

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 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 your install.php, upgrade.php and readme.html files.

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

Security Measure #7 – Update Your WordPress Software, Themes And Plugins

Hackers search for vulnerabilities they can exploit in older WordPress versions, including out-of-date versions of WordPress themes and plugins.

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

Security Measure #8 – Disable The Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor using the WordPress main menu)

The WordPress theme editor feature allows anyone accessing your site’s admin area to view and modify all of your WordPress theme files, or cause mayhem on your site.

If you want to prevent people from being able to access your WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Remove Access To Your WordPress Uploads Folder

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

Normally, this folder is visible to online users. All someone has to do to view the contents stored in the “uploads” folder is visit your directory using a web browser …

(WordPress uploads directory)

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

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, someone could 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 a blank file named “index.php”) to your uploads directory, and so on. Again, it’s best to consult a professional if you are not sure about what to do.

Security Measure #10 – Use Security Plugins

A number of great WordPress security plugins are available that will address 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.

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 potential issues that could lead to hackers accessing your website files and damaging your site is SecureScanPro.

SecureScanPro - complete security software solution for WordPress

(SecureScanPro – WP complete security plugin)

SecureScanPro is easy to install and easy to use, and takes care of most of the security issues that WordPress users need to address.

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

Blog Defender

Blog Defender Security Product Suite 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 scans you WordPress site for security vulnerabilities …

Blog Defender Security Suite For WordPress SitesAnd lets you fix these quickly …

Blog Defender Security Suite For WordPress WebsitesIf you don’t want to invest in a premium 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 very secure platform, but neglecting simple maintenance tasks like ensuring that your WordPress software, WordPress plugins and WordPress themes are kept up-to-date, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

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

As one last reminder of the importance of keeping your websites protected, below is the advice given by a security expert to all WordPress users following the mass 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, 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.

Also, remember subscribe to WPCompendium.org to be notified via email whenever we publish new articles on WordPress security and reviews of new security plugins.

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org

***