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 SecurityBeing the world’s most used content management system makes WordPress an obvious target for hacker attacks.

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

These attacks were caused by computers infected with viruses and programmed to attack other computers (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 WordPress sites. One of these is by trying to guess the site’s administration login username and password. This is achieved with scripts and software tools that can work through hundreds of login permutations in minutes.

If you’re using obvious login details, your website can be easily hacked by repeated attempts to work out 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.org)

A “Botnet” is a network of computers that have been infected with malicious code, which are then controlled remotely as a group, often without the unsuspecting computer owners’ knowledge or awareness.

Botnets are normally used used to blast mass spam emails from the infected computers of unsuspecting users.

The screenshot below was taken from a site that monitors online security showing the locations of the command centers of ZeuS – a botnet that has been actively compromising 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 world since 2009. Screenshot: SecureList.com)

These were well organized and highly distributed attacks on WordPress. 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 site administration areas. The mass attack continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

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

WordPress is frequently the target of malicious attempts by hackers, due to its global popularity

(WordPress is often the target of worldwide malicious attacks by hackers)

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

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

To understand why WordPress is a secure platform for websites, read this article: Concerned About WordPress Security? What Every Business Owner Needs To Know About WordPress

Important Info

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

Mike Little, one of the co-founders of WordPress with Matt Mullenweg, made this comment 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 Site From Brute Force Attacks – 10 Security Points

Every website or blog with a vulnerability presents an opportunity to hackers. A vulnerable blog offers malicious users with a valuable platform for distributed denial of service (DDoS) attacks, spreading malware and as a source of information theft.

If a hacker can hack and gain control of your website, the website or blog can then be employed as a “bot” in a planned cyberattack against larger and more valuable web sites.

Additional undesirable results of having your site hacked include being blacklisted by search engines, having stealthy spam links promoting things like online meds, discounted fashion, etc. inserted in your content, redirecting visitors to phishing sites and other websites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasty things.

The harsh reality is that software-driven bots are probably scouring for security weaknesses and trying to break into your web site right now. Whether they will break into your site or not, depends on how difficult or easy you have made it for hackers to keep persisting until they discover how to break in, or decide to look for a less secure target.

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

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

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

You will see that the check returns a number of results and details about your WordPress site …

WP Security Check

(Hackertarget – website security check results. Screenshot image: Hackertarget.com)

It should be obvious after using the above tool that if you can access all of this information, hackers can too.

WordPress Security Scan(Screenshot: Blog Defender)

Being able 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 in your site can be potentially useful information to hackers, as this informs them about potentially exploitable security weaknesses, especially in older versions.

If your site or blog is driven by WordPress and you’re 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 attacks are systematically hitting WordPress installations worldwide!

When a site is hacked, site owners can find themselves “locked out” of their own site, or notice that their files have been vandalized or even entirely wiped out. Often, most compromised sites will be infected with malicious software or viruses without the owner even being aware of it.

To avoid the heartache and aggravation that comes with having your web site being hacked into, below are ten simple, yet essential and effective security checks that will help to protect your WordPress site from being attacked by brute force botnet hacking attempts.

Important Info

Note: A few of the recommended steps below need some technical skills to modify core WordPress or server files. If you have no web 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 – Get In Touch With Your Webhosting Service

Get in touch with your host and ask them exactly what security precautions have been put into place to protect your site from being attacked, and what is done to make sure that your server files and data get backed up.

It is important to make sure that your webhosting service provider is backing up your server files and that, if anything should happen, you can easily get back your files.

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

Never rely on your webhosting service provider for site backups. Instead, learn how to manage your WordPress site or pay someone to get this service 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 proper WordPress maintenance routine ensures that:

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

A complete WordPress maintenance routine looks like this …

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

Again, we cannot stress enough how vitally important maintaining your WordPress website or blog completely backed up and up-to-date is. WordPress maintenance is not hard 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 WP 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 must do after making sure that you are still breathing!

If you don’t want to back up your files manually, there are a number of free and paid plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Backup, Copy & Protect Your WP Sites With Backup Creator Plugin For WP

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

The brute-force attack on WordPress is mostly attempting to compromise site admin panels by exploiting WP installations that used “admin” as their account name.

For website security reasons, don’t set up WordPress sites with the username admin. This is the first thing hackers will test. If your blog’s username is admin, you will should change it immediately.

For a simple step-by-step tutorial created especially for non-technical WP admin users that shows you how to change your login username, go here: How To Change Your WordPress Admin User Name

Security Measure #4 – Use A Strong Password

A “brute force” attack occurs when malicious software persistently hits a username and password field with different character strings trying to guess the right login combination that will unlock your site.

Unless you put some measure in place to prevent the brute-force attack (see further below for a couple of simple and effective ways to do this), the “bot” will just persist in attacking your site until it eventually “cracks” the code.

Weak passwords, therefore, make very easy targets for bot attacks. Make sure that you change your password combination to a string that is at least eight or nine characters long, and that includes upper and lowercase letters, combined with “special” characters (e.g. ^, $, &, etc).

Useful Tip

You can use a password management tool like Roboform to create unbreakable passwords …

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

For a detailed tutorial on how to change your password, go here: What To Do If You Need To Change Your Password

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

The wp-config.php file contains important 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 normally search for the wp-config.php file, because this file contains your WordPress database details, 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.

In order to protect your WordPress site from being attacked and even being used as part of a bot net, therefore, prevent your wp-config.php file from being easily 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

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

You can remove these files after installation, as they are unnecessary. 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 are always on the lookout for vulnerabilities they can exploit in earlier WordPress versions, including outdated versions of themes and plugins.

Make sure to always keep all of your installation files, plugins, themes, etc. up-to-date.

Security Measure #8 – Disable The Theme Editor

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

In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor in your admin menu …

WP Theme Editor Menu

(Accessing the WordPress theme editor using the WP main menu)

This allows anyone accessing your blog’s admin area to see and modify all of your WP theme template files, or create havoc 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 editing your wp-config.php file.

Security Measure #9 – Secure Your Site’s Uploads Folder

The WordPress “uploads” directory contains all the media that gets uploaded to your WordPress site.

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

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

(WordPress uploads directory)

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

Security Measure #10 – Security Plugins

There are a number of security plugins for WordPress available that specifically address most common security issues WordPress website owners face, such as preventing unauthorized users from accessing your site, protecting your site from malicious scripts, preventing injections of code into files, etc.

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

SecureScanPro - security plugin for WordPress

(SecureScanPro – WordPress complete security software)

SecureScanPro is easy to install and easy to use, and takes care of 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

Blog Defender WordPress Security Suite(Blog Defender)

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

BlogDefender shows you where the security weaknesses in your website are …

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

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

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure web platform, but neglecting basic maintenance tasks like updating your WordPress installation, plugins and WP themes, tightening file and data protection and taking other necessary precautions can expose your website to attacks by hackers and bots.

No matter what 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 website.

As a final reminder, below is the advice given by a security expert to all WordPress users following the worldwide brute force attacks by botnets on WordPress in 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 of the utmost importance 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 seek help from a professional WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

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

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum

***