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 SecurityPowering millions of websites and blogs around the world makes WordPress an easy target for hacker attacks.

In 2013 a worldwide brute force attack hit WordPress installations on almost every WP host server in existence around the world.

These attacks were caused by computer networks infected with viruses and programmed to attack other sites (called “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)

There are many ways hackers try to break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. This can be achieved using software programs that can guess hundreds of possible logins in minutes.

If you’re using weak user names and passwords, your site can be easily hacked by persistent attempts to guess 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 compromised and infected with malicious code or software, which are then controlled remotely as a group, often without the computer owners’ knowledge or awareness.

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

The screenshot below was taken from an online security monitoring site 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.

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

These were well organized and highly distributed 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 user admin areas took place. The large-scale brute force attacks continued after this, with over 30,000 WordPress sites being hacked every day.

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

Powering millions of sites worldwide makes WordPress a target for hackers

(Powering millions of sites worldwide makes WordPress an obvious target for hacker attacks)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are many good reasons why you should choose WordPress if you are concerned at all about website security.

To understand what makes WordPress a very secure web platform, read this article: Can You Build A Secure Business Online Using WordPress?

Useful Info

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

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

Preventing Your WordPress Blog From Brute Force Attacks – Ten Security Measures

You may think that the information in your site provides little to no value to hackers, but the reality is that every website is valuable to a malicious user.

If hackers can find a way to break in and gain control of your blog, that web site can then be used to target larger and more valuable websites.

Additional undesirable impacts of having your website hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links promoting things like gambling, discounted fashion, 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 very likely trying to hack into your site at this very moment. Whether they will get into your site depends on how hard you have made it for hackers to keep trying until they can either find a way to break in, or are forced to decide to look for an easier target.

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

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

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

You will see that the check returns various results and details about your site setup …

Hackertarget - WP Security Check

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

It should be obvious after using the tool shown above that if you can access all of this information about your blog, so can hackers.

Hackertarget - WordPress Security Scan(Product image: Blog Defender)

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

If your website is powered by WordPress and you’re not preventive steps to bullet-proof your site, then it’s practically guaranteed that, at some point, someone will attempt to hack your installation, because these brute force attacks are systematically targeting WordPress installations around the world!

Typically, whenever a website or blog gets hacked, site owners will find themselves completely “locked out” of their own site, or notice that their files have been interfered with or even that their content has been completely wiped out. Often, compromised sites will be infected with malicious software or viruses without the owner even being aware that a security breach has happened.

To avoid the heartache (and significant loss of valuable business data) that comes with having your site being hacked into, below are ten simple, yet essential and effective security measures that will help to protect your WordPress site from being attacked by brute force botnet hacking attempts.

Disclaimer

Note: A few of the measures below require 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 search for a professional WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Webhosting Provider

Contact your hosting service provider and ask them exactly what measures have been put in place to help prevent your site from brute-force attacks, and what they do to ensure that your WordPress sites get regularly backed up.

Make sure that your hosting provider backs up your sites and that, if anything happens, you can easily get back your site.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Regularly Updated

You should never rely only on your host 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 WordPress site maintenance routine frequently (e.g. daily, weekly, fortnightly, etc …)

A proper WordPress maintenance routine ensures that:

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

A proper WP site maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP website or blog fully backed up and updated. WordPress maintenance is not hard to do 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 WordPress maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website is the next most important thing you must do after making sure that your heart is still beating!

If you don’t want to back up your data manually, there are a number of free and paid plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Back Up, Copy & Protect Your WP Web Site With Backup Creator Plugin For WordPress

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

The large scale brute force botnet attack on WordPress is mostly attempting to compromise website administrator panels by exploiting installations with “admin” as the user name.

For reasons of website security, don’t set up a WordPress site with the username “admin”. This is the first thing hackers will test. If your blog’s username is admin, you should change this immediately.

For a simple step-by-step tutorial on how to change your username, go here: How To Change Your WordPress Admin User Name To A More Secure Username

Security Measure #4 – Make Sure Your Password Is Strong

A “brute force” attack occurs when a malicious script continually hits a username and password field with different character strings in an attempt to guess the right combination that will give the hacker entry to your site.

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

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

Practical 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 software tool like Roboform …

You can use a password software tool like Roboform to create hard-to-guess passwords(You can use a password software tool like Roboform to generate hard-to-guess passwords)

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

Security Measure #5 – Protect Your WP Config File

The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced WordPress options.

wp-config.php file

(wp-config.php)

If a hacker breaks into your site, they will normally look for the wp-config.php file, because this is the file that 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 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 – Delete Or Rename Unnecessary Installation Files

Delete or rename 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, just rename them.

Security Measure #7 – Update Your WordPress Blog, Plugins And Themes To Their Latest Version

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

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

Security Measure #8 – Disable The Theme Editor

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

You can access the WordPress Theme Editor by selecting Appearance > Editor from the main menu …

WordPress Theme Editor Menu

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

The WordPress theme editor feature allows anyone accessing your blog’s admin to view and change your WordPress theme 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 adding code to your wp-config.php file.

Security Measure #9 – Protect Your Site’s Uploads Directory

The WordPress “uploads” directory stores all the media files that get uploaded to your blog.

Normally, this folder is visible to all users online. All someone has to do to view the contents stored in your site’s “uploads” folder is navigate to your directory using their web browser …

(WordPress uploads directory)

(WordPress uploads directory)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by malicious users, this can seriously threaten the security of your site.

Protecting your directories will prevent online users 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 an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to ask for assistance from someone with experience if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

Several security plugins for WordPress are available that specifically address common security issues faced by WordPress website owners, such as preventing unauthorized users from accessing your site, protecting your site from brute-force attacks, preventing unauthorized file uploads, etc.

Most WordPress plugins address some but not all areas of WordPress security. One security 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 - WordPress complete security software solution

(SecureScanPro – security software for WordPress)

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

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

Blog Defender

Blog Defender Security Suite For WordPress Websites & Blogs(Blog Defender WordPress Security Product Suite)

Blog Defender is a suite 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 PluginAnd then shows you how to 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 simple maintenance tasks like keeping your WP installation, WordPress plugins and themes up-to-date, tightening file and data security and taking other necessary precautions can expose your site to malicious by hackers and bots.

Regardless of the kind of business you run or plan to run online and how small you think your web presence is, website security is something you cannot ignore.

As a final reminder, below is the advice given by an expert on web security to all WordPress users after the large-scale 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 above article will help 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 service provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to be notified via email when we publish new information on WordPress security and reviews of WordPress security plugins.

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com

***