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

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

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

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)

One of the many ways hackers will attempt to break into a WordPress site is by trying to guess the site admin’s login username and password. To achieve this, hackers use scripts and software that can guess hundreds of possible login combinations in minutes.

If you’re using weak user names and weak passwords that are easy to guess, your website could be an easy target for hacking attempts.

This is called a “brute force” login attack.

What Are 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)

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

Botnets are normally used used to send out mass spam emails.

Below is a screenshot taken from an online security monitoring site showing the locations of the command centers of a botnet that has been actively infecting computer networks all around the world 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 world since 2009. Source: SecureList.com)

These were well organized and highly distributed botnet attacks on WordPress sites. 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 site administration areas occurred. The attacks then continued, with over 30,000 WordPress blogs being hacked every day.

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

WordPress is frequently the target of attacks by hackers

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

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

No. In fact, there are lots of good reasons why you should choose WordPress if you are concerned about the security of your online business.

To understand why WordPress is a secure web platform, see this article: Is WordPress A Secure Platform For Websites?

Useful Information

It’s important to understand 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 platforms like Joomla).

Mike Little, the co-founder of WordPress with Matt Mullenweg, 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 Site From Brute Force Attacks – Ten Security Points

Every site with a vulnerability can can provide an opportunity to hackers. A compromised blog not only presents hackers opportunities to improve their skills and claim “bragging rights” among their peers, but it can also be a platform for launching distributed attacks, distributing malware and participating in information theft.

If a malicious user can discover a software security flaw, the blog can then be used to attack larger and more valued sites.

Additional undesirable results of being hacked and your site security compromised include being blacklisted by search engines, having spammy links advertising things like casinos, cheap offers on brand names, etc. inserted into your content and page title and descriptions, redirecting visitors to phishing sites or other websites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The harsh reality is that software-driven bots are very likely looking for security weaknesses and trying to hack into your blog at this very moment. Whether they will achieve this or not, depends on how difficult you can make things for hackers and botnets to continue persisting until they work out how to get access, or give up and go look for an easier target.

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

Do you own a WordPress site? If so, visit Hackertarget.com and run your site through their WordPress security scan …

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

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

Hackertarget - Website Security Check

(website security scan results. Screenshot: Hackertarget.com)

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

Website Security Scan(Image source: BlogDefender site)

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 in your site can all be potentially useful information to hackers, as these can inform them about any exploitable holes or weaknesses, especially in older versions.

If your website is driven by WordPress and you’re not proactive 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 brute-force attacks are systematically hitting WordPress installations worldwide!

Typically, when a website is hacked, webmasters will 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 become infected with malicious software without the owner even being aware that this has occurred.

To avoid the heartache and frustration of discovering that your site has been hacked into, below are 10 simple, yet essential and effective security measures that will help to protect your WordPress site from being attacked by brute force botnet hacking attempts.

Important

Note: Some of the 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 search for a professional WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Host

Get in touch with your web host and ask them what precautions have been put into place to help prevent your site from being attacked, and what is done to ensure that your server files are being backed up.

Check that your host is backing up your server files and that, if disaster strikes, you can quickly and easily get your files back.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Site Frequently Updated

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

A full WordPress maintenance routine ensures that:

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

A complete WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WP website or blog 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 do not want to learn how to do WordPress site maintenance yourself, pay someone to do it but make sure this gets done. Backing up your site is the next most important thing you should do after making sure that your heart is still beating!

If you don’t want to back up your data manually, there are many plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Back Up, Clone And Keep Your WP Web Sites Protected With Backup Creator Plugin For WordPress

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 by exploiting WordPress installations using “admin” as their account name.

For website security reasons, don’t set up sites with the username “admin”. This is the first thing hackers will test. If your blog’s username is “admin”, then change this immediately.

We have created a detailed step-by-step tutorial for non-technical WP admin users that shows you how to change your admin username here: Changing Your WP Admin User Name To Another Username

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when malicious software persistently tries to guess the right username and password character string that will give the hacker access to your site.

Unless some measure is put into place to stop the brute force attack (see further below for a couple of effective ways to do this), the “bot” will just continue attacking your site until it eventually breaks into your admin area.

Passwords that are easy to guess, therefore, are very easy targets for bot attacks. Make sure that you change your password to a string containing at least eight or nine characters long, with upper and lowercase letters, combined with “special” characters (e.g. %, $, *, etc).

Useful Tip

Roboform is a password management software you can use to generate different hard-to-guess passwords …

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

For a simple step-by-step tutorial on how to change your WordPress password, go here: How To Change WordPress Passwords

Security Measure #5 – Secure Your wp-config.php File

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

wp-config.php

(wp-config.php file)

If hackers break into your website, they will normally try to access the 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 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 being attacked 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 the install.php, upgrade.php and readme.html files from your server.

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

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

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

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

Security Measure #8 – Disable Your Theme Editor

WordPress comes with a built-in editor that allows you to edit plugin and theme code 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 is accessible using the admin menu)

The WordPress theme editor lets anyone accessing your site view and modify your WP theme files, or create mayhem on your site.

To prevent unauthorized people from being able to access 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 – Prevent Access To The WordPress Uploads Folder

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

Normally, this folder is visible to online users. All someone has to do to view the contents in your site’s “uploads” directory is navigate to your directory using their web browser …

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

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

If any files stored in his folder have vulnerabilities that can be exploited by hackers, anyone could upload unauthorized file types or compromise the security of your website.

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, 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 use a professional if you are not sure about what to do.

Security Measure #10 – WordPress 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 your site, protecting your files from botnets, preventing unauthorized file uploads, etc.

Most 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 potential issues that could lead to hackers accessing your website files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WordPress security plugin

(SecureScanPro – total security plugin for WordPress)

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 Suite For WordPress Blogs

Blog Defender Security Suite For WordPress Blogs(Blog Defender WordPress Security Suite)

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

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

Blog DefenderAnd lets you fix these quickly, easily and inexpensively …

Blog DefenderIf you don’t want to buy a security plugin like SecureScanPro or BlogDefender, you can 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 simple maintenance tasks like keeping your WP installation, plugins and WP themes updated to their latest versions, 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, securing your websites is something you simply cannot ignore.

As one last reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users following 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 very important if you run a WordPress site. Hopefully, 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 WordPress technical provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to be notified via email whenever we publish new tips on WordPress security and reviews of new security plugins and solutions.

***

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

***