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 the world’s most popular content management system making it a target for attempted attacks by malicious users.

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

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

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

What Is A Brute-Force Attack?

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 WordPress sites. One of these is by trying to guess the site admin’s login username and password. To attempt this, hackers use software programs that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re using predictable login details, your site could be easily hacked by the script’s persistent attempts to guess your site’s login details.

This is called a “brute-force” attack.

Botnet – What Is This?

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 compromised and infected with malicious code or software, which are then controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge.

Botnets are regularly used to blast out mass spam emails.

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 world since 2009 called “Zeus” …

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

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

These ongoing botnet attacks on WordPress 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 the web was flooded with millions of attempts to force their way into WordPress site administration areas. The large-scale attack continued after this, with over 30,000 WordPress sites being hacked each day.

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

WordPress is the world's most used content management system which makes it a frequent target for hackers

(WordPress often is targeted by hackers)

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

No. In fact, there are lots of very good reasons why you should continue using WordPress if you are concerned at all about the security of your web presence.

To understand why WordPress is a secure platform for websites, read this article: Is WordPress Secure? What Every Business Owner Needs To Know About WordPress Security

Info

It’s important to note that, in the case of April 2013 large-scale brute-force botnet attack described above, there was actually no WordPress vulnerability being exploited (the same script was also attacking sites built using other CMS 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)

Preventing Your WordPress Blog From Brute Force Attacks – 10 Security Points

Every website with a vulnerability has some value to hackers. No site is immune from being hacked. Large, medium and small sites, personal blogs, government sites … even websites owned by web security and anti-hacking experts can and have been targeted.

If someone can exploit a web software weakness that allows them to access and control your web site, your site can then be employed as a “bot” to attack other valuable websites.

Additional undesirable impacts of being hacked and your site security compromised include being blacklisted by Google, having stealthy spam links advertising things like viagra, porn, etc. inserted in your content and page title and descriptions, redirecting visitors to phishing sites or other websites, drive-by downloads (adding malicious software on your visitors’ computers), and many other nasty things.

The truth is that hackers are most likely searching for security exploits and trying to hack into your site right now. Whether they will get in successfully or not, will depend on how hard or easy you can make it for hackers to continue persisting until they discover how to get access, or are forced to give up and decide to look for a less secure 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 - WP Security Scan(Website Security Check Source: https://hackertarget.com/wordpress-security-scan)

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

Hackertarget - WP Security Scan

(website security check results. Product image source: Hackertarget.com)

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

Hackertarget - WP Security Check(Image source: BlogDefender site)

The ability 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 can all be valuable information to hackers, as these can inform them about any security vulnerabilities, especially where site owners haven’t updated their files.

If your site or blog runs on WordPress and you are not preventive steps to bullet-proof your site, it’s practically guaranteed that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically targeting WordPress installations around the world!

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

To help avoid the heartache and aggravation (and significant loss of valuable business data) that comes with having your site being hacked into, below are ten simple, yet essential and effective security measures that will help to prevent your WordPress site from brute-force attacks.

Note

Note: Some of the recommended steps below need some technical understanding of how to modify core WordPress or server files. If you are not technical, 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 – Get In Touch With Your Host

Contact your host and ask them what precautions they offer to protect your site from brute-force attacks, and what is done to make sure that your server files and data get backed up.

Check that your hosting company backs up your server files and that, if anything goes wrong, you can quickly and easily get back your site.

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

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

A proper WordPress maintenance routine ensures that:

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

A proper WP maintenance routine looks like this …

Maintaining your WP site frequently backed up and updated is vitally important for WordPress security.(Maintaining your WordPress web site frequently backed up and updated is vitally important for WordPress security. Screenshot: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WP web site backed up and updated. WP site 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 WP maintenance yourself, pay someone to do it but make sure it gets done. Backing up your website is the next most important thing you should do after making sure that you are still breathing!

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

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

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

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

We have created a simple step-by-step tutorial on how to change your username here: Changing Your WordPress Admin User Name

Security Measure #4 – Change Your Password

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

Unless you put some measure in place to prevent the brute-force attack from happening (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 gets access.

Weak passwords, therefore, make very easy targets for bot attacks. Make sure that you change your password to something that is at least 8 or 9 characters long, with both upper and lowercase letters, and add a few “special” characters (^%$#&@*).

Tip

Roboform is a password management software you can use to generate really secure passwords …

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

For a detailed step-by-step tutorial that shows you how to change your password, go here: What To Do If You Need To Change Your WordPress Password

Security Measure #5 – Prevent Your wp-config.php File From Being Found

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

wp-config.php file

(wp-config.php)

If hackers break into your website, they will try to access the wp-config.php file, because this is the file that contains your database information, 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 being attacked and even being used as part of a bot net, therefore, prevent your wp-config.php file from being accessed. 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 Installation Files

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

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

Security Measure #7 – Update Your WordPress Installation, Themes & Plugins

Hackers are always on the lookout for vulnerabilities in earlier versions of WordPress that they can exploit, including out-of-date versions of themes and plugins.

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WP Theme Editor Menu

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

This allows anyone accessing your site to view and edit your WP theme files, and cause havoc on your site.

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 – Remove Access To Your WordPress Uploads Directory

The “uploads” folder stores all the media that gets uploaded to your site.

By default, this folder is visible to all users online. All someone has to do to see 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 media content is stored)

If any directories in your website have vulnerabilities that can be exploited by hackers, someone can upload unauthorized file types to your site.

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 blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to ask help from someone who knows what they are doing if you are not sure about what to do.

Security Measure #10 – Install WordPress Security Plugins

There are some great security plugins for WordPress available that specifically address most security issues WordPress site owners face, such as preventing hackers from accessing vital areas of your site, protecting your website from botnets, preventing injections of code into files, etc.

Most WordPress plugins address some but not all areas of WordPress security. One security plugin that does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your website files and causing damage to your site is SecureScanPro.

SecureScanPro - total security software for WordPress

(SecureScanPro – WordPress security software)

SecureScanPro is easy to install and easy to use, and does a great job of fixing most of the security issues that WordPress users need to address.

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

Blog Defender Security Product Suite

Blog Defender WordPress Security Plugin(Blog Defender Security Plugin For WordPress)

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

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

Blog Defender Security Plugin For WordPress WebsitesAnd lets you quickly and easily fix these …

Blog Defender Security Solution For WordPress WebsitesIf you don’t want to buy a premium security plugin like SecureScanPro or BlogDefender, you can use various free plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure web platform, but neglecting simple maintenance tasks like keeping your WP software, plugins and WordPress themes up-to-date, 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, securing your web site is something you simply cannot afford to ignore.

As a final reminder, below is the advice given by an expert on web security to all WordPress users after the mass 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, website security is very important if you run a WordPress site. Hopefully, the information in this article will help keep your WordPress site protected from brute-force attacks. If you need any further help or assistance with WordPress security, please seek help from a professional WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified when we publish new articles and tutorials on WordPress security and reviews of new WordPress security plugins.

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)

***