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 frequently the target of malicious attempts by hackers, due to its global popularity.

In 2013, WordPress installations around the world were subjected to worldwide brute force attacks.

These attacks were caused by botnets (networks of infected computers programmed to attack other sites with security vulnerabilities).

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)

One of the many ways hackers will attempt to break into WordPress sites is by trying to guess the site admin’s login username and password. This is done with software programs that automatically tries to guess hundreds of login possibilities in minutes.

If you’re using weak usernames and predictable passwords, your site could 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 scripts or software code, which can then be controlled remotely as a group, often without the computer owners’ knowledge.

Botnets are normally used used to blast mass spam emails from computers of unsuspecting users.

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 compromising computer networks all around the world since 2009.

(ZeuS is a botnet that has been actively infecting computer networks all around the globe since 2009. Source: SecureList.com)

The ongoing botnet attacks are highly distributed and well organized. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress user administration areas. The mass brute-force attacks then continued, with over 30,000 WordPress sites and blogs being hacked each day.

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

WordPress is the world's most used content management system which makes it an obvious target for hackers

(Being the world’s most popular content management system makes WordPress a target for hacking attempts)

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

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

We explain what makes WordPress a very secure web platform in this article: Why WordPress Is A Secure Platform For Websites –

Important

It’s important to understand that, in the case of the mass brute force botnet attack described above, no specific WordPress vulnerability was being exploited (the same script was also targeting sites built using platforms like Joomla).

Mike Little, the co-founder of WordPress with Matt Mullenweg, 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)

How To Protect Your WordPress Blog From Being Brute Force Attacked – 10 Security Points

You may think that your website or blog offers little to no value to hackers, but the reality is that to a hacker, all websites provide an opportunity to benefit or profit at your expense.

If hackers can exploit a security opening in your system and gain control of your blog, the site can then be used to attack more valued sites.

Additional undesirable results of having your website hacked include being blacklisted by Google, having stealthy spam links advertising things like viagra, porn, etc. in your content and meta data, redirecting visitors to phishing sites, drive-by downloads (adding malware on your visitors’ computers), and many other nasties.

The harsh reality is that software-driven bots are looking for security weaknesses and trying to hack into your blog while you are reading this article. Whether they can successfully break in will depend on how difficult or easy you have made it for hackers to keep persisting until they discover how to get access, or give up and 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 site through their WordPress security scan …

