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 CMS which makes it an easy target for hacking attacks.

In 2013 a worldwide brute force attack struck WordPress installations on virtually every host server in existence.

These attacks were caused by botnets (networks of infected computers 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’s administration login username and password. To do this, hackers use software tools that can work through hundreds of login permutations in minutes.

If you’re using predictable login details, your site could be an easy target for hackers.

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

Botnets are typically 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 infecting computer networks all around the globe since 2009 …

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

These were well organized and highly distributed botnet attacks. Over 90,000 IP addresses were identified by a number of hosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress site administration areas. The attacks then continued, with over 30,000 WordPress blogs being hacked per day.

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

Powering millions of websites around the world makes WordPress a target for hacker attacks

(WordPress is often the target of mass malicious attacks by hackers, due to its popularity)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are lots of good reasons why you should use WordPress if you are concerned about website security.

We explain why WordPress is a secure web platform in this article: Can You Build A Secure Business Online Using WordPress?

Important

It’s important to note that, in the case of April 2013 brute force attack described above, no specific WordPress vulnerability was being exploited (the same script was also attacking sites built using applications like Joomla).

Mike Little, the co-founder of WordPress with Matt Mullenweg, said this 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 Prevent Your WordPress Blog From Brute-Force Attacks – 10 Security Measures

You may think that the information in your site provides no value to hackers, but the reality is that to a hacker, all websites are an opportunity to gain some benefit at your expense.

If a malicious user can hack into and remotely take control of your blog, the website or blog can then be used as a “bot” in a planned cyber-attack against more valued web sites.

Additional undesirable consequences of having your site hacked include being blacklisted by Google, having spammy links promoting things like gambling, discounted fashion, etc. inserted into your content and meta data, malicious redirects to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasty things.

The harsh reality is that hackers are looking for security exploits and trying to hack into your site while you are reading this page. Whether they will hack in depends on how difficult you will make it for hackers or botnets to continue trying until they find a way to get access, or are forced to give up and go look for a more vulnerable target.

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

Does your website run on WordPress? If so visit Hackertarget.com and run your site through their WordPress security check …

Website Security Scan(Hackertarget – Website Security Scan Image source: Hackertarget.com)

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

WordPress Security Scan

(Hackertarget – website security check results. Screenshot image: Hackertarget.com)

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

Hackertarget - WordPress Security Scan(Product image: BlogDefender website)

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 in your site are all potentially useful information to hackers, as these can inform them about potentially exploitable security vulnerabilities, especially in older versions.

If your website is driven by WordPress and you are not precautionary steps to toughen up your site, it’s practically guaranteed that, at some point in time, someone will attempt to hack your website, because these attacks are systematically targeting WordPress installations around the world!

Typically, whenever a website is broken into, blog owners will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been interfered with or that everything has been entirely wiped out. Typically, sites will become infected with malicious scripts or viruses without the owner even being aware that a breach has taken place.

To avoid the heartache of having your website being hacked into, we have listed below 10 simple, yet essential and effective security checks that will help to prevent your WordPress site from being attacked by brute force botnet hacking attempts.

Disclaimer

Note: A few of the steps below require some technical understanding of how to modify core WordPress and/or server files. If you have no technical skills, 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

Get in touch with your hosting service provider and ask them exactly what security systems are in place to protect your site from being attacked, and what is done to make sure that your server files get backed up.

Make sure that your webhosting provider is backing up your sites and that, if disaster strikes, you can easily recover your files.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Frequently Up-To-Date

Never rely on your host for your site backups. Instead, learn how to manage your WordPress site or pay someone to get this done for you and maintain a habit of performing a full site maintenance routine on a frequent basis (e.g. weekly, fortnightly, etc …)

A proper WordPress maintenance routine ensures that:

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

A proper WP site maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP website fully 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 site 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 must do after making sure that you still have a pulse!

If you don’t want to perform manual backups, there are many WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Backup, Clone & Protect Your WordPress Sites With Backup Creator WP Plugin

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

The large scale brute force attack on WordPress is mostly an attempt to compromise website administrator panels by exploiting WP installations that used “admin” as their user name.

For website security purposes, avoid installing WordPress sites with the username admin. This is the first area hackers will test. If your site’s username is “admin”, you will need to change this immediately.

For a detailed step-by-step tutorial on how to change your WordPress admin username, go here: Changing Your Admin Username In WordPress To A More Secure User Name

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when a malicious script continually hits a login or password field with different character strings trying to guess the right login combination that will unlock your website.

Unless you put some measure in place to stop the brute-force attack (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually breaks into your admin area.

Passwords that are easy to guess, therefore, make really easy targets for brute force attacks. Make sure that you change your password combination to something that is at least eight characters long, and that includes upper and lowercase letters, combined with a few “special” characters (%^#$@&*).

Tip

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

Roboform is a password management software you can use to generate different  passwords(You can use a password software tool like Roboform to help you generate hard-to-guess passwords)

For a simple tutorial on how to change your WordPress admin password, go here: How To Reset Your Password In WordPress

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

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

wp-config.php file

(wp-config.php file)

If a hacker breaks into your WordPress website, they will normally look for the wp-config.php file, because this file 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 easily 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 WordPress Installation Files

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

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

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

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

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

Security Measure #8 – Disable The Theme Editor

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

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

WP Theme Editor Menu

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

The WordPress theme editor feature allows anyone accessing your site’s admin to see and make changes to all of your WordPress files, and create havoc on your site.

If you want to prevent unauthorized people from accessing the 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 The WordPress Uploads Directory

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

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

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

(WordPress uploads folder)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by malicious users, this can seriously threaten the security of your site.

Protecting your directories will prevent unauthorized people 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 ask help from someone who knows what they are doing if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

A number of great WordPress security plugins are available that will address many common security issues WordPress site owners face, such as preventing hackers from accessing vital areas of your site, protecting your files from malicious exploits, 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 - WP security software solution

(SecureScanPro – complete security software for WordPress)

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

Blog Defender Security Suite For WordPress(Blog Defender)

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

BlogDefender scans you WordPress installation for potential security vulnerabilities …

Blog Defender WordPress Security SuiteAnd lets you quickly and easily fix these …

Blog Defender Security Product Suite For WordPress SitesIf 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 web platform, but neglecting basic maintenance tasks like keeping your WordPress installation, WordPress plugins and WP themes updated to their latest versions, tightening file and data security and taking other necessary precautions can expose your website to attacks by hackers and bots.

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

As a final reminder of the importance of keeping your websites protected, below is the advice given by an expert on website security to all WordPress users after the large-scale brute-force attacks by botnets 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 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 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 tips 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

***