Blog

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 is often the target of attacks by hackers.

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

These attacks were caused by computer networks infected with malware and programmed to attack other vulnerable installations, also commonly known as “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)

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 is achieved with software programs that automatically tries to guess hundreds of login permutations in minutes.

If you’re using obvious usernames and passwords that are easy to guess, your site can be an easy target for hacking attempts.

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.org)

A “Botnet” is a network of computers that have been infected with malicious software, 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 regularly used to blast out mass spam emails from 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 a botnet that has been actively compromising computer networks all around the world since 2009 called “Zeus” …

The Zeus botnet has been actively infecting 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. Screenshot: SecureList.com)

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

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

WordPress often comes under attack by hackers, due to its popularity

(WordPress powers millions of sites around the world, making it a target for malicious attacks by hackers)

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

No. In fact, there are many good reasons why you should continue using WordPress if you are concerned about website security.

We explain why WordPress is a secure platform for websites in this article: Is WordPress Secure? What Every Blog Owner Needs To Know

Important

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 web applications like Joomla).

Mike Little, the co-founder of WordPress, made the following comment about the botnet 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)

Protecting Your WordPress Website From Being Brute Force Attacked – 10 Security Checks

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

If a hacker can discover a web software weakness, that web site can then be used as a “bot” to attack other valued websites.

Additional undesirable effects of having your website hacked and your site security compromised include getting blacklisted by search engines, having stealthy spam links promoting things like viagra, cheap offers on brand names, etc. in your content and page title and descriptions, malicious redirects to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasty things.

The truth is that malicious bots are probably trying to break into your website or blog as you are reading these very words. Whether they can do this successfully will depend on how challenging you will make it for hackers and botnets to continue trying until they find a way to get in, or are forced to give up and go look for a less protected target.

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

If you visit a site like Hackertarget.com and run your website through their WordPress security check …

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

You will see that the test will yield various results and details about your site …

WP Security Scan

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

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

Website Security Check(Screenshot: 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 can be potentially useful information to hackers, as this can inform them about any potential security vulnerabilities, especially where the owners haven’t updated their software versions.

If your website is powered by WordPress and you are not proactive steps to bullet-proof 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 installations around the world!

When a website is compromised, blog owners will discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been interfered with or even entirely wiped out. Often, sites will become infected with malicious scripts without the owner even being aware of it.

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

Important

Note: A few of the measures 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 code on your site, then ask your web host or a professional WordPress technical provider for help.

***

Security Measure #1 – Contact Your Hosting Provider

Contact your hosting provider and ask them what security measures are in place to protect your site from being attacked, and what is done to ensure that your files and data are being regularly backed up.

Make sure that your web host regularly backs up your sites 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 just on your host for your site backups. Instead, learn how to maintain your WordPress site or pay someone to get this done for you and develop a habit of performing a full site maintenance routine on a frequent basis (e.g. daily, weekly, monthly, etc …)

A full WordPress maintenance routine ensures that:

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

A full WP maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important it is to maintain your WordPress website or blog fully backed up and updated. WordPress site maintenance is not hard 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 WordPress maintenance yourself, pay a professional to do it but make sure this gets done. Backing up your website is the next most important thing you should do after making sure that you still have a pulse!

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 backup process here: Back Up, Clone And Keep Your WP Websites Protected With Backup Creator Plugin For WordPress

Security Measure #3 – Make Sure That Your Username Is Not “Admin”

The mass brute-force attack on WordPress sites was mostly attempting to compromise website admin panels and gain access to the site by exploiting WordPress sites using “admin” as the user name.

For security purposes, 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”, then change it immediately.

For a detailed tutorial that shows you how to change your login username, go here: Changing Your Admin User Name In WordPress To Another 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 combination of characters in a password and username that will unlock your website.

Unless some measure is put into place to stop the brute force attack from happening (see further below for a couple of simple and effective ways to do this), the “bot” will just continue to attack your site until it eventually “cracks” the code.

Weak passwords, therefore, make really easy targets for hackers. Make sure that you change your password combination to a string that is at least 8 characters long, with both upper and lowercase letters, combined with a few “special” characters (%^#$@&*).

Practical Tip

Roboform is a password management tool you can use to help you generate really secure passwords …

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

For a detailed step-by-step tutorial for non-technical admin users that shows you how to change your WordPress admin password, go here: How To Reset Login Passwords In WordPress

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

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

WordPress WP Config file

(WP Config file)

If a hacker breaks into your WordPress website, they will typically search for your wp-config.php file, because this file contains your WordPress database information, 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, 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 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 delete these files, then just rename them.

Security Measure #7 – Update Your WordPress Software, Themes & Plugins To Their Latest Version

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

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

Security Measure #8 – Disable The WordPress Theme Editor

WordPress comes with a built-in editor feature that allows the site administrator to edit theme and plugin files inside the dashboard area.

In WordPress, you can access the WordPress Theme Editor by selecting Appearance > Editor in the main menu …

WP Theme Editor Menu

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

The WordPress theme feature lets anyone accessing your blog view and modify all of your files, and create mayhem on your site.

If you want to prevent unauthorized people from being able to access the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Protect The WordPress Uploads Folder

The “uploads” folder contains all the media files that get uploaded to your website.

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

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

(WordPress has an uploads directory 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 or malicious users, anyone could upload unauthorized file types or compromise 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, 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 get professional assistance if you are unsure about what to do.

Security Measure #10 – Install Security Plugins

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

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

SecureScanPro - security software solution for WordPress

(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 Security Solution For WordPress Websites

Blog Defender(Blog Defender)

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

BlogDefender scans you WordPress installation for potential security vulnerabilities …

Blog Defender Security PluginAnd lets you fix these quickly …

Blog Defender Security Product Suite For WordPressIf you don’t want to buy a premium security plugin like SecureScanPro or BlogDefender, then use various free WordPress 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 updating your WordPress installation, WordPress plugins and WordPress themes, tightening file and data protection and taking other necessary precautions can expose your website to malicious 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 simply cannot afford to ignore the importance of securing your website or blog.

As one last reminder of the importance of keeping your websites protected, below is the advice given by a security expert to all WordPress users following the worldwide 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, the above information 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 technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications whenever we publish new information on WordPress security and reviews of new WordPress security plugins.

***

"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

***