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 is often the target of malicious attacks by hackers.

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

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

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

What Is A Brute-Force Attack?

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. This is achieved with scripts and software that can work through hundreds of possible logins in minutes.

If you’re using weak usernames and passwords that are easy to guess, your site could be easily hacked by the software’s persistent attempts to work out your site’s login details.

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

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

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

Below is a screenshot taken from a site that monitors online security 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” …

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 globe since 2009. Image: SecureList.com)

These were highly distributed and well organized attacks. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack, when millions of attempts to force their way into WordPress user administration areas occurred. The mass attack continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

Coverage of this worldwide brute force botnet attack was widely reported in 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 US Department of Homeland Security website …

Being the world's most used content management system makes WordPress an obvious target for attempted hacking attacks

(Being the world’s most popular CMS makes WordPress an obvious target for attempted hacker attacks)

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 continue using WordPress if you are concerned at all about the security of your online business.

We explain what makes WordPress a very secure platform for websites in this article: Is WordPress Secure?

Important

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

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

You may think that the information in your website is of no interest to hackers, but the reality is that to a hacker, every website is an opportunity to benefit at your expense.

If a malicious user can exploit a way to take over your blog, your blog can then be employed as a “bot” in a planned cyber attack against other valued websites.

Additional undesirable impacts of being hacked include being blacklisted by Google, having stealthy spam links advertising things like online meds, cheap offers on brand names, etc. inserted into your content, redirecting visitors to phishing sites or other websites, drive-by downloads (adding malware on your visitors’ computers), and lots of other nasties.

The truth is that brute-force software bots are probably trying to break into your website or blog as you are reading these very words. Whether they will break in successfully or not, depends on how challenging you can make it for them to keep trying until they work out how to get access, or give up and decide to look for a less secure target.

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

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

Hackertarget - Website Security Scan(WP 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 - WordPress Security Check

(WP security scan results. Source: Hackertarget.com)

It should be obvious after using the tool shown above that if you are able to see all of this information, then so can hackers.

Hackertarget - Website Security Check(Image source: BlogDefender.com)

The ability to see what 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 be useful information to hackers, as this informs them about exploitable vulnerabilities, especially in older versions.

If your website runs on WordPress and you’re not preventive steps to bullet-proof your site, then 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 sites around the world!

Typically, when a site gets broken into, blog owners can find themselves completely “locked out” of their own site, or notice that their files have been altered or even that their content has been entirely wiped out. Often, compromised sites will become infected with malicious software without the owner even being aware that this has taken place.

To help avoid the heartache of discovering that your web site has been hacked into, below are ten simple, yet essential and effective security measures that will help to protect your WordPress site from being attacked by brute force hackers.

Useful Information

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

***

Security Measure #1 – Contact Your Host

Contact your hosting provider and ask them exactly what security precautions they have put in place to help prevent your site from brute force attacks, and what is done to ensure that your server files and data get regularly backed up.

Make sure that your host is backing up your sites and that, if disaster strikes, you can quickly and easily get back your site.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Frequently Up-To-Date

You should never rely only on your webhosting 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 performing a complete site maintenance routine on a frequent basis (e.g. daily, weekly, monthly, 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 WordPress software, themes and plugins are up-to-date,
  • etc …

A full WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WP website regularly backed up and up-to-date. WP maintenance is not hard or time-consuming, but it must be done to ensure the security of your website or blog. If you do not want to learn how to do WordPress site maintenance yourself, pay a professional to do it but make sure it 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 fully automate your backup process here: Back Up, Duplicate And Keep Your WordPress Sites Protected With Backup Creator WP Plugin

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

the worldwide brute force attack on WordPress sites was mostly attempting to compromise site administrator panels by exploiting installations using “admin” as their user name.

For reasons of website security, never install a WordPress site with the username admin. This is the first area hackers will test. If your site’s user name is “admin”, change this immediately.

We have created a tutorial created especially for WordPress users on how to change your WordPress admin username here: Changing Your Admin User Name In WordPress To A Different Username

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when malicious software continually and persistently hits a login or password field with different character strings trying to guess the right login 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 simple and effective ways to do this), the “bot” will just continue attacking your site until it eventually “cracks” the code.

Passwords that are easy to guess, therefore, make really easy targets for hackers. Make sure that you change your password to a string that is at least eight or nine characters long, with upper and lowercase letters, combined with “special” characters (e.g. %, $, @, etc).

Practical Tip

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

You can use a password management tool like Roboform to generate secure passwords(Roboform is a password tool you can use to help you generate different secure passwords)

For a detailed tutorial on how to change your WordPress password, go here: Changing Passwords In WordPress

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

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 hackers break into your website, they will look for the wp-config.php file, because this is the file that 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 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

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

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

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

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, themes, plugins, etc. are always up to date.

Security Measure #8 – Disable Your Theme Editor

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

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

WordPress Theme Editor Menu

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

The WordPress theme editor feature allows anyone accessing your blog’s admin area to view and change your theme files, and cause mayhem on your site.

To prevent unauthorized people from accessing the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Protect Your Site’s Uploads Directory

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

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

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

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

If any files stored in his folder have vulnerabilities that can be exploited by malicious users, this can seriously threaten the security of 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 file with nothing in it 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

There are a number of great WordPress security plugins available that will address most common security issues WordPress site owners face, such as preventing unauthorized users from accessing your site, protecting your site from malicious scripts, preventing unauthorized file uploads, etc.

Many WordPress plugins address some but not all areas of WordPress security. One security plugin that seems to do 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 software solution for WordPress

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

Blog Defender

Blog Defender WordPress Security Suite(Blog Defender)

This product is a package of WordPress security video tutorials, plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender shows you where potential security holes in your WordPress site are …

Blog Defender Security SuiteAnd then shows you how to easily fix these …

Blog Defender Security PluginIf you don’t want to invest in a premium 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 web platform, but neglecting essential maintenance tasks like updating your WordPress installation, plugins and WordPress themes, tightening file and data security and taking other necessary precautions can expose your site to malicious by hackers and bots.

No matter what kind of business you run or plan to run online and how small you think your web presence is, you cannot ignore the importance of web security.

As a final reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users after the large-scale 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 given you the initial steps you need to take to keep your WordPress site protected from brute force attacks. If you need any further help or assistance with WordPress security, please seek help from a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified whenever we publish new articles on WordPress security and reviews of new WordPress security plugins.

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)

***