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 powers millions of websites and blogs worldwide, which makes it a target for attacks by malicious users.

In 2013, WordPress installations around the world were subjected to large-scale brute-force attacks.

These attacks were caused by botnets (computers infected with malware and programmed to attack other computers with security vulnerabilities).

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 use to try and break into WordPress sites is by trying to guess the site admin’s login username and password. To attempt this, hackers use scripts and tools that automatically tries to guess hundreds of login permutations in minutes.

If you’re using predictable user names and passwords, your site could be easily hacked by persistent attempts to guess your site’s login details.

This is called a “brute force” login 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/botnet)

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

Botnets are regularly used to send mass spam emails.

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 compromising computer networks all around the world since 2009 called “Zeus” …

The Zeus botnet 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. Screenshot image: SecureList.com)

These were highly distributed and well organized botnet attacks on WordPress sites. Over 90,000 IP addresses were identified by a number of hosting companies in the initial attack alone, when millions of attempts to force their way into WordPress user admin areas took place. The worldwide brute-force attacks continued after this, with over 30,000 WordPress blogs being hacked per day.

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

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

(Powering millions of websites and blogs around the world makes WordPress a target for hacking)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

We explain why WordPress is a secure web platform in this article: Is WordPress A Secure Website Platform?

Important Info

It’s important to understand that, in the case of April 2013 brute-force botnet attack described above, there was no WordPress vulnerability being exploited (the same script was also targeting sites built using other web 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 Protect Your WordPress Site From Brute Force Attacks – 10 Security Points

Every website or blog with a security vulnerability provides some value opportunity to hackers. A compromised website or blog provides hackers with a valuable resource for denial of service attacks, spreading malware and as a source of information theft.

If a hacker can find a software flaw in your security that allows them to take over your blog, that website can then be used as a “bot” to attack more valuable web sites.

Additional undesirable consequences of having your website hacked and your site security compromised include getting blacklisted by search engines, having spammy links promoting things like gambling, cheap offers on brand names, etc. in your content and meta data, redirecting visitors to phishing sites or other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and many other nasties.

The truth is that hackers are searching for exploits and trying to break into your website as you are reading this page. Whether they will break in or not, will depend on how difficult you can make things for hackers or botnets to continue trying until they work out a way to get in, or give up and decide to look for a less protected target.

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

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

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

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

Website Security Check

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

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

Hackertarget - WordPress Security Check(Screenshot image: Blog Defender)

The ability to see which 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 on your server can all be potentially valuable information to hackers, as this can inform them about potential security weaknesses, especially in older versions.

If your site or blog is driven by WordPress and you are not taking steps to toughen up your site, then it’s practically guaranteed that, at some point, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically targeting WordPress sites worldwide!

When a site is compromised, site owners can find themselves completely “locked out” of their own site, or notice that their content has been modified or that everything has been entirely wiped out. Often, most sites will be infected with malicious software or viruses without the owner even being aware that this has taken place.

To avoid the heartache (and potential loss of valuable business data) of having your site being hacked into, we have listed below 10 essential and effective security measures that will help to prevent your WordPress site from brute force attacks.

Warning

Note: Some of the steps below need some technical understanding of how to modify core WordPress and/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 service provider for help.

***

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

Get in touch with your host and ask them exactly what security systems have been put in place to help prevent your site from brute-force attacks, and what they do to make sure that your server files and data get regularly backed up.

Make sure that your webhosting company regularly backs up your sites and that, if disaster strikes, you can easily get back your files.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Regularly Updated

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

A proper WordPress maintenance routine ensures that:

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

A proper WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP web site backed up and up-to-date. WordPress maintenance is not hard or time-consuming, but it must be done to ensure the security of your website. If you do not want to learn how to do WP maintenance yourself, get someone else to do it but make sure this 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 data manually, there are many WordPress plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Back Up, Copy & Keep Your WordPress Sites Protected With Backup Creator WordPress Plugin

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

the worldwide brute-force botnet attack on WordPress is mostly attempting to compromise site administrator panels and gain access to sites by exploiting sites that used “admin” as their username.

For website security reasons, avoid installing sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your site’s username is “admin”, change it immediately.

For a simple step-by-step tutorial on how to change your WordPress username, go here: How To Change Your WP Admin User Name

Security Measure #4 – Make Sure Your Password Is Secure

A “brute force” attack occurs when malicious software continually and persistently tries to guess the right password and username characters that will unlock your site.

Unless you put some measure in place to stop the brute-force attack (see further below for a couple of effective ways to do this), the “bot” will just continue to attack your site until it eventually works out the combination.

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

Useful Tip

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

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

We have created a detailed tutorial created especially for non-technical admin users that shows you how to change your WordPress password here: Changing 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.

WordPress WP Config file

(WP Config file)

If a hacker breaks into your site, they will normally look for your wp-config.php file, because this is the file that 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.

To protect your WordPress site from attacks and even being used as part of a bot net, therefore, prevent people finding 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 – Delete Or Rename Unnecessary Installation Files

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

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

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

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

Make sure to keep your WordPress installation files, plugins, themes, etc. up-to-date.

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WordPress Theme Editor Menu

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

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

To prevent 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 – Secure Your WordPress Uploads Directory

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

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

(WordPress uploads folder)

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

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers, someone could 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 blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to seek professional help if you are unsure about what to do.

Security Measure #10 – Security Plugins

Some great WordPress security plugins are available that will address most common security issues WordPress site 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 does a comprehensive job of scanning, fixing and preventing issues that could lead to hackers accessing your site files and causing damage to your site is SecureScanPro.

SecureScanPro - complete security software for WordPress

(SecureScanPro – WP complete security software solution)

SecureScanPro is easy to install and easy to use, and does a great job of fixing 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

Blog Defender Security Suite For WordPress Websites & Blogs(Blog Defender Security Plugin For WordPress Sites)

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

BlogDefender scans you website for potential security vulnerabilities …

Blog DefenderAnd lets you fix these quickly and easily …

Blog Defender WordPress Security PluginIf you don’t want to invest in a premium 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 very secure platform, but neglecting basic maintenance tasks like updating your WordPress software, WordPress plugins and WP themes, 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, you cannot ignore the importance of securing your web sites.

As one last reminder of the importance of website security, below is the advice given by a security expert 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 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.

Also, remember subscribe to WPCompendium.org to receive notifications when we publish new tutorials on WordPress security and reviews of WordPress security plugins.

***

"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now

***