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 often comes under attack by hackers.

In early 2013, WordPress installations around the world were subjected to a worldwide brute-force attack.

These attacks were caused by botnets (computers infected with viruses and programmed to attack other sites with security vulnerabilities).

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 do this, hackers use scripts and software tools that automatically tries to guess hundreds of login possibilities in minutes.

If you’re using weak usernames and weak passwords that are easy to guess, your site can be easily hacked by the script’s repeated attempts to guess 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 private computers that have been infected with malicious software, which are then controlled remotely as a group, typically without the computer owners’ knowledge.

Botnets are typically used to send mass spam emails.

The screenshot below was taken from an online security monitoring site showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the world since 2009 …

The Zeus botnet has been actively infecting computer networks all around the globe since 2009.

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

The botnet attacks are 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 user admin areas occurred. The worldwide brute force attacks then continued, with over 30,000 WordPress blogs being hacked every day.

News of this worldwide brute force attack was widely reported in all the major webhosting companiesand 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 the world's most used content management system making it a frequent target for hacking attacks

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

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are many great reasons why you should choose WordPress if you are concerned at all about website security.

We explain why WordPress is a secure web platform in this article: Why WordPress Is A Secure Platform For Websites –

Important

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

Mike Little, one of the co-founders 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 website or blog with a vulnerability offers some value to hackers. A vulnerable website or blog not only provides hackers opportunities to improve their hacking skills and claim “bragging rights” from their peers, but it can also be a platform for launching distributed attacks, distributing malware and participating in information theft.

If a malicious user can hack and gain remote access and control of your blog, your website or blog can then be employed as a “bot” to attack more valued web sites.

Additional undesirable results of being hacked include being blacklisted by Google, having spammy links advertising things like casinos, discounted fashion, etc. inserted into your content and page title and descriptions, malicious redirects to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasty things.

The truth is that hackers are most likely searching for weaknesses and trying to break into your blog at this very moment. Whether they can get in will depend on how hard or easy you can make things for hackers to keep trying until they work out a way to get access, or decide to look for a less protected 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 …

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

You will see that the scan will yield various results and details about your WordPress installation …

Hackertarget - WP Security Check

(Hackertarget – WordPress security scan results. 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, hackers can too.

Hackertarget - WP Security Scan(Screenshot: Blog Defender)

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

If your site or blog runs on WordPress and you are not taking steps to toughen up your site, we can practically guarantee that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these attacks are systematically targeting WordPress installations worldwide!

Typically, when a website or blog is broken into, blog owners can find themselves completely “locked out” of their own site, or notice that their content has been vandalized or that everything has been entirely wiped out. Typically, most sites will be infected with malicious scripts or viruses without the owner even being aware that a breach has taken place.

To help avoid the heartache (and potential financial loss) that comes with discovering that your website has been hacked into, we have listed below ten simple, yet essential and effective security checks that will help to prevent your WordPress site from being brute-force attacked.

Useful Information

Note: Some of the recommended steps below need some technical understanding of how to modify core WordPress or server files. If you are not technical, or don’t want to mess around with file code, then ask your web host or search for a WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Hosting Provider

Contact your hosting provider and ask them exactly what precautions are in place to protect your site from being attacked, and what is done to ensure that your server files and data get backed up.

Make sure that your webhosting provider regularly backs up your server files and that, if anything should happen, you can easily recover your site.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Regularly Maintained

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

A proper WordPress maintenance routine ensures that:

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

A proper WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WordPress website regularly backed up and updated is. WP maintenance is not hard 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 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 many WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Backup, Copy And Keep Your WordPress Web Sites Protected With Backup Creator Plugin For WP

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

the worldwide brute-force botnet attack on WordPress sites was mostly attempting to compromise website administrator panels and gain access to the site by exploiting WP installations with “admin” as their account name.

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

For a tutorial that shows you how to change your WordPress username, go here: Changing Your WordPress Admin User Name To Another Username

Security Measure #4 – Choose A Strong Password

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

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

Passwords that are easy to guess, therefore, make really easy targets for hacking attacks. Make sure that you change your password combination to something that is at least 8 or 9 characters long, and that includes upper and lowercase letters, combined with a few “special” characters (e.g. ^, #, *, etc).

Useful Tip

Roboform is a password tool you can use to generate different secure passwords …

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

For a detailed step-by-step tutorial that shows you how to change your login password, go here: What To Do If You Need To Reset Your Login Password

Security Measure #5 – Secure 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)

If hackers break into your WordPress site, they will normally 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 a hacker to change anything in your database, create a user account, upload files and take control of your site.

To protect your WordPress site from being attacked and even being used as part of a bot net, therefore, 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 – Rename Or Delete 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, as they are unnecessary. If you don’t want to remove these files, just rename them.

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

Hackers search for vulnerabilities in previous versions of WordPress that can be exploited, including out-of-date versions of plugins and themes.

Ensure that all of your WordPress 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 the administrator edit plugin and theme code from the dashboard.

You can access the WordPress Theme Editor by selecting Appearance > Editor in the admin menu …

WP Theme Editor Menu

(The WordPress theme editor is accessible via the admin menu)

This allows anyone accessing your site to see and modify all of your WordPress theme template files, and cause havoc on your site.

To prevent unauthorized 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 – Prevent Access To Your WordPress Uploads Folder

The WordPress “uploads” directory stores all the media files that get uploaded to your website.

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

(WordPress uploads folder)

(WordPress uploads folder)

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, this can compromise the security of 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, adding a blank index.php file (this is literally a file with nothing in it called “index.php”) to your uploads directory, and so on. Again, it’s best to seek professional help if you are not sure about what to do.

Security Measure #10 – Security Plugins

There are a number of security plugins for WordPress available that will address most security issues faced by WordPress site owners, such as preventing hackers from accessing your site, protecting your site from malicious scripts, preventing injections of code into files, etc.

Most WordPress plugins address some but not all areas of WordPress security. One 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 causing damage to your site is SecureScanPro.

SecureScanPro - complete security plugin for WordPress

(SecureScanPro – total security software 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 great plugin you may want to look at using is BlogDefender.

Blog Defender

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

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

BlogDefender scans you WordPress site for security weaknesses …

Blog DefenderAnd then shows you how to fix these quickly and easily …

Blog Defender Security Suite For WordPressIf 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 secure platform, but neglecting basic maintenance tasks like keeping your WordPress software, WP plugins and WordPress themes up-to-date, tightening file and data security 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, you simply cannot afford to ignore the importance of securing your website.

As one last reminder, below is the advice given by a web security expert to all WordPress users following the global brute force attacks 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 keep your WordPress site protected from brute-force attacks. If you need any further help or assistance with WordPress security, please consult a WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to receive notifications whenever we publish new information on WordPress security and reviews of new security plugins and solutions.

***

"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now

***