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 SecurityWordPress is the world’s most used content management system which makes it an easy target for hackers.

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

These attacks were caused by botnets (computer networks infected with malware and programmed to attack other sites).

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’s administration login username and password. To attempt this, hackers use software tools that can guess hundreds of possible logins in minutes.

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

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

”Botnets” are networks of computers that have been infected with malicious software, which are then controlled remotely as a group, often without the computer owners even being aware that this is taking place.

Botnets are normally used used to blast out mass spam emails.

The screenshot below was taken from an online security monitoring site showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the globe since 2009 …

ZeuS is a botnet that has been actively infecting 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 well organized and highly distributed attacks on WordPress. 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 administration areas. The attacks then continued, with over 30,000 WordPress sites being hacked each day.

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

Powering millions of websites worldwide makes WordPress a target for hacking attempts

(WordPress is frequently the target of malicious attempts by hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

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.

We explain why WordPress is a secure web platform in this article: Can You Build A Secure Business Online Using WordPress?

Important

It’s important to understand that, in the case of the brute-force botnet attack described above, there was actually no WordPress vulnerability being exploited (the same script was also targeting sites built using other platforms 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)

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

You may think that the information in your website offers no value to hackers, but the reality is that to a hacker, every website is an opportunity to benefit at your expense.

If hackers can hack and gain remote control of your site, your site can then be used as a “bot” in a planned cyber-attack against more highly-valued sites.

Additional undesirable effects of having your site hacked include getting blacklisted by Google, having spammy links advertising things like gambling, cheap offers on brand names, etc. in your content and page title and descriptions, malicious redirects 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 malicious bots are trying to break into your website at this very moment. Whether they will hack in successfully or not, will depend on how hard or easy you will make things for hackers and bots to continue trying until they discover a way to get access, or are forced to give up and decide to look for a more vulnerable target.

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

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

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

You will see that the test returns a number of results and information about your WordPress installation …

WordPress Security Check

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

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

WP Security Check(Source: Blog Defender)

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

If your site or blog is driven by WordPress and you’re not proactive steps to bolster the security of your site, we can practically guarantee that, at some time in the near future, someone will attempt to hack your installation, because these brute force attacks are systematically hitting WordPress sites worldwide!

When a website or blog is broken into, webmasters can discover much to their dismay that they have been “locked out” of their own site, or notice that their content has been interfered with or even entirely wiped out. Often, sites will be infected with malicious software or viruses without the owner’s knowledge or awareness.

To help avoid the heartache and aggravation (and potential loss of valuable business data) that comes with discovering that your web site has been hacked into, below are 10 essential and effective security measures that will help to prevent your WordPress site from being brute force attacked.

Useful Information

Note: A few of the measures below need some technical understanding of how to modify core WordPress and 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 help.

***

Security Measure #1 – Get In Touch With Your Hosting Provider

Contact your hosting service provider and ask them what security precautions are in place to help prevent your site from botnet attacks, and what they do to make sure that your files and data get backed up.

Check that your hosting service regularly backs up your server files and that, if disaster strikes, you can easily get your files and data back.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Or Blog Regularly Maintained

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

A complete WordPress maintenance routine ensures that:

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

A full WP maintenance routine looks like this …

Maintaining your WordPress site completely backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress site backed up and up-to-date is vitally important for WordPress security. Screenshot image: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WP website or blog regularly backed up and up-to-date is. WP maintenance is not hard 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 site maintenance yourself, get someone else to do it but make sure this 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 site manually, there are a number of free and paid plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Backup, Copy & Protect Your WordPress Site With Backup Creator WordPress Plugin

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

The mass brute-force botnet attack on WordPress is mostly attempting to compromise site admin panels and gain access to the site by exploiting installations that used “admin” as the user name.

For website security reasons, avoid installing a WordPress site with the username admin. This is the first area hackers will test. If your site’s user name is “admin”, change this immediately.

For a simple tutorial created especially for non-technical WordPress users on how to change your WordPress username, go here: How To Change Your WordPress User Name From Admin To Another User Name

Security Measure #4 – Choose Strong Passwords

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

Unless you put some measure in 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 keep attacking your site until it eventually works out the combination.

Passwords that are easy to guess, therefore, make very easy targets for hacking attacks. Make sure that you change your password to a string containing at least eight or nine characters long, and that includes upper and lowercase letters, combined with a few “special” characters (e.g. ^, #, *, etc).

Tip

If you have trouble coming up with strong passwords or are reluctant to set up different passwords for all of your online logins, then use a password management software tool like Roboform …

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

For a simple tutorial for WordPress admin users on how to change your login password, go here: What To Do If You Need To Reset WordPress Passwords

Security Measure #5 – Secure Your wp-config.php File

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.

WordPress WP Config file

(WP Config file)

If a hacker breaks into your WordPress website, they will try to access your wp-config.php file, because this file contains your WordPress 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.

To protect your WordPress site from attacks 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 – Delete Or Rename Unnecessary Installation Files

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

These files are completely unnecessary after installation and can be deleted. If you don’t want to delete these files, then just rename them.

Security Measure #7 – Update Your WordPress CMS, Plugins & Themes

Hackers are always on the lookout for vulnerabilities they can exploit in earlier WordPress versions, including out-of-date versions of WP plugins and themes.

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

Security Measure #8 – Disable The Theme Editor

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

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

WP Theme Editor Menu

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

This means that anyone logging into your site’s admin area can view and modify all of your WordPress files, or cause havoc on your site.

To prevent 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 – Protect The Site’s Uploads Folder

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

By default, this folder is visible to online users. All a person needs to do to see the contents in your site’s “uploads” folder is navigate to your directory using their web browser …

(WordPress has an uploads directory where all of your media files are 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 malicious users, this could become a serious threat to the security of your website.

Protecting your directories will prevent unauthorized people 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 unsure about what to do.

Security Measure #10 – Install Security Plugins

Several security plugins for WordPress are available that specifically address most security issues faced by WordPress website owners, such as preventing hackers from accessing vital areas of your site, protecting your files from malicious software, preventing unauthorized file uploads, 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 irreparable damage to your site is SecureScanPro.

SecureScanPro - WP complete security plugin

(SecureScanPro – security plugin 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 consider using is BlogDefender.

Blog Defender WordPress Security Suite

Blog Defender Security Solution For WordPress(Blog Defender WordPress Security Plugin)

Blog Defender is a suite 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 fix these quickly and easily …

Blog Defender Security Product Suite For WordPress BlogsIf 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 platform, but neglecting simple maintenance tasks like keeping your WP software, WordPress plugins and themes up-to-date, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

Regardless of the type 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 website security.

As a final reminder of the importance of keeping your websites protected, below is the advice given by an expert on website security to all WordPress users after 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 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 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 whenever we publish new articles and tutorials on WordPress security and reviews of new security plugins and solutions.

***

"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

***

Originally published as How To Protect Your WordPress Site From A Brute-Force Attack.