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 most popular content management system and the online publishing platform of choice for millions of businesses and loved by thousands of website developers and website designers, it’s inevitable that at some point in time, WordPress will become a target for attacks from hackers wanting to score a “big win”.

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

These attacks were caused by networks of infected computers programmed to attack other computers, also commonly known as “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 is done with scripts and tools that automatically tries to guess hundreds of login possibilities in minutes.

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

This is called a “brute-force” attack.

Botnet Definition

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 computers that have been infected with malicious code or software, which can then be controlled remotely as a group, often without the unsuspecting computer owners even being aware that this is taking place.

Botnets are typically used to blast out mass spam emails.

Below is a screenshot 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 world since 2009 …

The Zeus botnet has been actively infecting computer networks all around the globe since 2009.

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

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

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

WordPress often comes under attack by hackers, due to its global popularity

(Powering millions of websites and blogs worldwide makes WordPress a target for malicious attempts 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 online presence.

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

Important Info

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

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

Protecting Your WordPress Site From Brute Force Attacks – 10 Security Checks

Every web site with a vulnerability provides some value opportunity to hackers. An unsecured site presents malicious users with a platform to launch denial of service attacks, spread malware and engage in information theft.

If a hacker can find a web software vulnerability and remotely control your website, your site can then be used as a “bot” to attack more valuable web sites.

Additional undesirable impacts of being hacked include getting blacklisted by search engines, having stealthy spam links promoting things like viagra, discounted fashion, etc. inserted in your content, malicious redirects to phishing sites, drive-by downloads (adding malicious software on your visitors’ computers), and many other nasties.

The truth is that brute-force software bots are trying to break into your website as you are reading this article right now. Whether they can be successful or not, depends on how hard you will make it for hackers and bots to keep persisting until they work out how to get access, or give up and decide to look for a more vulnerable target.

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

If you visit Hackertarget.com and run your site through their WordPress security check …

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

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

WordPress Security Check

(website security check results. Source: Hackertarget.com)

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

Hackertarget - Website Security Check(Screenshot 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 can all be valuable information to hackers, as this informs them about any exploitable holes or weaknesses, especially where site owners haven’t updated their sites.

If your site or blog runs on WordPress and you are not proactive steps to harden your site, then it’s practically guaranteed that, at some time in the near future, someone will attempt to hack your site, because these brute-force attacks are systematically hitting WordPress installations all the world!

When a site gets broken into, site owners will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been modified or even that their content has been entirely wiped out. Typically, sites will be infected with malicious software or viruses without the owner’s knowledge or awareness.

To help avoid the heartache (and significant financial loss) of discovering that your website has been hacked into, we have listed below ten essential and effective security checks that will help to prevent your WordPress site from botnet attacks.

Disclaimer

Note: A few of the steps shown below require some technical skills to modify core WordPress and server files. If you lack these 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 assistance.

***

Security Measure #1 – Get In Touch With Your Hosting Company

Get in touch with your webhosting provider and ask them exactly what precautions are in place to help prevent your site from being attacked, and what is done to ensure that your server files and data get regularly backed up.

Make sure that your hosting provider backs up your server files and that, if anything should happen, you can easily get back your site.

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

Never rely only on your webhosting service provider for site backups. Instead, learn how to maintain and manage your WordPress site or get this done for you and develop a habit of religiously performing a complete site maintenance routine on a regular basis (e.g. weekly, fortnightly, etc …)

A complete 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 maintenance routine looks like this …

Maintaining your WordPress installation backed up and updated is vitally important for WordPress security.(Maintaining your WordPress website or blog fully 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 or blog frequently backed up and updated. WordPress 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 maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website is the second most important thing you should do after making sure that your heart is still beating!

If you don’t want to perform manual backups, there are a number of free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Back Up, Duplicate And Keep Your WP Site Protected With Backup Creator Plugin For WordPress

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

the worldwide brute force attack on WordPress sites was mostly attempting to compromise site admin panels and gain access to the site by exploiting WP installations using “admin” as the account name.

For reasons of website security, never install sites with the username admin. This is the first thing hackers will test. If your blog’s username is “admin”, you will should change this immediately.

For a detailed tutorial created especially for non-technical WordPress admin users on how to change your login username, go here: Changing Your WP Username From Admin To Another Username

Security Measure #4 – Use A Strong Password

A “brute force” attack occurs when a malicious script persistently 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 prevent the brute-force attack from happening (see further below for a couple of effective ways to do this), the “bot” will just keep attacking your site until it eventually “cracks” the code.

Passwords that are easy to guess, therefore, become really easy targets for hackers. Make sure that you change your password combination to a string containing at least eight or nine characters long, with both upper and lowercase letters, and “special” characters (^%$#&@*).

Tip

You can use a password tool like Roboform to help you generate strong passwords …

You can use a password management program like Roboform to help you generate strong passwords(You can use a password management software tool like Roboform to generate strong passwords)

For a detailed tutorial for non-technical WordPress admin users on how to change your password, go here: What To Do If You Need To Change Your WordPress Password

Security Measure #5 – Prevent The wp-config.php File From Being Easily Visible

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 a hacker breaks into your site, they will 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 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, 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

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

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

Security Measure #7 – Upgrade Your WordPress Blog, Themes And Plugins To Their Latest Version

Hackers are always on the lookout for vulnerabilities in outdated versions of WordPress that can be exploited, including out-of-date versions of plugins and themes.

Ensure that all of your WordPress software files, plugins, themes, etc. are always up to date.

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress comes with a built-in editor that lets administrators edit plugin and theme code inside the dashboard area.

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

WordPress Theme Editor Menu

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

This allows anyone accessing your blog’s admin to see and edit your files, or create mayhem on your site.

To prevent 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 – Remove Access To Your Site’s Uploads Directory

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

Normally, this folder is visible to anyone online. All a person needs to do to view all of the contents in your site’s “uploads” folder is visit the directory using a web browser …

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

(WordPress uploads directory)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers, this can compromise 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, uploading a blank index.php file (this is literally an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to use a professional if you are not sure about what to do.

Security Measure #10 – Security Plugins

Several WordPress security plugins are available that specifically address many common security issues WordPress site owners face, such as preventing hackers from accessing vital areas of 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 security plugin that seems to do a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your files and causing damage to your site is SecureScanPro.

SecureScanPro - complete security software for WordPress

(SecureScanPro – WordPress security software)

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

Another great plugin you may want to consider using is BlogDefender.

Blog Defender Security Suite For WordPress

Blog Defender Security Product Suite For WordPress Web Sites(Blog Defender Security Solution For WordPress)

Blog Defender is a suite 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 DefenderAnd lets you fix these quickly and easily …

Blog Defender Security Plugin For WordPress Websites & BlogsIf you don’t want to invest in a security plugin like SecureScanPro or BlogDefender, then use various free WP 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 software, plugins and themes, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

No matter what 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 mass 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, website security is very important 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 WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

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

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie

***