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 SecurityPowering millions of sites worldwide makes WordPress a target for attempted hacking attacks.

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

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

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. This is achieved using software programs that can guess hundreds of possible logins in minutes.

If you’re using weak usernames and passwords that are easy to guess, your website could be easily hacked by the script’s persistent attempts to work out your site’s login details.

This is called a “brute-force” login attack.

Botnets – What Are They?

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 computers that have been compromised and infected with malicious scripts or code, which are then controlled remotely as a group, often without the computer owners even being aware that this is taking place.

Botnets are normally used used to send out 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” …

ZeuS is a botnet that has been actively compromising computer networks all around the world since 2009.

(The Zeus botnet has been actively infecting computer networks all around the globe since 2009. Image: SecureList.com)

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

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

WordPress is the world's most popular content management system which makes it a natural target for malicious attempts by hackers

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

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

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

To understand why WordPress is a secure platform for websites, see this article: Is WordPress Secure? What Every Website Owner Needs To Know

Useful Info

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

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

Preventing Your WordPress Blog From Being Brute Force Attacked – Ten Security Checks

Every web site with a security vulnerability can be seen as an opportunity to hackers. If you think that the information in your site is of no interest to hackers, think again. Large, medium and small websites, personal blogs, government sites … even sites owned by online security and anti-hacking experts can and have been targeted.

If hackers can exploit a security weakness that allows them to take over and control your site, that website can then be employed to target larger and more valued websites.

Additional undesirable effects of having your site hacked and your site security compromised include getting blacklisted by search engines, having spammy links promoting things like viagra, discounted fashion, etc. inserted into your content and meta data, redirecting visitors to phishing sites and other websites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The harsh reality is that brute-force software bots are very likely searching for security weaknesses and trying to break into your web site while you are reading this article right now. Whether they will get in will depend on how challenging you have made it for hackers and bots to keep trying until they work out a way to get in, or are forced to decide to look for a more vulnerable target.

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

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

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

You will see that the scan returns various results and information about your website setup …

WordPress Security Scan

(WordPress security check results. Image source: Hackertarget.com)

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

Website Security Scan(Source: BlogDefender website)

The ability to see what 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 are all useful information to hackers, as this informs them about any vulnerabilities, especially where the owners haven’t updated their files.

If your website runs on WordPress and you’re not taking appropriate steps to bullet-proof your site, 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 installations all the world!

Whenever a website or blog is broken into, webmasters will find themselves completely “locked out” of their own site, or notice that their files have been altered or even that their content has been completely wiped out. Typically, most sites will be infected with malicious scripts or viruses without the owner even being aware that this has occurred.

To help avoid the heartache and frustration (and potential loss of valuable business data) that comes with discovering that your website has been hacked into, we have listed below 10 essential and effective security checks that will help to protect your WordPress site from being attacked by brute force botnet hacking attempts.

Disclaimer

Note: A few of the measures below require some technical skills to modify core WordPress or server files. If you have no web coding skills, or don’t want to mess around with file code, then ask your web host or search for a WordPress service provider in our WordPress Services Directory.

***

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

Contact your hosting service and ask them what security precautions have been put in place to protect your site from being attacked, and what they do to make sure that your WordPress sites get backed up.

Check that your hosting provider regularly backs 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 Website Or Blog Regularly Updated

You should never rely on your host for your site backups. Instead, learn how to maintain your WordPress site or pay someone to get this service done for you and maintain a habit of performing a complete site maintenance routine frequently (e.g. daily, weekly, monthly, etc …)

A full WordPress maintenance routine ensures that:

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

A complete WP site maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WordPress installation completely backed up and updated is. WP site maintenance is not hard 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 WordPress maintenance yourself, get someone else to do it but make sure it gets done. Backing up your website is the next most important thing you should do after making sure that you are still breathing!

If you don’t want to perform manual backups, there are a number of free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Back Up, Duplicate & Protect Your WordPress Websites And Blogs With Backup Creator WordPress Plugin

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

the worldwide brute force botnet attack on WordPress sites was mostly an attempt to compromise site admin panels and gain access to the site by exploiting sites with “admin” as the username.

For website security reasons, never install WordPress sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your site’s user name is admin, then make sure you change it immediately.

For a detailed step-by-step tutorial on how to change your admin username, go here: How To Change Your WordPress Admin Username

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when a malicious script continually and persistently hits a username and password field with different strings of characters in an attempt to guess the right combination that will give them access to 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 attacking your site until it eventually “cracks” the code.

Weak passwords, therefore, become really easy targets for hacking attacks. Make sure that you change your password to something that is at least eight characters long, with both upper and lowercase letters, and “special” characters (^%$#&@*).

Practical Tip

You can use a password management software tool like Roboform to create very secure passwords …

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

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

Security Measure #5 – Secure Your WP Config File

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

WordPress WP Config file

(wp-config.php file)

If hackers break into your WordPress website, they will look for the wp-config.php file, because this is the file that 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 attacks and even being used as part of a bot net, therefore, you must prevent your wp-config.php file from being accessible. 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 completely unnecessary after installation and can be removed. If you don’t want to remove these files, just rename them.

Security Measure #7 – Upgrade Your WordPress Blog, Plugins & Themes

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

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

Security Measure #8 – Disable The WordPress Theme Editor

WordPress installations come with a built-in editor feature that lets administrators edit plugin and theme files inside the dashboard area.

You can access your WordPress Theme Editor by selecting Appearance > Editor from the main menu …

WordPress Theme Editor Menu

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

The WordPress theme editor feature allows anyone accessing your blog to view and modify all of your theme templates, and cause mayhem on your site.

If you want to prevent people from being able to access 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 Folder

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

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

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

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

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this could compromise the security of your website.

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 ask help from someone who knows what they are doing if you are not sure about what to do.

Security Measure #10 – Install Security Plugins

A number of great security plugins for WordPress are available that will address most security issues WordPress website owners face, such as preventing hackers from accessing your site, protecting your site from brute-force attacks, preventing unauthorized file uploads, etc.

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

SecureScanPro - WP complete security plugin

(SecureScanPro – WordPress complete security software)

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 plugin you may want to look at using is BlogDefender.

Blog Defender Security Plugin

Blog Defender Security Solution For WordPress(Blog Defender Security Solution)

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

BlogDefender shows you where the security weaknesses in your web site are …

Blog Defender Security Plugin For WordPressAnd then shows you how to quickly fix these …

Blog DefenderIf you don’t want to invest in a security plugin like SecureScanPro or BlogDefender, you can use various free WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting basic maintenance tasks like updating your WordPress installation, WP plugins and themes, tightening file and data security and taking other necessary precautions can have disastrous consequences.

Regardless of the 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 website security.

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 following the worldwide brute-force attacks by botnets 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 of the utmost importance if you run a WordPress site. Hopefully, this information will help 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 professional WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications via email when we publish new articles and tutorials on WordPress security and reviews of WordPress security plugins.

***

"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

***