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 world’s leading CMS platform and the online publishing platform of choice for millions of websites and loved by thousands of web developers and web designers, it’s inevitable that at some point in time, WordPress will come under attack by hackers.

In April 2013, WordPress installations around the world were subjected to mass brute force attacks.

These attacks were caused by computers infected with malware and programmed to attack other vulnerable sites, also commonly known as “botnets”.

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

Brute-Force Attacks – Definition

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’s administration login username and password. To do this, hackers use scripts and tools that can work through hundreds of possible logins in minutes.

If you’re using obvious usernames and weak passwords that are easy to guess, your website can be easily hacked by repeated attempts to work out your site’s login details.

This is called a “brute-force” attack.

What Is A Botnet?

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)

”Botnets” are networks of computers that have been infected with malicious scripts or software, which are then controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge.

Botnets are regularly used to send mass spam emails from computers of unsuspecting users.

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” …

The Zeus botnet has been actively infecting 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. Image source: SecureList.com)

These were highly distributed and well organized botnet attacks. 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 site admin areas took place. The mass attack then continued, with over 30,000 WordPress sites being hacked per day.

Coverage of this large-scale brute-force botnet attack was reported by all of the major webhosting companies, as well as the leading technology publications, such as Forbes, TechNews Daily, BBC News, Tech Crunch, PC Magazine, 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 attempted hacker attacks

(WordPress powers millions of websites and blogs worldwide, making it a target for attempted attacks by malicious users)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are lots of great reasons why you should use WordPress if you are concerned about the security of your web presence.

To learn why WordPress is a secure web platform, see this article: Can You Build A Secure Business Online Using WordPress? What Every Business Owner Needs To Know

Useful Information

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

Mike Little, the co-founder of WordPress with Matt Mullenweg, made the following comment 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)

Preventing Your WordPress Blog From Being Brute-Force Attacked – Ten Security Measures

Every website or blog with a security vulnerability offers some value to hackers. An unsecured website not only presents hackers opportunities to improve their hacking skills and win “respect” among their peers, but it can also acts as a valuable platform for launching denial of service attacks, spreading malware and participating in information theft.

If a malicious user can find a vulnerability, your web site can then be used as a “bot” in a planned cyber-attack against more valued websites.

Additional undesirable effects of being hacked and your site security compromised include being blacklisted by search engines, having spammy links advertising things like casinos, discounted fashion, etc. in your content and meta data, malicious redirects to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasties.

The truth is that malicious bots are searching for security weaknesses and trying to hack into your website at this very moment. Whether they will be successful will depend on how difficult you have made things for hackers to continue trying until they discover how to get access, 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 a site like Hackertarget.com and run your site through their WordPress security check …

Hackertarget - Website Security Scan(Website Security Scan Screenshot source: https://hackertarget.com/wordpress-security-scan)

You will see that the check will yield a number of results and details about your site setup …

Hackertarget - WordPress Security Check

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

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

Hackertarget - WordPress Security Scan(Screenshot image: BlogDefender website)

The ability to see which 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 potential holes or weaknesses, especially where the owners haven’t updated their software versions.

If your website runs on WordPress and you’re not proactive steps to harden your site, we can practically guarantee that, at some point, your site will be hacked, or at least targeted by bots, because these attacks are systematically targeting WordPress installations worldwide!

When a website or blog is compromised, webmasters can find themselves completely “locked out” of their own site, or notice that their files have been modified or even that their content has been completely wiped out. Often, most sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.

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

Info

Note: Some of the measures below require some technical understanding of how to modify core WordPress and/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 service provider for help.

***

Security Measure #1 – Contact Your Hosting Provider

Contact your web host and ask them what systems are in place to protect your site from being attacked, and what they do to make sure that your WordPress sites get regularly backed up.

It’s important to check that your webhosting provider backs up your server files and that, if anything happens, you can easily get your files and data back.

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

Never rely just on your webhosting service provider for your site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this service done for you and maintain a habit of performing a full WordPress 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 deleted,
  • All WP data and files are free of errors, optimized and backed up,
  • All WP software, plugins and themes are up-to-date,
  • etc …

A full WP site maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WP web site frequently 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. If you don’t want to learn how to do WordPress site maintenance yourself, get someone else to do it but make sure it gets done. Backing up your site is the next most important thing you must do after making sure that your heart is still beating!

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

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

The large scale brute force botnet attack on WordPress is mostly attempting to compromise website administrator panels by exploiting sites that used “admin” as their account name.

For reasons of website security, avoid setting up WordPress sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your site’s username is admin, you will need to change it immediately.

We have created a tutorial for WP admin users on how to change your WordPress admin username here: Changing Your Admin Username In WordPress To A More Secure Username

Security Measure #4 – Your Password

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

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

Weak passwords, therefore, make really easy targets for hackers. Make sure that you change your password to a string that is at least 8 characters long, and that includes upper and lowercase letters, and “special” characters (^%$#&@*).

Tip

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

You can use a password management tool like Roboform to generate unbreakable passwords(Roboform is a password management program you can use to create different passwords)

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

Security Measure #5 – Secure Your WP Config File

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

wp-config.php file

(wp-config.php file)

If a hacker breaks into your WordPress website, they will search 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 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 WordPress Installation Files

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

These files are not required after installation and can be deleted. If you don’t want to remove these files, then just rename them.

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

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WordPress Theme Editor Menu

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

This allows anyone accessing your blog’s admin to view and edit your theme templates, or create 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 adding code to your wp-config.php file.

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

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

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

(WordPress uploads directory)

(WordPress uploads directory)

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 to 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 an empty file called “index.php”) to your uploads directory, and so on. Again, it’s best to ask for assistance from someone with experience if you are not sure about what to do.

Security Measure #10 – Security Plugins

There are some great WordPress security plugins available that specifically address most security issues WordPress website owners face, such as preventing hackers 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 WordPress security plugin that seems to do a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - WordPress security plugin

(SecureScanPro – WordPress total security plugin)

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 Security Plugin For WordPress Web Sites

Blog Defender WordPress Security Plugin(Blog Defender WordPress Security Solution)

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

BlogDefender shows you where the security holes in your website are …

Blog Defender WordPress Security PluginAnd then shows you how to fix these quickly, easily and inexpensively …

Blog DefenderIf you don’t want to buy a security plugin like SecureScanPro or BlogDefender, then use various free plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting essential maintenance tasks like updating your WordPress software, plugins and themes, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

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 securing your sites.

As a final reminder of the importance of keeping your websites protected, below is the advice given by a security expert to all WordPress users after the worldwide 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, the above information will help 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.

We also recommend subscribing to WPCompendium.org to receive notifications whenever we publish new tips on WordPress security and tutorials about WordPress security plugins.

***

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

***

Originally published as How To Protect Your WordPress Site From A Brute-Force Attack.