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

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

These attacks were caused by computers infected with malware and programmed to attack other vulnerable computers (called “botnets”).

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

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

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 attempt this, hackers use scripts and tools that can guess hundreds of possible logins in minutes.

If you’re using weak usernames and weak passwords that are easy to guess, your website can be easily hacked by persistent attempts to guess 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.org)

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

Botnets are regularly used to send out mass spam emails from computers of compromised user accounts.

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 compromising computer networks all around the globe since 2009 …

ZeuS is a botnet that has been actively infecting computer networks all around the world since 2009.

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

The ongoing botnet attacks are well organized and highly distributed. Over 90,000 IP addresses were identified by a number of hosting companies in the initial attack alone, when millions of attempts to force their way into WordPress users administration areas took place. The large-scale brute force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

Coverage of this brute force botnet attack was reported by all 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 website of the US Department of Homeland Security …

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

(WordPress often comes under attack by hackers)

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

No. In fact, there are many great reasons why you should continue using WordPress if you are concerned at all about the security of your website.

To understand what makes WordPress a very secure platform for websites, read this article: Is WordPress A Secure Platform For Websites?

Important

It’s important to understand that, in the case of April 2013 large-scale brute-force attack described above, no specific WordPress vulnerability was being exploited (the same script was also targeting sites built using other web platforms 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 Being Brute-Force Attacked – Ten Security Points

You may think that your site offers little to no value to hackers, but the reality is that to a hacker, all websites are an opportunity to benefit or profit at your expense.

If someone can exploit a vulnerability in your security that allows them to compromise the control of your web site, the website or blog can then be used to target larger and more highly-valued web sites.

Additional undesirable effects of having your website hacked include being blacklisted by Google, having spammy links promoting things like casinos, porn, etc. in your content, redirecting visitors to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The truth is that hackers are probably looking for vulnerabilities and trying to break into your blog right now. Whether they will break in will depend on how challenging you can make things for hackers to keep persisting until they can discover a way to get access, or are forced to give up and go 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 website through their WordPress security scan …

Website Security Check(WP Security Scan Image source: https://hackertarget.com/wordpress-security-scan)

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

Hackertarget - WordPress Security Check

(WordPress security check results. Screenshot image: Hackertarget.com)

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

Website Security Scan(Product image source: Blog Defender)

Being able 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 in your site can be valuable information to hackers, as this informs them about any exploitable holes or weaknesses, especially in older versions.

If your website is driven by WordPress and you’re not preventive steps to toughen up your site, it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your site, because these attacks are systematically hitting WordPress sites around the world!

Typically, when a site gets compromised, webmasters 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, compromised sites will be infected with malicious scripts or viruses without the owner even being aware that this has taken place.

To help avoid the heartache that comes with 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 hackers.

Disclaimer

Note: A few of the steps shown below need some technical skills to modify core WordPress or server files. If you have no web skills, or don’t want to mess around with file code, then ask your web host or search for a WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Host

Contact your webhosting provider and ask them exactly what systems have been put in place to help prevent your site from botnet attacks, and what is done to make sure that your server files and data get backed up.

It’s important to check that your hosting service provider backs up your sites and that, if disaster strikes, you can quickly and easily get your site back.

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

Never rely only on your web host for site backups. Instead, learn how to maintain your WordPress site or 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. daily, weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

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

A full WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WP web site regularly backed up and updated is. WP maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website. 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 website is the second most important thing you should do after making sure that you still have a pulse!

If you don’t want to perform manual backups, there are many free and paid plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Back Up, Copy & Keep Your WP Sites Protected With Backup Creator WP Plugin

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

The brute force attack on WordPress is mostly an attempt to compromise site administrator panels and gain access to sites by exploiting WP installations that used “admin” as their user name.

For security purposes, never install a WordPress site with the username “admin”. This is the first thing hackers will test. If your blog’s user name is admin, you need to change it immediately.

We have created a step-by-step tutorial for non-technical WordPress admin users that shows you how to change your admin username here: Changing Your Admin Username In WordPress

Security Measure #4 – Your Password

A “brute force” attack occurs when a malicious script continually hits a login or password field with different strings of characters trying to guess the right combination that will give them entry to your site.

Unless you put some measure in place to prevent the brute force attack from happening (see further below for a couple of effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually works out the combination.

Weak passwords, therefore, make really easy targets for hacking attacks. Make sure that you change your password to something containing at least eight or nine characters long, with both upper and lowercase letters, and “special” characters (e.g. ^, $, &, etc).

Useful 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 management program like Roboform …

Roboform is a password program that lets you easily create strong passwords(You can use a password software tool like Roboform to help you generate strong passwords)

For a detailed tutorial that shows you how to change your login password, go here: How To Reset WordPress Passwords

Security Measure #5 – Deny 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 WordPress options.

wp-config.php

(wp-config.php file)

If hackers break into your WordPress site, they will normally look for your 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 someone 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 people getting to 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.

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

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

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

Make sure to keep all of your installation files, themes, plugins, etc. up-to-date.

Security Measure #8 – Disable Your Theme Editor

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

In WordPress, 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 using the main menu)

This allows anyone accessing your site to view and edit your WordPress theme files, or create havoc on your site.

To prevent unauthorized people from accessing the 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 – Protect Your Site’s Uploads Folder

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

Normally, this folder is visible to anyone online. All someone has to do to view all of the contents in the “uploads” directory is visit the directory using a web browser …

(WordPress uploads directory)

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

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this could become a serious threat to the security of your site.

Protecting your directories will prevent online users from accessing 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 seek professional help if you are not sure about what to do.

Security Measure #10 – Security Plugins

A number of great security plugins for WordPress are available that will address common security issues WordPress website owners face, such as preventing hackers from accessing vital areas of your site, protecting your files from malicious software, preventing unauthorized file uploads, etc.

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

(SecureScanPro – WP complete security plugin)

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(Blog Defender)

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

BlogDefender scans you website for potential security vulnerabilities …

Blog Defender Security Solution For WordPress Web SitesAnd lets you fix these quickly, easily and inexpensively …

Blog Defender WordPress Security SolutionIf you don’t want to purchase 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 essential maintenance tasks like ensuring that your WP installation, plugins and themes are kept updated to their latest versions, tightening file and data security and taking other necessary precautions can expose your site to attacks 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 cannot afford to ignore the importance of web security.

As one last reminder of the importance of keeping your websites protected, below is the advice given by a security expert to all WordPress users after 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 given you the initial guidelines and help you need 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 professional WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to receive notifications via email when we publish new tips on WordPress security and tutorials about WordPress security plugins and solutions.

***

"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com

***