WordPress Security Check(WP Security Check Screenshot image: https://hackertarget.com/wordpress-security-scan)

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

Hackertarget - Website Security Scan

(WP security check results. Screenshot source: Hackertarget.com)

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

WordPress Security Check(Product image source: BlogDefender.com)

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 on your server are all valuable information to hackers, as this informs them about potential holes or weaknesses, especially in older versions.

If your website is powered by WordPress and you are not taking steps to bolster the security of your site, we can practically guarantee that, at some point, someone will attempt to hack your site, because these brute force attacks are systematically hitting WordPress sites worldwide!

Typically, when a website or blog is broken into, website owners will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been modified or even that their content has been completely wiped out. Typically, most sites will become infected with malicious software or viruses without the owner’s knowledge or awareness.

To help avoid the heartache and frustration (and potential financial loss) that comes with discovering that your site has been hacked into, below are 10 essential and effective security measures that will help to prevent your WordPress site from being brute force attacked.

Disclaimer

Note: A few of the recommended steps below require some technical understanding of how 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 professional WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Web Host

Contact your hosting provider and ask them what measures they have put into place to help prevent your site from botnet attacks, and what they do to make sure that your site files get backed up.

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

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

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

A full WordPress maintenance routine ensures that:

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

A proper WP maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WordPress web site completely backed up and up-to-date is. 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 do not want to learn how to do WP site 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 are still breathing!

If you don’t want to back up your files manually, there are many plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Back Up, Duplicate & Protect Your WP Sites With Backup Creator Plugin For WP

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

the worldwide brute force botnet attack on WordPress is mostly attempting to compromise website admin panels by exploiting WP installations with “admin” as their user name.

For security reasons, avoid installing WordPress sites with the username admin. This is the first thing hackers will test. If your blog’s username is admin, then change this immediately.

For a tutorial for WordPress users that shows you how to change your username, go here: Changing Your WordPress Admin Username

Security Measure #4 – Make Sure Your Password Is Strong

A “brute force” attack occurs when a malicious script continually hits a username and password field with different strings of characters trying to guess the right combination that will unlock your site.

Unless some measure is put into place to prevent the brute-force attack from happening (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 hacking attacks. Make sure that you change your password to a string that contains at least eight or nine characters long, with upper and lowercase letters, and “special” characters (e.g. %, #, @, etc).

Tip

If you have trouble coming up with strong passwords or feel reluctant to set up different passwords for all of your online logins, then use a password management tool like Roboform …

Roboform is a password software you can use to generate very secure passwords(Roboform is a password management software that lets you create different strong passwords)

We have created a simple step-by-step tutorial for WP admin users on how to change your admin password here: How To Reset Passwords In WordPress

Security Measure #5 – Secure Your WP Config 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

(WordPress WP Config file)

If a hacker breaks into your WordPress site, they will typically try to access your 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 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 being attacked and even being used as part of a bot net, therefore, you must prevent people viewing 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 – Rename Or Delete Unnecessary Installation Files

Rename or delete the install.php, upgrade.php and readme.html files from your server.

You can remove these files after installation. If you don’t want to remove these files, then just rename them.

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

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

Ensure that all of your WordPress installation files, plugins, themes, etc. are always 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.

You can access the WordPress Theme Editor by selecting Appearance > Editor in your dashboard menu …

WordPress Theme Editor Menu

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

The WordPress theme feature lets anyone accessing your site’s admin view and edit all of your theme templates, or cause havoc on your site.

To prevent people from accessing 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 – Protect The WordPress Uploads Directory

The WordPress “uploads” directory stores all the media that gets uploaded to your blog.

Normally, this folder is visible to anyone online. All someone has to do to see the contents stored in your site’s “uploads” directory is visit the directory using their browser …

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

(WordPress uploads directory)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by malicious users, this can threaten 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, uploading a blank index.php file (this is literally an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to get professional help if you are unsure about what to do.

Security Measure #10 – Security Plugins

There are some great WordPress security plugins available that specifically address many common security issues faced by WordPress site owners, such as preventing unauthorized users from accessing your site, protecting your website from malicious software, preventing unauthorized file uploads, etc.

Many WordPress plugins address some but not all areas of WordPress security. One WordPress plugin that does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your files and damaging your site is SecureScanPro.

SecureScanPro - complete security plugin for WordPress

(SecureScanPro – WP total security plugin)

SecureScanPro is easy to install and easy to use, and addresses most of the security issues that WordPress users need to address.

Another plugin you may want to consider using is BlogDefender.

Blog Defender

Blog Defender Security Plugin(Blog Defender Security Solution)

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 site for potential security holes …

Blog DefenderAnd then shows you how to quickly fix these …

Blog Defender Security Product Suite For WordPress Web SitesIf 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 basic maintenance tasks like ensuring that your WordPress installation, WP plugins and WordPress themes are kept updated to their latest versions, tightening file and data protection and taking other necessary precautions can expose your website to attacks by hackers and bots.

No matter what type of business you run or plan to run online and how small you think your web presence is, you cannot ignore the importance of web security.

As a final reminder of the importance of keeping your websites protected, below is the advice given by an expert on web security to all WordPress users after the worldwide 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, website security is very important if you run a WordPress site. Hopefully, the above article has provided you with the initial steps you need to take to prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications via email whenever we publish new tutorials on WordPress security and tutorials about 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

***

Originally published as How To Protect Your WordPress Site From A Brute-Force Attack.