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 powers millions of websites around the world, making it an obvious target for hacker attacks.

In April 2013 a large-scale brute force attack hit WordPress installations across almost every host server in existence around the world.

These attacks were caused by botnets (networks of infected computers programmed to attack other computers with security vulnerabilities).

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. This can be achieved using software tools and scripts that can guess hundreds of possible logins in minutes.

If you’re using obvious login details, your site can be an easy target for hacking attempts.

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)

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

Botnets are typically used to blast mass spam emails.

The screenshot below was taken from an internet 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” …

ZeuS is a botnet that 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. Source: SecureList.com)

These were highly distributed and well organized botnet 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 large-scale attacks continued after this, with over 30,000 WordPress sites being hacked per day.

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

WordPress is often the target of malicious attacks by hackers

(WordPress is the world’s most used content management system making it a target for hacking attempts)

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

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

To learn what makes WordPress a very secure platform for websites, read this article: Why WordPress Is A Secure Platform For Websites –

Useful Information

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

Mike Little, one of the co-founders of WordPress with Matt Mullenweg, made the following 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 Website From Brute-Force Attacks – Ten Security Points

Every site with a vulnerability provides an opportunity to hackers. A compromised blog offers hackers with a platform for distributed denial of service attacks, spreading malware and engaging in information theft.

If hackers can exploit a flaw in the setup, the blog can then be employed as a “bot” to attack more valuable web sites.

Additional undesirable results of being hacked and your site security compromised include getting blacklisted by Google, having spammy links advertising things like casinos, cheap offers on brand names, etc. inserted in your content and page title and descriptions, malicious redirects to phishing sites or other websites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The reality is that hackers are very likely scouring for weaknesses and trying to hack into your site while you are reading this page. Whether they can achieve this depends on how difficult you have made things for hackers or botnets to continue persisting until they either discover how to break in, or give up and go look for a more vulnerable target.

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

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

Hackertarget - WordPress Security Scan(Hackertarget – Website Security Scan Image source: Hackertarget.com)

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

WP Security Check

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

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

Hackertarget - Website Security Scan(Product image: BlogDefender website)

Being able to see which version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories on your server can all be valuable information to hackers, as this informs them about exploitable vulnerabilities, especially where site owners haven’t updated their sites.

If your site or blog is powered by WordPress and you are not preventive steps to toughen up your site, then we can practically guarantee that, at some point in time, someone will attempt to hack your installation, because these attacks are systematically hitting WordPress sites all the world!

When a site gets broken into, website owners can find themselves completely “locked out” of their own site, or notice that their files have been vandalized or that everything has been entirely wiped out. Typically, most compromised sites will become infected with malicious software or viruses without the owner even being aware that this has happened.

To help avoid the heartache and aggravation that comes with having your website being hacked into, we have listed below 10 essential and effective security checks that will help to protect your WordPress site from brute-force botnet attacks.

Note

Note: Some of the measures below require some technical understanding of how to modify core WordPress and/or server files. If you have no web coding skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress technical provider for help.

***

Security Measure #1 – Contact Your Host

Contact your hosting service provider and ask them what systems have been put into place to help prevent your site from being attacked, and what they do to ensure that your WordPress sites get regularly backed up.

It is important to check that your webhosting provider is backing up your sites and that, if disaster strikes, you can easily get your site back.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Or Blog Frequently Updated

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

A complete WordPress maintenance routine ensures that:

  • All unnecessary data and files are deleted,
  • All WordPress 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 maintenance routine looks like this …

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

Again, we cannot stress enough how important it is to maintain your WP web site backed up and updated. 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 WP site maintenance yourself, pay a professional to do it but make sure this gets done. Backing up your site is the second most important thing you must do after making sure that you are still breathing!

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

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

The mass brute force attack on WordPress is mostly attempting to compromise site administrator panels and gain access to the site by exploiting WP sites using “admin” as the user name.

For reasons of website security, avoid setting up WordPress sites with the username admin. This is the first area hackers will test. If your site’s user name is “admin”, then change it immediately.

We have created a simple step-by-step tutorial that shows you how to change your login username here: Changing Your WP Admin User Name

Security Measure #4 – Make Sure Your Password Is Hard To Guess

A “brute force” attack occurs when a malicious script continually tries to guess the right combination of username and password characters that will unlock your website.

Unless some measure is put into place to block the brute force attack (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 breaks into your admin area.

Weak passwords, therefore, become really easy targets for bot attacks. Make sure that you change your password to a string that contains at least 8 characters long, and that includes upper and lowercase letters, and add a few “special” characters (%^#$@&*).

Useful Tip

You can use a password management software tool like Roboform to create difficult passwords …

Roboform is a password tool that lets you easily generate strong passwords(Roboform is a password management tool you can use to generate different secure passwords)

We have created a simple tutorial created especially for admin users that shows you how to change your login password here: Changing Login Passwords 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 file

(wp-config.php)

If a hacker breaks into your website, they will normally search for your 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 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, you must 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 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 Site, Plugins And Themes

Hackers look for vulnerabilities in previous versions of WordPress that can be exploited, including outdated versions of plugins and themes.

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

Security Measure #8 – Disable Your Theme Editor

WordPress installations come with a built-in editor that lets you edit plugin and theme files inside the dashboard.

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

WordPress Theme Editor Menu

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

The WordPress theme editor allows anyone accessing your site to view and modify your files, or cause havoc 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 adding code to your wp-config.php file.

Security Measure #9 – Prevent Access To Your WordPress Uploads Folder

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

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

(WordPress uploads directory)

(WordPress uploads directory)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by malicious users, anyone could upload unauthorized file types or compromise the security of 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, 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 consult a professional if you are not sure about what to do.

Security Measure #10 – Use Security Plugins

A number of great security plugins for WordPress are available that specifically address common security issues WordPress website owners face, such as preventing hackers from gaining access to vital areas of your site, protecting your site from malicious scripts, preventing unauthorized file uploads, etc.

Most 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 files and causing damage to your site is SecureScanPro.

SecureScanPro - WP security software

(SecureScanPro – complete security software solution for WordPress)

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

Another plugin you may want to look at using is BlogDefender.

Blog Defender WordPress Security Solution

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

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

BlogDefender scans you WordPress installation for security weaknesses …

Blog DefenderAnd lets you easily fix these …

Blog Defender Security PluginIf you don’t want to invest in a security plugin like SecureScanPro or BlogDefender, you can 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 making sure that your WordPress installation, WP plugins and WordPress themes are kept up-to-date, tightening file and data security and taking other necessary precautions can expose your website to malicious by hackers and bots.

No matter what 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 web security.

As a final reminder of the importance of website security, below is the advice given by an expert on website security to all WordPress users following the large-scale 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, website security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article has shown you what to do to 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 technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to receive notifications whenever we publish new tutorials on WordPress security and reviews of new security plugins.

***

"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group

***