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 frequently the target of attacks by hackers, due to its popularity.

In 2013 a worldwide brute-force attack struck WordPress installations across virtually every web host in existence around the world.

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

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

What Are 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 ways hackers try to break into a WordPress site. One of these is by trying to guess the site’s administration login username and password. This can be achieved with software tools and scripts that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re using weak login details, 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.org)

A “Botnet” is a network of private computers that have been compromised and infected with malicious code or software, which are then controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge or awareness.

Botnets are often used to send mass spam emails.

The screenshot below was taken from a site that monitors online security showing the locations of the command centers of a botnet that has been actively infecting computer networks all around the globe since 2009 called “Zeus” …

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

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

These were highly distributed and well organized attacks on WordPress sites. 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 site admin areas. The mass attacks then continued, with over 30,000 WordPress sites and blogs being hacked per day.

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

Being the world's most popular CMS makes WordPress a target for hacker attacks

(WordPress powers millions of websites worldwide, which makes it an obvious target for attempted hacking attacks)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

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

Useful Information

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

Mike Little, one of the co-founders of WordPress, 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 Site From Brute Force Attacks – 10 Security Points

You may think that the information in your website or blog has no value to hackers, but the reality is that to a hacker, all websites are an opportunity to gain some benefit at your expense.

If hackers can find a software vulnerability in your security, that site can then be used as a “bot” in a planned cyberattack against more valued sites.

Additional undesirable consequences of being hacked and your site security compromised include getting blacklisted by search engines, having spammy links advertising things like online meds, porn, etc. in your content and page title and descriptions, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and many other nasties.

The harsh reality is that software-driven bots are very likely trying to hack into your blog at this very moment. Whether they can achieve this depends on how difficult you have made things for hackers to keep persisting until they can discover how to get access, or give up and go look for a more vulnerable target.

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

Does your website run on WordPress? If so visit Hackertarget.com and run your site through their WordPress security scan …

WP Security Check(Hackertarget – WP Security Scan Product image source: Hackertarget.com)

You will see that the test returns various results and details about your WordPress setup …

Hackertarget - WP Security Scan

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

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

Hackertarget - WP Security Scan(Image source: BlogDefender.com)

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 on your server are all potentially useful information to hackers, as this can inform them about exploitable security vulnerabilities, especially where site owners haven’t updated their software versions.

If your website is driven by WordPress and you’re not precautionary steps to bolster the security of your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your site, because these brute-force attacks are systematically targeting WordPress installations worldwide!

When a site is compromised, website owners will find themselves “locked out” of their own site, or notice that their content has been modified or even entirely wiped out. Typically, most sites will be infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache and frustration of having your web site being hacked into, we have listed below ten essential and effective security measures that will help to protect your WordPress site from being brute-force attacked.

Note

Note: A few of the recommended measures below require some technical understanding of how to modify core WordPress and/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 technical provider for assistance.

***

Security Measure #1 – Get In Touch With Your Host

Contact your hosting service provider and ask them what security measures have been put into place to protect your site from being attacked, and what is done to ensure that your server files are regularly being backed up.

Check that your hosting service regularly backs up your sites and that, if anything should happen, you can quickly and easily get your files back.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Site Regularly Up-To-Date

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 maintain a habit of religiously performing a full WordPress site maintenance routine on a frequent basis (e.g. weekly, fortnightly, etc …)

A proper WordPress maintenance routine ensures that:

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

A complete WP site maintenance routine looks like this …

Maintaining your WP website or blog frequently backed up and updated is vitally important for WordPress security.(Maintaining your WP installation frequently backed up and updated is vitally important for WordPress security. Screenshot source: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WordPress site fully backed up and updated is. WP maintenance is not hard or time-consuming, but it must be done to ensure the security of your website or blog. If you do not want to learn how to do WP 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 should do after making sure that you are still breathing!

If you don’t want to back up your data manually, there are many plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Back Up, Clone And Keep Your WordPress Web Sites Protected With Backup Creator Plugin For WordPress

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

the worldwide brute-force attack on WordPress sites was mostly attempting to compromise site administrator panels by exploiting sites using “admin” as the user name.

For security purposes, avoid installing sites with the username admin. This is the first area hackers will test. If your site’s user name is admin, you will should change it immediately.

For a simple tutorial created especially for WordPress admin users on how to change your admin username, go here: Changing Your WP Username From Admin To A Different Username

Security Measure #4 – Make Sure Your Password Is Strong

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 give them entry to your website.

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 continue to attack your site until it eventually breaks into your admin area.

Passwords that are easy to guess, therefore, make really easy targets for hackers. Make sure that you change your password combination to something that contains at least 8 characters long, with both upper and lowercase letters, combined with a few “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 management program like Roboform …

Roboform is a password management program that lets you easily generate different secure passwords(Roboform is a password software that lets you create strong login passwords)

For a simple step-by-step tutorial created especially for non-technical admin users on how to change your login password, go here: Changing Your Login Password

Security Measure #5 – Prevent Access To Your wp-config.php File

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

WordPress WP Config file

(wp-config.php)

If hackers break into your site, they will try to access your wp-config.php file, because this is the file that contains important information about your site’s database, 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 being attacked and even being used as part of a bot net, therefore, you must prevent people accessing 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 – Rename Or Delete Unnecessary Blog Installation Files

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

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

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

Hackers look for vulnerabilities they can exploit in previous versions of WordPress, including outdated versions of WordPress themes and plugins.

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

Security Measure #8 – Disable Your WordPress Theme Editor

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

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

WordPress Theme Editor Menu

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

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

If you want to prevent people from being able to access 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 WordPress Uploads Folder

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

By default, this folder is visible to anyone online. All a person needs to do to view all of the contents stored in the “uploads” folder is navigate to your directory using a web browser …

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

(WordPress has an uploads folder where all of your media files are stored)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers, 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 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 – Install WordPress Security Plugins

There are a number of great security plugins for WordPress available that specifically address many common security issues WordPress website owners face, such as preventing hackers from gaining access to vital information about your site, protecting your site from malicious software, preventing injections of code into files, etc.

Many WordPress plugins address some but not all areas of WordPress security. One WordPress plugin that does a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your website files and damaging your site is SecureScanPro.

SecureScanPro - security software for WordPress

(SecureScanPro – WP total security plugin)

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

Blog Defender Security Plugin

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

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

BlogDefender scans you website for security holes …

Blog Defender WordPress Security SolutionAnd lets you easily fix these …

Blog DefenderIf you don’t want to invest in a premium 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 platform, but neglecting essential maintenance tasks like updating your WordPress software, plugins and WP themes, tightening file and data security and taking other necessary precautions can expose your website to attacks by hackers and bots.

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

As a final reminder, below is the advice given by an expert on web security to all WordPress users after the global 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, website security is very important if you run a WordPress site. Hopefully, the above information 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.

Also, don’t forget to subscribe to WPCompendium.org to be notified when we publish new articles on WordPress security and reviews of new 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

***