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 sites around the world, making it an easy target for hacking attacks.

In early 2013 a large-scale brute-force attack hit WordPress installations across almost every web host in existence.

These attacks were caused by botnets (infected computer networks programmed to attack other installations with security vulnerabilities).

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

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)

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. This can be achieved using software programs and scripts that can work through hundreds of login possibilities in minutes.

If you’re not using strong usernames or unguessable passwords, your site could be easily hacked by repeated attempts to guess your site’s login details.

This is called a “brute-force” attack.

What Is A Botnet?

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)

A “Botnet” is a network of private computers that have been infected with malicious scripts or software code, which can then be controlled remotely as a group, often without the computer owners even being aware that this is taking place inside their device.

Botnets are typically used to blast out mass spam emails.

Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of a botnet that has been actively infecting computer networks all around the globe 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. Image: SecureList.com)

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

News of the April 2013 mass brute-force botnet attack was widely reported in 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 website of the US Department of Homeland Security …

WordPress is the world's most popular CMS making it a target for hacking attempts

(WordPress is the world’s most used content management system which makes it a target for hacking)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are many great reasons why you should continue using WordPress if you are concerned about the security of your online business.

To learn what makes WordPress a very secure web platform, see this article: Can You Build A Secure Business Online Using WordPress?

Info

It’s important to understand 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 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 Blog From Being Brute Force Attacked – Ten Security Points

Every website with a security vulnerability provides some degree of opportunity to hackers. An unsecured website provides hackers with a resource for distributed denial of service attacks, spreading malware and as a source of information theft.

If a hacker can discover a web security flaw, your site can then be employed as a “bot” to attack larger and more valuable web sites.

Additional undesirable impacts of having your website hacked and your site security compromised include being blacklisted by Google, having spammy links promoting things like gambling, porn, etc. inserted in your content and page title and descriptions, redirecting visitors to phishing sites, drive-by downloads (adding malware on your visitors’ computers), and lots of other nasty things.

The harsh reality is that malicious bots are very likely trying to hack into your site at this very moment. Whether they will get in successfully or not, depends on how challenging you can make it for them to keep trying until they find how to get access, or are forced to give up and decide to look for a less protected target.

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

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

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

You will see that the scan will display a number of results and details about your WordPress setup …

Hackertarget - WordPress Security Check

(Hackertarget – WP security scan results. Source: 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 website, so can hackers.

WP Security Scan(Screenshot: BlogDefender website)

Being able 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 valuable information to hackers, as this informs them about any holes or weaknesses, especially where site owners haven’t updated their software versions.

If your website is driven by WordPress and you are not taking steps to bolster the security of your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your installation, because these attacks are systematically targeting WordPress installations worldwide!

Whenever a site gets compromised, webmasters can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been altered or even that their content has been entirely wiped out. Often, sites will become infected with malicious scripts without the owner’s knowledge or awareness.

To help avoid the heartache of having your site being hacked into, below are 10 essential and effective security checks that will help to protect your WordPress site from being brute-force attacked.

Note

Note: Some of the measures below need some technical skills to modify core WordPress or server files. If you are not technical, 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 Host

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

It is important to check that your host is regularly backing up your sites and that, if disaster strikes, you can quickly and easily get back your site.

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

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

A proper WordPress maintenance routine ensures that:

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

A full WordPress site maintenance routine looks like this …

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

Again, we cannot stress enough how important maintaining your WordPress website frequently backed up and updated is. WP site maintenance is not hard to do 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 it gets done. Backing up your site 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 many plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Backup, Clone And Protect Your WordPress Web Sites With Backup Creator WP Plugin

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

The mass brute-force attack on WordPress sites was mostly an attempt to compromise site administrator panels by exploiting sites that used “admin” as their account name.

For website security purposes, never install WordPress sites with the username “admin”. This is the first thing hackers will test. If your site’s user name is “admin”, then change this immediately.

We have created a detailed tutorial that shows you how to change your admin username here: Changing Your Admin Username In WordPress

Security Measure #4 – Avoid Weak Passwords

A “brute force” attack occurs when malicious software persistently tries to guess the right combination of username and password characters that will give the hacker entry to your website.

Unless some measure is put into place to prevent 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 gets access.

Weak passwords, therefore, make very easy targets for brute force attacks. Make sure that you change your password to a string that contains at least 8 or 9 characters long, and that includes upper and lowercase letters, combined with “special” characters (^%$#&@*).

Tip

Roboform is a password program that lets you create different unguessable passwords …

Roboform is a password program you can use to help you generate secure passwords(Roboform is a password software that lets you create different passwords)

We have created a detailed tutorial that shows you how to change your login password here: How To Reset Your Password

Security Measure #5 – Prevent The wp-config.php File From Being Visible

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 website, they will typically try to access the wp-config.php file, because this file contains your database information, security keys, etc. Getting access to this information would allow them 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 attacks and even being used as part of a bot net, therefore, 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 Website Installation Files

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

These files are not required after installation. If you don’t want to remove these files, then just rename them.

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

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

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

Security Measure #8 – Disable The Theme Editor

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

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

WP Theme Editor Menu

(The WordPress theme editor can be accessed via the main menu)

The WordPress theme editor feature allows anyone accessing your blog to view and make changes to all of your WP theme template files, and cause mayhem on your site.

To prevent people from being able to access 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 – Prevent Access To Your WordPress Uploads Directory

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

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

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

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

If any files stored in his folder have vulnerabilities that can be exploited by hackers, 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, adding a blank index.php file (this is literally a file with nothing in it named “index.php”) to your uploads directory, and so on. Again, it’s best to hire a professional if you are not sure about what to do.

Security Measure #10 – WordPress Security Plugins

A number of security plugins for WordPress are available that specifically address common security issues WordPress website owners face, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site from botnets, preventing injections of code into files, etc.

Many 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 website files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WP security software solution

(SecureScanPro – complete security software solution for WordPress)

SecureScanPro is easy to install and easy to use, and takes care of most of the security areas that WordPress users need to address.

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

Blog Defender

Blog Defender(Blog Defender)

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

BlogDefender shows you where potential security weaknesses in your WordPress site are …

Blog Defender Security Solution For WordPress SitesAnd lets you fix these quickly and easily …

Blog DefenderIf you don’t want to purchase a premium security plugin like SecureScanPro or BlogDefender, you can 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 making sure that your WordPress core files, WP plugins and WP themes are kept up-to-date, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

No matter what 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 afford to ignore.

As a final reminder of the importance of keeping your websites protected, below is the advice given by a web 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, WordPress security is very important if you run a WordPress site. Hopefully, 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 consult a professional WordPress security specialist, or search for a WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified via email whenever we publish new information on WordPress security and tutorials about new security plugins.

***

"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group

***