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 SecurityWhen you are the world’s most popular CMS platform and the preferred online publishing platform used by millions of businesses and loved by thousands of web developers and website designers, it’s inevitable that at some point in time, WordPress will become a target for attacks by hackers wanting to score a “big win”.

In early 2013 a worldwide brute force attack began hitting WordPress installations across virtually every WP host server in existence around the world.

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

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

Brute Force Attacks

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. To do this, hackers use scripts and tools that can work through hundreds of login possibilities in minutes.

If you’re not using strong usernames or unguessable passwords, your website can be an easy target for hacking attempts.

This is called a “brute-force” attack.

What Are Botnets

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 can then be controlled remotely as a group, typically without the computer owners even being aware that this is going on.

Botnets are often used to send out 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 infecting computer networks all around the globe since 2009 …

The Zeus botnet 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 globe since 2009. Image source: SecureList.com)

These were highly distributed and well organized attacks. Over 90,000 IP addresses were identified by several 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 large-scale brute-force attack was widely reported in all of the major webhosting companies, as well as the leading technology media publications, such as TechNews Daily, Forbes, BBC News, PC Magazine, Tech Crunch, and even on the official US Department of Homeland Security website …

WordPress powers millions of websites worldwide, making it a natural target for malicious attacks by hackers

(Powering millions of websites and blogs worldwide makes WordPress an obvious target for attempted 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 use WordPress if you are concerned at all about the security of your online business.

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

Important Info

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

Mike Little, one of the co-founders of WordPress with Matt Mullenweg, 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 Site From Being Brute Force Attacked – Ten Security Points

Every website with a vulnerability offers some value to hackers. If you think that your site is of no interest to hackers, think again. Large, medium and small sites, personal blogs, government sites … even websites owned by online security and anti-hacking experts can and have been targeted.

If someone can hack and gain complete control of your blog, the website can then be employed as a “bot” to attack other valuable web sites.

Additional undesirable impacts of having your site hacked and your site security compromised include getting blacklisted by Google, 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 and other websites, drive-by downloads (adding malware on your visitors’ computers), and many other nasties.

The truth is that hackers are very likely searching for exploits and trying to hack into your web site while you are reading this page at this very moment. Whether they can hack into your site successfully will depend on how hard you have made things for them to continue trying until they either discover a way to get in, or are forced to decide to look for an easier target.

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

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

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

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

Hackertarget - WP Security Scan

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

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

WordPress Security Scan(Screenshot: BlogDefender.com)

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 all be valuable information to hackers, as this informs them about potentially exploitable holes or weaknesses, especially where site owners haven’t updated their sites.

If your website is driven by WordPress and you’re not taking appropriate steps to toughen up your site, then it’s practically guaranteed that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically targeting WordPress sites around the world!

Whenever a website or blog gets broken into, website owners can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been vandalized or that everything has been entirely wiped out. Often, sites will be infected with malicious scripts or viruses without the owner’s knowledge or awareness.

To help avoid the heartache of discovering that your site has been hacked into, below are ten essential and effective security measures that will help to prevent your WordPress site from brute-force botnet attacks.

Important Info

Note: A few of the measures shown below need some technical understanding of how to modify core WordPress or server files. If you have no web skills, or don’t want to mess around with code on your site, then ask your web host or a professional WordPress service provider for assistance.

***

Security Measure #1 – Get In Touch With Your Web Host

Contact your webhosting provider and ask them exactly what security systems have been put into place to protect your site from being attacked, and what they do to ensure that your server files get regularly backed up.

Check that your webhosting provider is backing up your server files and that, if disaster strikes, you can quickly and easily get back your site.

Security Measure #2 – Perform Regular WordPress Backups And Keep Your Website Or Blog Frequently Up-To-Date

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

A proper WordPress maintenance routine ensures that:

  • All unnecessary data and files are removed,
  • All WP 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 website regularly backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress website or blog regularly backed up and updated is vitally important for WordPress security. Image: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WordPress site 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 WordPress site maintenance yourself, pay someone 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 you are still breathing!

If you don’t want to back up your data manually, there are many WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Duplicate And Protect Your WP Site With Backup Creator WP Plugin

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

the worldwide brute force attack on WordPress sites was mostly an attempt to compromise website administrator panels by exploiting WordPress installations using “admin” as their username.

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

For a detailed tutorial that shows you how to change your WordPress admin username, go here: How To Change Your Admin Username In WordPress To A Different User Name

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when malicious software persistently tries to guess the right username and password character string that will give them entry to 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 suggestions for doing this), the “bot” will just continue to attack your site until it eventually breaks into your admin area.

Weak passwords, therefore, become really easy targets for hacking attacks. Make sure that you change your password combination to a string that contains at least 8 or 9 characters long, with upper and lowercase letters, and “special” characters (e.g. ^, #, *, etc).

Practical Tip

If you have trouble coming up with strong passwords or feel 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 program you can use to create strong passwords(You can use a password tool like Roboform to create secure passwords)

We have created a simple tutorial on how to change your password here: Changing A Password In WordPress

Security Measure #5 – Protect Your WP Config File

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

WP Config file

(wp-config.php)

If hackers break into your WordPress website, they will typically try to access your wp-config.php file, because this is the file that contains your WordPress database details, security keys, etc. Getting access to this information would allow them 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 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 Site Installation Files

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

These files can be deleted after installation. If you don’t want to remove these files, then just rename them.

Security Measure #7 – Keep Your WordPress Software, Themes & Plugins Up-To-Date

Hackers look for vulnerabilities in previous versions of WordPress that they can exploit, including out-of-date versions of WP plugins and themes.

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

Security Measure #8 – Disable The WordPress Theme Editor

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

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

WP Theme Editor Menu

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

The WordPress theme editor feature allows anyone accessing your site to see and modify your theme templates, or cause mayhem on your site.

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

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

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

(WordPress uploads directory)

(WordPress uploads directory)

If any directories in your website have vulnerabilities that can be exploited by hackers or malicious users, this can become a serious threat to the security of your site.

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 ask help from someone with experience if you are not sure about what to do.

Security Measure #10 – Use Security Plugins

There are some great security plugins for WordPress available that will address common security issues WordPress site owners face, such as preventing hackers from accessing your site, protecting your files from brute-force attacks, preventing unauthorized file uploads, etc.

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

(SecureScanPro – security software solution for WordPress)

SecureScanPro is easy to install and easy to use, and addresses most of the security issues that WordPress users need to address.

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

Blog Defender WordPress Security Solution

Blog Defender Security Product Suite(Blog Defender Security Plugin For WordPress Blogs)

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

BlogDefender shows you where the security weaknesses in your WordPress installation are …

Blog Defender Security Suite For WordPressAnd lets you quickly fix these …

Blog Defender Security PluginIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, you can use various free 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 keeping your WordPress software, WP plugins and WordPress themes up-to-date, tightening file and data security 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 website security, below is the advice given by a web security expert to all WordPress users after the global brute force attacks 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 very important if you run a WordPress site. Hopefully, the information in this article will help keep your WordPress site protected from brute force attacks. If you need any further help or assistance with WordPress security, please seek help from a WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified via email when we publish new articles on WordPress security and reviews of new WordPress security plugins.

***

"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya

***