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 SecurityWhen you are the most popular CMS platform in the world and the online publishing platform of choice for millions of businesses and loved by thousands of web developers and website designers, it’s inevitable that at some point in time, WordPress will become an obvious target for attacks from hackers.

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

These attacks were caused by computers infected with viruses and programmed to attack other vulnerable computers (called “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 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 can be done using software programs that can guess hundreds of possible login combinations in minutes.

If you’re using weak login details, your website can be an easy target for hacking attempts.

This is called a “brute force” login 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 private computers that have been infected with malicious code, which can then be controlled remotely as a group, typically without the computer owners’ knowledge.

Botnets are normally used used to blast mass spam emails.

Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of ZeuS – 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 globe since 2009.

(ZeuS is a botnet that has been actively compromising computer networks all around the world since 2009. Screenshot image: SecureList.com)

These were well organized and highly distributed botnet attacks on WordPress. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress user admin areas. The mass attack then continued, with over 30,000 WordPress sites and blogs being hacked every day.

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

WordPress is the world's most used CMS which makes it a frequent target for attempted hacker attacks

(WordPress is the world’s most used CMS making it a natural target for hackers)

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

To learn why WordPress is a secure web platform, read this article: Are Open Source CMS Platforms Like WordPress Secure?

Important Info

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

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

How To Protect Your WordPress Blog From Brute Force Attacks – Ten Security Checks

Every blog with a security vulnerability provides some degree of opportunity to hackers. An unsecured blog not only presents new hackers opportunities to improve their hacking skills and claim “bragging rights” among their peers, but it can also be a valuable resource for stealth attacks, distributing malware and participating in information theft.

If hackers can find a way to break in and gain complete control of your site, your blog can then be used to attack other valuable sites.

Additional undesirable results of having your site hacked include being blacklisted by Google, having stealthy spam links promoting things like casinos, discounted fashion, etc. inserted in your content, redirecting visitors to phishing sites and other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and lots of other nasty things.

The harsh reality is that brute-force software bots are probably looking for security weaknesses and trying to break into your website or blog while you are reading this right now. Whether they can get in successfully will depend on how challenging you can make 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 WordPress Site?

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

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

You will see that the test returns a number of results and information about your website …

Hackertarget - Website Security Check

(Hackertarget – WordPress security check results. Source: Hackertarget.com)

It should be obvious after using the tool shown above that if you can freely access all of this information about your WordPress site, so can hackers.

Hackertarget - Website Security Scan(Product image: BlogDefender website)

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

If your website runs on WordPress and you are not precautionary steps to harden your site, then it’s practically guaranteed that, at some point, your site will be hacked, or at least targeted by bots, because these attacks are systematically targeting WordPress installations worldwide!

Whenever a website gets broken into, blog owners can find themselves completely “locked out” of their own site, or notice that their files have been interfered with or even that their content has been entirely wiped out. Often, compromised sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.

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

Warning

Note: A few of the recommended measures listed below need some technical skills to modify core WordPress or server files. If you lack these technical skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress technical provider for help.

***

Security Measure #1 – Contact Your Hosting Service Provider

Contact your web host and ask them what security precautions they have put into place to help prevent your site from being attacked, and what they do to ensure that your server files and data are regularly being backed up.

It is important to check that your web host regularly backs up your sites and that, if anything should happen, you can easily recover your files.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Regularly Updated

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

A proper WordPress maintenance routine ensures that:

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

A proper WP maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WP installation completely backed up and up-to-date is. WordPress site 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 site maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website is the next most important thing you must do after making sure that you are still breathing!

If you don’t want to perform manual backups, there are many plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Backup, Duplicate & Keep Your WP Web Sites Protected With Backup Creator WP Plugin

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

The large scale brute force botnet attack on WordPress is mostly attempting to compromise website admin panels by exploiting WordPress installations using “admin” as the account name.

For reasons of website security, don’t install sites with the username admin. This is the first thing hackers will test. If your blog’s user name is admin, then make sure you change this immediately.

For a tutorial for non-technical WP admin users that shows you how to change your WordPress admin username, go here: Changing Your WP User Name From Admin To A Different User Name

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when malicious software continually tries to guess the right combination of characters in a password and username that will unlock your website.

Unless you put some measure in place to block the brute-force attack from happening (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 works out the combination.

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

Useful Tip

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

You can use a password management program like Roboform to generate hard-to-crack passwords(You can use a password tool like Roboform to help you generate really secure passwords)

We have created a detailed step-by-step tutorial on how to change your login password here: What To Do If You Need To Reset Passwords

Security Measure #5 – Prevent Access To The 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 WordPress options.

wp-config.php

(wp-config.php)

If a hacker breaks into your WordPress site, they will typically try to access your wp-config.php file, because this file contains your database information, 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.

To protect your WordPress site from attacks 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 – Delete Or Rename Unnecessary WP Installation Files

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

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

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

Hackers are always on the lookout for vulnerabilities they can exploit in earlier versions of WordPress, including outdated versions of WP plugins and themes.

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WP Theme Editor Menu

(The WordPress theme editor can be accessed using the WordPress admin menu)

This means that anyone logging into your site’s admin area can view and change your WP theme template files, or cause mayhem on your site.

If you want to prevent people from accessing 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 Site’s Uploads Folder

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

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

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

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

If any directories in your website have vulnerabilities that can be exploited by malicious users, someone could upload unauthorized file types to 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 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 – Install WordPress Security Plugins

Some great WordPress security plugins are available that will address most security issues faced by WordPress website owners, such as preventing unauthorized users from accessing your site, protecting your site from malicious exploits, 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 potential issues that could lead to hackers accessing your files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WP total security software solution

(SecureScanPro – WP security software)

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 plugin you may want to consider using is BlogDefender.

Blog Defender

Blog Defender WordPress Security Solution(Blog Defender)

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

BlogDefender scans you web site for security holes …

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

Blog Defender Security Product SuiteIf you don’t want to invest in a 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 web platform, but neglecting essential maintenance tasks like keeping your WordPress installation, WP plugins and themes updated to their latest versions, tightening file and data security 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 simply cannot afford to ignore the importance of securing your site.

As a final reminder, below is the advice given by an expert on website security to all WordPress users after the large-scale brute-force attacks 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, the above article 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 seek help from a WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

Also, please subscribe to WPCompendium.org to be notified whenever we publish new tutorials on WordPress security and reviews of new security plugins.

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com

***