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 SecurityPowering millions of sites around the world makes WordPress a frequent target for hacking attacks.

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

These attacks were caused by computer networks infected with viruses and programmed to attack other vulnerable installations, also commonly known as “botnets”.

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

Brute Force Attacks – Definition

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 done with software programs that can work through hundreds of login permutations in minutes.

If you’re using predictable user names and passwords that are easy to guess, your website can be an easy target for hackers.

This is called a “brute force” login attack.

Botnet Definition

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)

”Botnets” are networks of private computers that have been infected with malicious scripts or software, which can then be controlled remotely as a group, typically without the computer owners’ knowledge or awareness.

Botnets are normally used used to blast mass spam emails.

The screenshot below was taken from an internet 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” …

The Zeus botnet has been actively compromising computer networks all around the globe since 2009.

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

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

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

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

(WordPress often comes under attack by hackers)

Does This Mean We Should Stop Using WordPress?

No. In fact, there are lots of great reasons why you should choose WordPress if you are concerned about the security of your online presence.

To learn what makes WordPress a very secure platform for websites, read this article: Is WordPress Secure?

Important

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

Mike Little, the co-founder 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)

How To Protect Your WordPress Blog From Being Brute Force Attacked – 10 Security Checks

Every website with a security vulnerability offers some value to hackers. A vulnerable blog not only offers newbie hackers opportunities to improve their skills and win “respect” amongst their peers, but it can also acts as a valuable platform for launching stealth attacks, distributing malware and participating in information theft.

If a hacker can exploit a web security flaw that allows them to remotely control your site, your website or blog can then be employed to target larger and more valued web sites.

Additional undesirable effects of having your site hacked and your site security compromised include getting blacklisted by Google, having spammy links advertising things like viagra, porn, etc. inserted into your content, malicious redirects to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasties.

The harsh reality is that malicious bots are most likely trying to hack into your website or blog right now. Whether they will hack in successfully or not, depends on how difficult or easy you will make things for hackers to keep trying until they can discover a way to get access, or give up and go look for a less protected target.

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

Do you own a WordPress site? If so, visit Hackertarget.com and run your site through their WordPress security check …

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

You will see that the scan will return a number of results and information about your WordPress site …

Hackertarget - WP Security Scan

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

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

WP Security Check(Product image: Blog Defender)

The ability 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 can all be valuable information to hackers, as this informs them about exploitable security weaknesses, especially in older versions.

If your website is driven by WordPress and you’re not taking appropriate steps to harden your site, we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically hitting WordPress installations worldwide!

Typically, when a site is broken into, webmasters will find themselves “locked out” of their own site, or notice that their files have been modified or even that their content has been completely wiped out. Often, compromised sites will become infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache (and potential loss of valuable business data) of having your site being hacked into, we have listed below ten essential and effective security checks that will help to prevent your WordPress site from botnet attacks.

Important Info

Note: A few of the recommended measures below need some technical skills to modify core WordPress or server files. If you are not technical-minded, or don’t want to mess around with file code, then ask your web host or a professional WordPress service provider for help.

***

Security Measure #1 – Get In Touch With Your Webhosting Service

Contact your webhosting service provider and ask them what security precautions are in place to protect your site from brute force attacks, and what they do to make sure that your site files get regularly backed up.

It is important to check that your hosting provider is backing up your server files and that, if anything should happen, you can easily recover your files.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Regularly Updated

You should never rely just on your host for site backups. Instead, learn how to manage your WordPress site or get this done for you and develop a habit of performing a complete WordPress site maintenance routine on a regular basis (e.g. daily, weekly, fortnightly, etc …)

A proper WordPress maintenance routine ensures that:

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

A complete WP maintenance routine looks like this …

Maintaining your WordPress site completely backed up and updated is vitally important for WordPress security.(Maintaining your WP website 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 WP installation regularly backed up and up-to-date. WP maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website. 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 second most important thing you must do after making sure that your heart is still beating!

If you don’t want to back up your site 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, Duplicate And Protect Your WordPress Website With Backup Creator Plugin For WordPress

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

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

For reasons of website security, never set up a WordPress site with the username admin. This is the first area of potential vulnerability hackers will test. If your blog’s username is admin, then change this immediately.

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

Security Measure #4 – Use A Strong Password

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

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

Passwords that are easy to guess, therefore, make really easy targets for botnets. Make sure that you change your password combination to something containing at least 8 characters long, with both upper and lowercase letters, and “special” characters (%^#$@&*).

Tip

You can use a password program like Roboform to generate secure passwords …

Roboform is a password tool that lets you easily generate different secure passwords(You can use a password management software tool like Roboform to help you generate difficult passwords)

We have created a simple tutorial on how to change your admin password here: What To Do If You Need To Reset Your Password In WordPress

Security Measure #5 – Prevent Access To Your WP Config File

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

wp-config.php

(wp-config.php file)

If a hacker breaks into your WordPress website, they will search for the wp-config.php file, because this file contains your database information, 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, you must prevent your wp-config.php file from being 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 Installation Files

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

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 Blog, Themes & Plugins Up-To-Date

Hackers are always on the lookout for vulnerabilities in outdated versions of WordPress that can be exploited, including out-of-date versions of WP themes and plugins.

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

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress comes with a built-in editor that allows site administrators to edit theme and plugin code inside the dashboard.

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

WP Theme Editor Menu

(Accessing the WordPress theme editor via the WordPress dashboard menu)

This allows anyone accessing your blog to view and edit your WordPress theme template files, or cause mayhem on your site.

To prevent unauthorized people from accessing 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 Your Site’s Uploads Directory

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

Normally, this folder is visible to online users. All a person needs to do to see all of the contents stored in the “uploads” folder is visit the directory using a web browser …

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

(WordPress uploads directory)

If any directories in your website 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, adding a blank index.php file (this is literally a file with nothing in it 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 – Security Plugins

Several WordPress security plugins are available that will address most security issues faced by WordPress site owners, such as preventing unauthorized users from accessing your site, protecting your files from malicious exploits, preventing unauthorized file uploads, etc.

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

SecureScanPro - complete security plugin for WordPress

(SecureScanPro – security software for WordPress)

SecureScanPro is easy to install and easy to use, and does a great job of addressing most of the security areas that WordPress users need to address.

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

Blog Defender Security Product Suite For WordPress

Blog Defender Security Solution For WordPress Web Sites(Blog Defender Security Product Suite For WordPress Sites)

This product is a package of WordPress security video tutorials, WordPress plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender scans you WordPress site for potential security vulnerabilities …

Blog DefenderAnd then shows you how to quickly and easily fix these …

Blog Defender Security Solution For WordPress Web SitesIf 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 platform, but neglecting essential maintenance tasks like making sure that your WordPress software, plugins and themes are kept up-to-date, tightening file and data security 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 ignore.

As a final reminder, below is the advice given by a website security expert to all WordPress users following the large-scale 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, WordPress security is very important if you run a WordPress site. Hopefully, the information in 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 WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

Also, please subscribe to WPCompendium.org to be notified via email whenever we publish new tutorials on WordPress security and tutorials about new security plugins and solutions.

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)

***