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 SecurityWhen you are the most popular content management system in the world and the preferred online publishing platform for millions of websites and loved by thousands of website developers and web designers, it’s inevitable that at some point in time, WordPress will come under attack by hackers.

In 2013 a global brute force attack hit WordPress installations across virtually every web host in existence.

These attacks were caused by networks of infected computers programmed to attack other vulnerable installations, also commonly known as “botnets”.

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

What Are 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 methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site’s administration login username and password. This can be achieved using software tools that automatically tries to guess hundreds of login permutations in minutes.

If you’re not using strong usernames or unguessable passwords, your website could be an easy target for hackers.

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/botnet)

A “Botnet” is a network of computers that have been infected with malicious software, which are then controlled remotely as a group, typically without the unsuspecting computer owners even being aware of this.

Botnets are regularly used to send mass spam emails from the infected computers of compromised user accounts.

Below is a screenshot taken from a site that monitors online security 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 infecting computer networks all around the globe since 2009. Source: SecureList.com)

These were highly distributed and well organized botnet attacks. Over 90,000 IP addresses were identified by a number of hosting 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.

News of this 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 often is targeted by hackers, due to its global popularity

(WordPress powers millions of websites and blogs worldwide, making it a frequent target for hacker attacks)

Does This Mean We Should Stop Using WordPress?

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

To understand why WordPress is a secure web platform, read this article: Why WordPress Is A Secure Platform For Websites –

Important 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 targeting sites built using other CMS platforms 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)

How To Protect Your WordPress Website From Being Brute-Force Attacked – Ten Security Checks

You may think that the information in your website or blog has no value to hackers, but the reality is that every website is valuable to a malicious user.

If a hacker can hack and remotely take control of your web site, the site can then be used as a “bot” in a planned cyber-attack against other highly-valued sites.

Additional undesirable impacts of having your website hacked and your site security compromised include getting blacklisted by search engines, having spammy links promoting things like casinos, discounted fashion, etc. inserted in your content and page title and descriptions, redirecting visitors to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasties.

The harsh reality is that hackers are trying to break into your web site right now. Whether they can hack into your site depends on how hard you have made things for them to keep persisting until they either discover how to get in, or decide to look for a less protected target.

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

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

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

You will see that the scan will display various results and details about your website setup …

Hackertarget - WP Security Scan

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

It should be obvious after using the tool shown above that if you are able to see all of this information about your website, then hackers can too.

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

Being able to see what 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 useful information to hackers, as this can inform them about exploitable security vulnerabilities, especially where site owners haven’t updated their files.

If your website is driven by WordPress and you are not taking 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 brute-force attacks are systematically targeting WordPress sites all the world!

Whenever a website or blog is broken into, webmasters can find themselves “locked out” of their own site, or notice that their files have been interfered with or that everything has been entirely wiped out. Typically, most compromised sites will become infected with malicious scripts without the owner even being aware of it.

To avoid the heartache (and significant financial loss) of having your site being hacked into, below are 10 simple, yet essential and effective security checks that will help to protect your WordPress site from being attacked by brute-force botnets.

Note

Note: Some of the recommended measures below need some technical skills to modify core WordPress and server files. If you have no technical skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress service provider for assistance.

***

Security Measure #1 – Contact Your Web Host

Contact your host and ask them exactly what security measures have been put into place to protect your site from being attacked, and what they are doing to make sure that your files and data are being backed up.

Make sure that your hosting service provider is backing up your sites and that, if anything should happen, you can quickly and easily recover your site.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Or Blog Frequently Up-To-Date

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

A complete WordPress maintenance routine ensures that:

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

A complete WordPress site maintenance routine looks like this …

Maintaining your WP website completely backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress website or blog frequently backed up and up-to-date is vitally important for WordPress security. Source: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WordPress website or blog regularly backed up and up-to-date. WP site 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 don’t want to learn how to do WP site maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website is the second most important thing you must do after making sure that you still have a pulse!

If you don’t want to perform manual backups, there are a number of plugins you can use. You can read about a WordPress backup plugin that can fully automate your backup process here: Backup, Copy & Keep Your WP Sites Protected 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 sites by exploiting WordPress sites that used “admin” as their username.

For reasons of website security, never install WordPress sites with the username “admin”. This is the first area hackers will test. If your site’s username is admin, change this immediately.

For a detailed step-by-step tutorial created especially for non-technical WordPress admin users on how to change your username, go here: How To Change Your Admin User Name In WordPress

Security Measure #4 – Make Sure Your Password Is Hard To Guess

A “brute force” attack occurs when malicious software continually hits a login or 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 block the brute force attack from happening (see further below for a couple of simple and effective suggestions for doing this), the “bot” will just keep attacking your site until it eventually “cracks” the code.

Passwords that are easy to guess, therefore, become very easy targets for botnets. Make sure that you change your password to something containing at least eight characters long, with both upper and lowercase letters, combined with “special” characters (e.g. ^, #, *, etc).

Practical Tip

Roboform is a password software you can use to generate different secure login passwords …

You can use a password management program like Roboform to help you generate strong login passwords(You can use a password management tool like Roboform to generate hard-to-guess passwords)

For a tutorial created especially for WP admin users that shows you how to change your password, go here: Changing Your WordPress Password

Security Measure #5 – Prevent Access To Your wp-config.php File

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

wp-config.php file

(wp-config.php)

If a hacker breaks into your site, they will typically try to access your wp-config.php file, because this is the file that contains your database details, 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 being attacked and even being used as part of a bot net, therefore, you must prevent your wp-config.php file from being easily 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 Site Installation Files

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

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

Security Measure #7 – Keep Your WordPress Installation, Themes & Plugins Up-To-Date

Hackers search for vulnerabilities they can exploit in earlier versions of WordPress, including outdated versions of WP plugins and themes.

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

Security Measure #8 – Disable Your Theme Editor

WordPress installations come with a built-in editor that allows you to edit plugin and theme code from the dashboard.

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

WordPress Theme Editor Menu

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

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

To prevent unauthorized 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 The WordPress Uploads Folder

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

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

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

(WordPress uploads folder)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, someone could upload unauthorized file types to your site.

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 a file with nothing in it named “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 – Use WordPress Security Plugins

There are a number of WordPress security plugins available that will address most security issues faced by WordPress website 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 website files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WP total security software solution

(SecureScanPro – WP security software)

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

Another security plugin you may want to consider using is BlogDefender.

Blog Defender

Blog Defender(Blog Defender)

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 security vulnerabilities …

Blog DefenderAnd then shows you how to fix these quickly …

Blog DefenderIf you don’t want to buy 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 web platform, but neglecting essential maintenance tasks like keeping your WordPress core files, WordPress plugins and themes 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, you simply cannot ignore the importance of web security.

As one last reminder of the importance of website security, below is the advice given by an expert on web security 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 given you the initial guidelines and help you need to keep your WordPress site protected from brute-force attacks. If you need any further help or assistance with WordPress security, please seek help from 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 be notified via email whenever we publish new information 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

***