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 SecurityWordPress frequently comes under attack by hackers.

In April 2013 a large-scale brute-force attack hit WordPress installations across virtually every WP host server in existence.

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

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 tools that can guess hundreds of login combinations in minutes.

If you’re using easy-to-guess login details, your website can 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)

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

Botnets are normally used used to blast 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 globe since 2009 …

The Zeus botnet has been actively infecting 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. Image: SecureList.com)

These were highly distributed and well organized attacks on WordPress. Over 90,000 IP addresses were identified by several hosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress users admin areas. The large-scale attacks continued after this, with over 30,000 WordPress sites and blogs being hacked per day.

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

WordPress is the world's most popular content management system making it a target for hacking attacks

(Being the world’s most used content management system makes WordPress a target for attempted attacks 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 about the security of your online presence.

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

Useful Information

It’s important to understand that, in the case of the brute force 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)

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

You may think that your site is of little value to hackers, but the reality is that all websites have some value to a malicious user.

If a malicious user can discover a security flaw that allows them to access and take over your web site, the website or blog can then be used as part of a larger network of “bots” to target more valued sites.

Additional undesirable impacts of having your website hacked and your site security compromised include being blacklisted by search engines, having stealthy spam links promoting things like gambling, cheap offers on brand names, etc. in your content, malicious redirects to phishing sites and other websites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasty things.

The reality is that software-driven bots are most likely trying to hack into your web site as you are reading these very words. Whether they will break into your site successfully will depend on how difficult you can make things for them to continue trying until they can discover a way to get in, or are forced to decide to look for a less secure target.

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

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

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

You will see that the check will return various results and information about your site …

Hackertarget - WP Security Scan

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

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

Hackertarget - Website Security Scan(Source: Blog Defender)

The ability 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 useful information to hackers, as this informs them about any security vulnerabilities, especially where site owners haven’t updated their software versions.

If your website is driven by WordPress and you are not proactive steps to toughen up your site, then it’s practically guaranteed that, at some point, someone will attempt to hack your installation, because these brute-force attacks are systematically hitting WordPress sites worldwide!

Typically, whenever a site is broken into, website owners will find themselves “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 sites will be infected with malicious software without the owner’s knowledge or awareness.

To help avoid the heartache and aggravation of having your site being hacked into, we have listed below 10 essential and effective security checks that will help to prevent your WordPress site from brute-force attacks.

Disclaimer

Note: A few of the recommended measures below require some technical understanding of how to modify core WordPress or server files. If you have no web editing skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress technical provider for assistance.

***

Security Measure #1 – Get In Touch With Your Web Host

Get in touch with your web host and ask them exactly what security systems have been put into place to help prevent your site from being attacked, and what they are doing to make sure that your files and data get backed up.

It is important to make sure that your hosting company backs up your sites and that, if anything happens, you can easily recover your files.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Frequently Updated

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

A full WordPress maintenance routine ensures that:

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

A full WP maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WordPress website or blog backed up and updated. WP 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 do not want to learn how to do WP maintenance yourself, pay someone to do it but make sure this gets done. Backing up your website is the next most important thing you must 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 plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Back Up, Copy & Protect Your WP Web Site With Backup Creator WP Plugin

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

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

For website security purposes, never install WordPress sites with the username admin. This is the first area hackers will test. If your site’s username is “admin”, then change it immediately.

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

Security Measure #4 – Make Sure Your Password Is Secure

A “brute force” attack occurs when a malicious script continually tries to guess the right combination of password and username characters that will give them entry to your site.

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 keep attacking your site until it eventually gets access.

Weak passwords, therefore, make really easy targets for hackers. Make sure that you change your password to something that is at least 8 characters long, with upper and lowercase letters, and “special” characters (e.g. ^, $, *, etc).

Tip

You can use a password management program like Roboform to generate very secure passwords …

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

We have created a detailed step-by-step tutorial that shows you how to change your password here: How To Reset Your WordPress Password

Security Measure #5 – Prevent Access To The 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

(WordPress WP Config file)

If hackers break into your site, they will normally try to access the wp-config.php file, because this file contains your WordPress 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, you must 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 Blog 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 – Keep Your WordPress CMS, Plugins And Themes Up-To-Date

Hackers look for vulnerabilities they can exploit in previous WordPress versions, including outdated versions of WordPress plugins and themes.

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

Security Measure #8 – Disable The WordPress Theme Editor

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

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor using the WordPress main menu)

This allows anyone accessing your blog’s admin area to view and modify your WP theme template files, and cause mayhem on your site.

If you want to prevent people from accessing your WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Prevent Access To Your WordPress Uploads Folder

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

Normally, this folder is visible to online users. All a person needs to do to view the contents stored in your “uploads” directory is visit the directory using their web browser …

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

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

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

Protecting your directories will prevent online users from viewing 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 file with nothing in it called “index.php”) to your uploads directory, and so on. Again, it’s best to get professional assistance if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

A number of WordPress security plugins are available that specifically address common security issues faced by WordPress website owners, such as preventing unauthorized users from accessing your site, protecting your files from malicious software, preventing injections of code into files, etc.

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

(SecureScanPro – WP security software)

SecureScanPro is easy to install and easy to use, and fixes 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 WordPress Security Suite

Blog Defender WordPress Security Suite(Blog Defender)

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

BlogDefender scans you WordPress site for security holes …

Blog DefenderAnd then shows you how to quickly and easily fix these …

Blog Defender Security PluginIf you don’t want to invest in 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 secure web platform, but neglecting simple maintenance tasks like making sure 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 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 websites is something you simply cannot afford to ignore.

As a final 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 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 above information has shown you what to do 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 professional WordPress technical provider in our WordPress Services Directory.

Also, please remember to subscribe to WPCompendium.org to receive notifications whenever we publish new tips on WordPress security and reviews of WordPress security plugins and solutions.

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com

***