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 SecurityWhen you are the world’s leading CMS platform and the online publishing platform of choice for millions of websites and loved by thousands of web developers and web designers, it’s inevitable that at some point in time, WordPress will come under attack by hackers wanting to score a “big win”.

In early 2013, WordPress installations around the world were subjected to a worldwide brute-force attack.

These attacks were caused by botnets (computers infected with viruses and programmed to attack other sites with security vulnerabilities).

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)

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. This is done with software programs that can guess hundreds of possible login combinations in minutes.

If you’re using weak user names and predictable passwords, your website can be easily hacked by persistent attempts to guess your site’s login details.

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)

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

Botnets are regularly used to blast mass spam emails.

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 world 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 infecting computer networks all around the globe since 2009. Image source: SecureList.com)

These ongoing botnet attacks on WordPress are highly distributed and well organized. Over 90,000 IP addresses were identified by several hosting companies just in the initial attack, when millions of attempts to force their way into WordPress site administration areas occurred. The attacks then continued, with over 30,000 WordPress sites being hacked per day.

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

Being the world's most used content management system makes WordPress an obvious target for hacking

(WordPress often is targeted by hackers, due to its global popularity)

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

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

To understand what makes WordPress a very secure web platform, see this article: WordPress Security What Every Business Owner Needs To Know About WordPress Security

Useful Info

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

Mike Little, one of the co-founders of WordPress, made this comment about the botnet 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 Prevent Your WordPress Site From Being Brute Force Attacked – 10 Security Points

Every website with a security vulnerability offers some value to hackers. No matter what type of business you run or plan to run online and how small you think your web presence is, securing your sites is something you simply cannot afford to ignore. Large, medium and small business web sites, personal blogs, government sites … even websites owned by web security experts can and have been targeted.

If someone can access and gain any form of control of your web site, that site can then be used to attack other valued sites.

Additional undesirable effects of having your site hacked and your site security compromised include being blacklisted by search engines, having spammy links promoting things like casinos, porn, etc. inserted in your content and page title and descriptions, malicious redirects to phishing sites or other websites, drive-by downloads (adding malicious programs on your visitors’ computers), and many other nasty things.

The reality is that malicious bots are trying to break into your blog at this very moment. Whether they can be successful or not, will depend on how hard you have made it for hackers or botnets to continue persisting until they can find a way to get access, or are forced to give up and go look for a more vulnerable target.

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

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

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

You will see that the scan returns various results and information about your site setup …

Hackertarget - Website Security Check

(Hackertarget – website 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 site, then so can hackers.

Hackertarget - WP Security Check(Image source: BlogDefender website)

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

If your website is powered by WordPress and you’re not preventive steps to harden 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 attacks are systematically hitting WordPress installations around the world!

Typically, when a website is broken into, webmasters can find themselves “locked out” of their own site, or notice that their files have been altered or even entirely wiped out. Typically, most compromised sites will be infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache and aggravation that comes with discovering that your website has been hacked into, we have listed below 10 essential and effective security checks that will help to prevent your WordPress site from botnet attacks.

Note

Note: A few of the measures below require some technical skills to modify core WordPress and server files. If you have no technical 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 – Contact Your Host

Get in touch with your hosting service provider and ask them what measures they have put in place to protect your site from brute-force attacks, and what they are doing to ensure that your server files and data get backed up.

Check that your hosting provider backs up your sites and that, if disaster strikes, you can quickly and easily get your site back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Site Frequently Updated

Never rely just on your hosting provider for your site backups. Instead, learn how to manage your WordPress site or pay someone to get this done for you and maintain a habit of performing a full site maintenance routine on a frequent basis (e.g. weekly, monthly, etc …)

A proper WordPress maintenance routine ensures that:

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

A complete WP site maintenance routine looks like this …

Maintaining your WP website or blog completely backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress web site fully backed up and up-to-date is vitally important for WordPress security. Screenshot: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WP web site completely backed up and updated is. 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 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 should do after making sure that you still have a pulse!

If you don’t want to perform manual backups, there are a number of free and paid plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Copy & Keep Your WP Site Protected With Backup Creator Plugin For WordPress

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

The brute-force botnet attack on WordPress is mostly an attempt to compromise site administrator panels by exploiting WP installations that used “admin” as the account name.

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

For a step-by-step tutorial that shows you how to change your username, go here: How To Change Your WP User Name From Admin To A More Secure User Name

Security Measure #4 – Choose Strong Passwords

A “brute force” attack occurs when malicious software continually and persistently tries to guess the right username and password character string that will give them access to your website.

Unless you put some measure in place to block 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 “cracks” the code.

Weak passwords, therefore, become very easy targets for bot attacks. Make sure that you change your password combination to a string containing at least 8 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 your online logins, then use a password software tool like Roboform …

Roboform is a password management software that lets you easily create different secure login passwords(You can use a password management program like Roboform to create hard-to-guess passwords)

For a simple step-by-step tutorial for non-technical admin users that shows you how to change your login password, go here: What To Do If You Need To Reset Your WordPress Password

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 options for WordPress.

wp-config.php file

(wp-config.php)

If a hacker breaks into your WordPress website, they will normally search for the wp-config.php file, because this file contains important information about your site’s database, security keys, etc. Getting access to this information would allow someone 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 people from being able to easily view your wp-config.php file. 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.

You can remove these files after installation. If you don’t want to delete these files, then just rename them.

Security Measure #7 – Upgrade Your WordPress Site, Themes And Plugins To Their Latest Version

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

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

Security Measure #8 – Disable The WordPress Theme Editor

WordPress installations come with a built-in editor that lets administrators edit plugin and theme code from the dashboard.

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

WordPress Theme Editor Menu

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

The WordPress theme editor feature allows anyone accessing your blog’s admin area to view and modify your WP theme templates, and cause mayhem on your site.

To prevent people from accessing 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 WordPress Uploads Folder

The WordPress “uploads” folder contains all the media files that get uploaded to your site.

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

(WordPress has an uploads directory where your media files are stored)

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

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

Security Measure #10 – Security Plugins

A number of great WordPress security plugins are available that specifically address most common security issues faced by WordPress site owners, such as preventing hackers from accessing your site, protecting your files from botnets, preventing injections of code into files, etc.

Many 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 issues that could lead to hackers accessing your files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WP total security plugin

(SecureScanPro – WordPress total security plugin)

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 plugin you may want to look at using is BlogDefender.

Blog Defender

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

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

BlogDefender scans you WordPress installation for security vulnerabilities …

Blog Defender WordPress Security SolutionAnd then shows you how to fix these quickly …

Blog Defender Security SolutionIf 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 secure web platform, but neglecting basic maintenance tasks like updating your WordPress installation, plugins and WP themes, 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, you cannot afford to ignore the importance of securing your sites.

As a final reminder, below is the advice given by an expert on web security to all WordPress users after the mass 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 of the utmost importance if you run a WordPress site. Hopefully, this article has provided you with the initial guidelines and direction you need to prevent brute force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please consult a 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 articles on WordPress security and tutorials about new WordPress 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)

***