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 powers millions of websites around the world, making it an obvious target for attempted hacking attacks.

In 2013 a worldwide brute force attack hit WordPress installations across almost every WP host server in existence.

These attacks were caused by infected computer networks programmed to attack other vulnerable installations (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)

There are many methods hackers use to try and break into WordPress sites. One of these is by trying to guess the site’s administration login username and password. This is achieved with scripts and tools that can guess hundreds of possible logins in minutes.

If you’re using weak login details, your site could be easily hacked by a software’s repeated attempts to guess your site’s login details.

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.org)

”Botnets” are networks of private computers that have been compromised and infected with malicious code or scripts, which can then be controlled remotely as a group, typically without the computer owners’ knowledge.

Botnets are typically used to send out mass spam emails.

The screenshot below was taken from a site that monitors online security 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 compromising computer networks all around the globe since 2009.

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

These botnet attacks are highly distributed and well organized. 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 user administration areas took place. The large-scale attack then continued, with over 30,000 WordPress sites and blogs being hacked each 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 TechNews Daily, Forbes, PC Magazine, BBC News, Tech Crunch, and even on the official website of the US Department of Homeland Security …

Powering millions of websites and blogs around the world makes WordPress an obvious target for hacker attacks

(Being the world’s most popular CMS makes WordPress an obvious target for hacking)

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 about the security of your website.

We explain what makes WordPress a very secure platform for websites in this article: Is WordPress A Secure Website Platform?

Info

It’s important to note 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 web applications like Joomla).

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

Protecting Your WordPress Blog From Being Brute Force Attacked – Ten Security Points

Every site with a vulnerability can can provide an opportunity to hackers. A compromised website or blog not only offers new hackers opportunities to improve their skills and claim “bragging rights” among their peers, but it can also serve as a valuable platform for launching distributed denial of service attacks, distributing malware and as a source of information theft.

If a hacker can find a software flaw in your security, the web site can then be used as a “bot” to attack more highly-valued web sites.

Additional undesirable consequences of being hacked include being blacklisted by search engines, having stealthy spam links advertising things like gambling, porn, etc. in your content and meta data, malicious redirects to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasties.

The harsh reality is that hackers are looking for exploits and trying to break into your web site right now. Whether they can get in successfully or not, will depend on how challenging you can make things for hackers or botnets to continue trying until they discover a way to get access, or are forced to decide to look for a more vulnerable target.

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

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

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

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

WP Security Scan

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

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

Hackertarget - WordPress Security Check(Source: BlogDefender.com)

The ability to see what 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 be potentially valuable information to hackers, as this can inform them about potentially exploitable security weaknesses, especially where site owners haven’t updated their sites.

If your site or blog runs on WordPress and you’re not preventive steps to harden your site, then it’s practically guaranteed that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically targeting WordPress sites worldwide!

Whenever a website gets hacked, site owners will find themselves “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, compromised sites will become infected with malicious scripts without the owner’s knowledge or awareness.

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

Disclaimer

Note: A few of the steps below require some technical skills to modify core WordPress or server files. If you are not technical-minded, or don’t want to mess around with code on your site, then ask your web host or search for a WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Get In Touch With Your Webhosting Provider

Contact your host and ask them exactly what security measures have been put into place to protect your site from being attacked, and what they do to make sure that your site files are being backed up.

It is important to check that your web host is regularly backing up your sites and that, if disaster strikes, you can easily recover your site.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Site Frequently Up-To-Date

You should never rely on your hosting service provider for your site backups. Instead, learn how to maintain your WordPress site or 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, fortnightly, etc …)

A full WordPress maintenance routine ensures that:

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

A proper WordPress maintenance routine looks like this …

Maintaining your WP site frequently backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress installation frequently backed up and up-to-date is vitally important for WordPress security. Source: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WordPress web site completely backed up and updated. WordPress maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website or blog. If you don’t want to learn how to do WP maintenance yourself, pay someone 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 back up your site manually, there are many WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Back Up, Copy And Protect Your WP Website With Backup Creator WordPress Plugin

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

The large scale brute-force attack on WordPress is mostly an attempt to compromise website admin panels by exploiting installations using “admin” as their account name.

For security reasons, avoid setting up sites with the username admin. This is the first thing hackers will test. If your site’s user name is admin, change this immediately.

For a simple step-by-step tutorial created especially for non-technical WordPress admin users that shows you how to change your admin username, go here: How To Change Your Admin User Name In WordPress

Security Measure #4 – Your Password

A “brute force” attack occurs when a malicious script persistently tries to guess the right username and password character string that will unlock your website.

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

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

Useful Tip

Roboform is a password management program that lets you create secure login passwords …

Roboform is a password management tool you can use to help you generate different secure passwords(Roboform is a password management program that lets you easily generate very secure passwords)

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

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

wp-config.php file

(wp-config.php)

If hackers break into your WordPress site, they will try to access the 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.

To protect your WordPress site from attacks 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 – Delete Or Rename Unnecessary Installation Files

Delete or rename the install.php, upgrade.php and readme.html files from your server.

These files can be removed after installation. If you don’t want to delete these files, just rename them.

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

Hackers search for vulnerabilities they can exploit in outdated WordPress versions, including out-of-date versions of WordPress themes and plugins.

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

Security Measure #8 – Disable Your Theme Editor

WordPress installations come with a built-in editor that lets the site administrator edit theme and plugin files inside the dashboard area.

You can access the WordPress Theme Editor by selecting Appearance > Editor from your admin menu …

WP Theme Editor Menu

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

This means that anyone logging into your blog’s admin area can view and modify your WordPress files, or cause mayhem on your site.

To prevent unauthorized people from being able to access your WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Remove Access To The Site’s Uploads Directory

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

Normally, this folder is visible to anyone online. All a person needs to do to see all of the contents in the “uploads” directory is navigate to your directory using their web browser …

(WordPress uploads directory)

(WordPress uploads directory)

If any directories in your website have vulnerabilities that can be exploited by malicious users, anyone could 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 named “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 – Use Security Plugins

Some great WordPress security plugins are available that specifically address many common security issues faced by WordPress website owners, such as preventing hackers from gaining access to vital areas of your site, protecting your website from malicious software, preventing unauthorized file uploads, etc.

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

SecureScanPro - WP security software

(SecureScanPro – WordPress total security software)

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

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

Blog Defender Security Suite For WordPress

Blog Defender Security Solution For WordPress Web Sites(Blog Defender Security Suite 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 web site are …

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

Blog Defender Security PluginIf you don’t want to purchase 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 keeping your WP core files, plugins and themes up-to-date, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

Regardless of the type of business you run or plan to run online and how small you think your web presence is, you simply cannot ignore the importance of securing your website.

As one last reminder of the importance of website security, below is the advice given by an expert on website security to all WordPress users following the large-scale 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 has shown you what to do to 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 professional WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified via email whenever we publish new articles on WordPress security and reviews of WordPress security plugins and solutions.

***

"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

***