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 powers millions of websites worldwide, which makes it an easy target for hacking attempts.

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

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

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

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 a WordPress site. One of these is by trying to guess the site’s administration login username and password. This can be achieved with software programs and scripts that can work through hundreds of login possibilities in minutes.

If you’re using predictable user names and passwords, your site can be an easy target for hacking attempts.

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

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

Botnets are regularly used to send mass spam emails.

The screenshot below was taken from an internet security monitoring site showing the locations of the command centers of ZeuS – 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.

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

These ongoing botnet attacks on WordPress are highly distributed and well organized. Over 90,000 IP addresses were identified by a number of webhosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress site administration areas. The mass attack continued after this, with over 30,000 WordPress sites and blogs being hacked each day.

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

Being the world's most popular content management system makes WordPress a target for hacking attacks

(WordPress is the world’s most used content management system which makes it a frequent target for hacking attacks)

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

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

To understand why WordPress is a secure platform for websites, read this article: Why WordPress Is A Secure Platform For Websites –

Info

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

Mike Little, the co-founder 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 Blog From Brute-Force Attacks – 10 Security Measures

You may think that your website is of little value to hackers, but the reality is that to a hacker, all websites provide an opportunity to profit or benefit at your expense.

If hackers can find a way to remotely control your blog, your website or blog can then be employed as a “bot” in a planned cyber attack against larger and more valued web sites.

Additional undesirable impacts of being hacked and your site security compromised include being blacklisted by Google, having stealthy spam links promoting things like viagra, porn, etc. inserted in your content and meta data, redirecting visitors to phishing sites or other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasty things.

The truth is that brute-force software bots are trying to break into your website or blog right now. Whether they can hack into your site successfully or not, will depend on how challenging you have made it for hackers to keep trying until they discover a way to break in, or are forced to give up and decide to look for an easier target.

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

If you visit a site like Hackertarget.com and run your site through their WordPress security scan …

WP Security Scan(Hackertarget – Website Security Scan Product image source: Hackertarget.com)

You will see that the test returns various results and information about your site …

WP Security Check

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

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

Hackertarget - Website Security Check(Screenshot source: Blog Defender)

Being able to see which version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories in your site are all potentially valuable information to hackers, as this can inform them about any exploitable vulnerabilities, especially where the owners haven’t updated their files.

If your site or blog runs on WordPress and you are not proactive steps to toughen up your site, 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 installations worldwide!

Typically, whenever a site gets compromised, website owners can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been altered or that everything has been entirely wiped out. Typically, most sites will become infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache and frustration (and potential financial loss) that comes with having your site being hacked into, below are 10 essential and effective security checks that will help to protect your WordPress site from being brute-force attacked.

Info

Note: Some of the recommended measures below require some technical skills to modify core WordPress or server files. If you have no technical 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 help.

***

Security Measure #1 – Contact Your Hosting Service Provider

Contact your host and ask them exactly what security measures they have put into place to help prevent your site from being attacked, and what is done to make sure that your WordPress sites are regularly being backed up.

Make sure that your webhosting service is regularly backing up your sites and that, if disaster strikes, you can easily get back your files.

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

You should never rely only on your hosting service provider for site backups. Instead, learn how to maintain your WordPress site or get this done for you and develop a habit of performing a complete WordPress site maintenance routine on a frequent basis (e.g. weekly, monthly, etc …)

A proper 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 WP software, themes and plugins are up-to-date,
  • etc …

A proper WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP website or blog fully backed up and updated. WordPress 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 WordPress maintenance yourself, get someone else 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 still have a pulse!

If you don’t want to back up your files manually, there are a number of free and paid plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Backup, Duplicate And Keep Your WP Websites Protected With Backup Creator Plugin For WP

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

The mass brute-force attack on WordPress sites was mostly an attempt to compromise website administrator panels and gain access to sites by exploiting sites that used “admin” as the account name.

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

For a tutorial that shows you how to change your username, go here: How To Change Your Admin User Name In WordPress To A More Secure User Name

Security Measure #4 – Use Strong Passwords

A “brute force” attack occurs when malicious software continually and persistently hits a username and password field with different character strings trying to guess the right login combination that will give them access to your website.

Unless you put some measure in 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 breaks into your admin area.

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

Tip

Roboform is a password tool you can use to generate strong login passwords …

Roboform is a password management program that lets you create really secure passwords(You can use a password management tool like Roboform to help you generate secure login passwords)

For a tutorial created especially for non-technical WP admin users on how to change your admin password, go here: Changing Login Passwords In WordPress

Security Measure #5 – Prevent Access To Your wp-config.php 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 file)

If a hacker breaks into your website, they will normally look for your 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 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 attacks and even being used as part of a bot net, therefore, you must prevent people from accessing your wp-config.php file. 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.

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

Security Measure #7 – Update Your WordPress Files, Themes & Plugins To Their Latest Version

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

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

Security Measure #8 – Disable The Theme Editor

WordPress comes with a built-in editor that lets the administrator edit theme and plugin code from the dashboard.

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

WordPress Theme Editor Menu

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

This allows anyone accessing your site’s admin area to see and modify all of your files, or cause havoc 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 The WordPress Uploads Folder

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

By default, this folder is visible to online users. All a person needs to do to view all of the contents in your “uploads” folder is navigate to your directory using their browser …

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

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

If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, this can seriously threaten the security of your website.

Protecting your directories will prevent unauthorized people from accessing your ‘uploads’ folder and other important directories. This can be done using plugins, setting file permissions, uploading 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 – WordPress Security Plugins

There are a number of great WordPress security plugins available that specifically address most common security issues faced by WordPress website owners, such as preventing unauthorized users from gaining access to vital information about 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 plugin that seems to do a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - WordPress complete security software

(SecureScanPro – WP complete security software)

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

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

Blog Defender WordPress Security Suite

Blog Defender WordPress Security Product 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 weaknesses in your website are …

Blog DefenderAnd lets you quickly and easily fix these …

Blog DefenderIf you don’t want to invest in 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 web platform, but neglecting essential maintenance tasks like keeping your WP software, WordPress plugins and WP themes updated to their latest versions, tightening file and data protection and taking other necessary precautions can expose your site to malicious by hackers and bots.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, you cannot afford to 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 website security to all WordPress users following the mass brute force attacks by botnets 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 above information has provided you with the initial steps you need to take to prevent brute-force attacks on your WordPress site. 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 be notified when we publish new articles and tutorials on WordPress security and reviews of new WordPress security plugins and solutions.

***

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

***