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 SecurityBeing the world’s most popular content management system makes WordPress an easy target for attempted hacker attacks.

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

These attacks were caused by infected computer networks programmed to attack other installations (called “botnets”).

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

About Brute-Force Attacks

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

If you’re not using strong usernames or unguessable passwords, your site can be easily hacked by 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)

”Botnets” are networks of private computers that have been infected with malicious code or scripts, which can then be controlled remotely as a group, typically without the computer owners even being aware that this is happening.

Botnets are typically used to blast mass spam emails.

Below is a screenshot taken from an internet security monitoring site showing the locations of the command centers of ZeuS – a botnet that 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.

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

These were highly distributed and well organized attacks. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack, when millions of attempts to force their way into WordPress site admin areas occurred. The brute-force attacks then continued, with over 30,000 WordPress blogs being hacked every day.

Coverage of the April 2013 brute force attack was reported by all of the major webhosting companies, as well as the leading technology publications, such as Forbes, TechNews Daily, BBC News, Tech Crunch, PC Magazine, 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 an obvious target for hacker attacks

(WordPress is the world’s most popular content management system making it a target for attempted hacking attacks)

Does This Mean We Should Stop Using WordPress?

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

We explain why WordPress is a secure platform for websites in this article: Are Open Source Web Platforms Like WordPress Secure?

Useful Info

It’s important to note that, in the case of the 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 applications like Joomla).

Mike Little, one of the co-founders 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)

Protecting Your WordPress Site From Brute-Force Attacks – Ten Security Checks

Every web site with a vulnerability presents an opportunity to hackers. An unsecured web site not only presents hackers opportunities to improve their skills and win “respect” from their peers, but it can also be a resource for launching denial of service attacks, spreading malware and engaging in information theft.

If someone can discover a way to access and take over your web site, the web site can then be used as part of a larger network of “bots” to target more highly-valued sites.

Additional undesirable results of having your site hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links promoting things like viagra, cheap offers on brand names, etc. in your content, malicious redirects to phishing sites or other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and lots of other nasties.

The harsh reality is that software-driven bots are most likely looking for vulnerabilities and trying to break into your site at this very moment. Whether they can achieve this depends on how difficult or easy you have made things for them to keep trying until they find a way to get in, or give up and decide to look for a less protected target.

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

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

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

You will see that the test will display various results and details about your site setup …

Hackertarget - Website Security Check

(website security scan results. Product image: Hackertarget.com)

It should be obvious after using the tool shown above that if you can freely access all of this information about your WordPress site, then so can hackers.

Hackertarget - WordPress Security Check(Screenshot: BlogDefender website)

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 can all be potentially useful information to hackers, as this can inform them about any potential holes or weaknesses, especially where site owners haven’t updated their software versions.

If your site or blog runs on WordPress and you are not taking appropriate steps to bolster the security of your site, then it’s practically guaranteed that, at some point, your site will be hacked, or at least targeted by bots, because these attacks are systematically targeting WordPress sites around the world!

When a website gets broken into, webmasters will find themselves completely “locked out” of their own site, or notice that their content has been modified or even entirely wiped out. Typically, compromised sites will become infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache and frustration (and significant financial loss) of having your site being hacked into, below are ten essential and effective security checks that will help to prevent your WordPress site from being attacked by brute-force botnet hacking attempts.

Note

Note: Some of the steps shown below need some technical skills to modify core WordPress and/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 a professional WordPress technical provider for assistance.

***

Security Measure #1 – Contact Your Webhosting Company

Get in touch with your hosting service and ask them what security systems have been put into place to protect your site from being attacked, and what is done to make sure that your files and data get backed up.

It is important to make sure that your hosting provider backs up your server files and that, if anything goes wrong, you can quickly and easily get your files and data back.

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

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

A proper WordPress maintenance routine ensures that:

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

A complete WP site maintenance routine looks like this …

Maintaining your WP website regularly backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP installation frequently backed up and up-to-date is vitally important for WordPress security. Screenshot image: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WP site completely 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 maintenance yourself, pay someone to do it but make sure this gets done. Backing up your site is the second most important thing you should do after making sure that you still have a pulse!

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

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

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

For security purposes, avoid setting up sites with the username “admin”. This is the first area hackers will test. If your blog’s username is admin, then make sure you change it immediately.

We have created a detailed step-by-step tutorial created especially for non-technical WP admin users that shows you how to change your login username here: Changing Your WP Username From Admin To A More Secure Username

Security Measure #4 – Change Your Password

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

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

Weak passwords, therefore, become very easy targets for botnets. Make sure that you change your password to a string that contains at least eight characters long, and that includes upper and lowercase letters, combined with a few “special” characters (e.g. ^, $, @, etc).

Practical Tip

Roboform is a password software you can use to create different difficult passwords …

Roboform is a password management program you can use to create different strong login passwords(Roboform is a password program that lets you generate strong passwords)

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

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

If hackers break into your WordPress website, they will typically search for 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 someone 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 – Rename Or Delete Unnecessary Website 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 remove these files, just rename them.

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

Hackers are always on the lookout for vulnerabilities they can exploit in older WordPress versions, including outdated versions of plugins and themes.

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

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress comes with a built-in editor that allows administrators to edit theme and plugin code inside the dashboard.

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

WP Theme Editor Menu

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

This allows anyone accessing your site’s admin area to see and edit all of your WP theme template files, and create havoc on your site.

If you want 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 Site’s Uploads Directory

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

By default, this folder is visible to online users. All a person needs to do to see all of the contents stored in your “uploads” directory is visit the directory using their browser …

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

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

If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, this can become a serious threat to 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 blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to ask for assistance from someone with experience if you are unsure about what to do.

Security Measure #10 – Install WordPress Security Plugins

A number of security plugins for WordPress are available that specifically address many common security issues WordPress website owners face, such as preventing hackers 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 security plugin that seems to do a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - total security software solution for WordPress

(SecureScanPro – WP complete security software solution)

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

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

Blog Defender WordPress Security Suite

Blog Defender(Blog Defender Security Product Suite For WordPress Websites & Blogs)

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

BlogDefender scans you website for potential security holes …

Blog Defender Security Product Suite For WordPress Web SitesAnd lets you quickly and easily fix these …

Blog Defender Security Suite For WordPressIf you don’t want to buy 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 simple maintenance tasks like making sure that your WP core files, WordPress plugins and WP themes are kept 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, website security is something you simply cannot ignore.

As one last reminder, below is the advice given by an expert on web security to all WordPress users after the global 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, WordPress security is of the utmost importance 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 consult a WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

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

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum

***