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 SecurityWordPress is the world’s most popular CMS making it an easy target for hacker attacks.

In 2013 a large-scale brute force attack struck WordPress installations across virtually every WP hosting server in existence.

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

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 methods hackers use to try and break into WordPress sites. One of these is by trying to guess the site admin’s login username and password. This is done using software programs that can guess hundreds of possible logins in minutes.

If you’re using predictable login details, your website could be an easy target for hackers.

This is called a “brute-force” 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)

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

Botnets are typically used to send out mass spam emails from the infected computers of compromised user accounts.

Below is a screenshot 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 globe since 2009.

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

These were well organized and highly distributed attacks. Over 90,000 IP addresses were identified by several hosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress users admin areas. The mass attack then continued, with over 30,000 WordPress sites being hacked each day.

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

Powering millions of websites and blogs around the world makes WordPress an obvious target for hackers

(Powering millions of websites worldwide makes WordPress an obvious target for hacking)

Does This Mean We Should Stop Using WordPress?

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

We explain what makes WordPress a very secure platform for websites in this article: Are Open Source CMS Platforms Like WordPress Secure?

Info

It’s important to note 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 attacking sites built using other CMS applications like Joomla).

Mike Little, one of the co-founders of WordPress, 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 Prevent Your WordPress Website From Being Brute-Force Attacked – 10 Security Checks

Every web site with a security vulnerability offers some value to hackers. Every website is valuable to hackers. Large, medium and small websites, personal blogs, government sites … even web sites owned by web security and anti-hacking experts can and have been targeted.

If someone can break in and remotely control your website or blog, your website or blog can then be employed to target more highly-valued sites.

Additional undesirable results of being hacked and your site security compromised include being blacklisted by search engines, having stealthy spam links promoting things like viagra, discounted fashion, etc. inserted in your content, malicious redirects to phishing sites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and lots of other nasty things.

The reality is that malicious bots are most likely trying to break into your blog while you are reading this right now. Whether they can get in depends on how challenging you will make things for hackers and botnets to keep persisting until they find a way to get access, or are forced to give up and decide to look for a more vulnerable target.

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

Do you own a WordPress site? If so, visit Hackertarget.com and run your website through their WordPress security scan …

Website Security Check(Hackertarget – Website Security Check Product image: Hackertarget.com)

You will see that the check will display various results and information about your site …

Website Security Scan

(Hackertarget – WordPress security check results. Image source: Hackertarget.com)

It should be obvious after using this tool that if you are able to see all of this information about your site, then so can hackers.

WP Security Scan(Product image source: BlogDefender website)

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 can all be potentially useful information to hackers, as this can inform them about exploitable security weaknesses, especially where site owners haven’t updated their files.

If your site or blog is powered by WordPress and you are not proactive steps to bullet-proof your site, it’s practically guaranteed that, at some point in time, someone will attempt to hack your installation, because these attacks are systematically targeting WordPress sites around the world!

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

To help avoid the heartache that comes with discovering that your website or blog has been hacked into, we have listed below ten essential and effective security checks that will help to protect your WordPress site from being attacked by brute-force hackers.

Note

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

***

Security Measure #1 – Get In Touch With Your Host

Get in touch with your web host and ask them what security measures they offer to help prevent your site from botnet attacks, and what they do to ensure that your server files and data get regularly backed up.

It is important to make sure that your host regularly backs up your server files and that, if disaster strikes, you can easily get back your files.

Security Measure #2 – Perform Complete WordPress Backups And Keep Your Website Frequently Maintained

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

A proper WordPress maintenance routine ensures that:

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

A full WordPress site maintenance routine looks like this …

Maintaining your WordPress installation regularly backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress website frequently backed up and up-to-date is vitally important for WordPress security. Image source: WPTrainMe.com)

Again, we cannot stress enough how vitally important it is to maintain your WordPress installation backed up and updated. WordPress site maintenance is not hard or time-consuming, but it must be done to ensure the security of your website or blog. If you don’t want to learn how to do WordPress maintenance yourself, get someone else to do it but make sure it gets done. Backing up your website is the second most important thing you should do after making sure that your heart is still beating!

If you don’t want to perform manual backups, there are many free and paid WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Backup, Copy & Protect Your WP Websites And Blogs With Backup Creator WP Plugin

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

The mass brute force attack on WordPress sites was mostly an attempt to compromise site admin panels and gain access to the site by exploiting WP installations that used “admin” as the user name.

For security reasons, don’t set up WordPress sites with the username admin. This is the first area of potential vulnerability hackers will test. If your site’s user name is “admin”, then make sure you change it immediately.

For a simple step-by-step tutorial created especially for non-technical admin users on how to change your WordPress admin username, go here: How To Change Your WP Username From Admin To A Different Username

Security Measure #4 – Make Sure Your Password Is Strong

A “brute force” attack occurs when a malicious script persistently hits a login or password field with different character strings in an attempt to guess the right combination that will unlock your website.

Unless some measure is put into place to prevent 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 works out the combination.

Passwords that are easy to guess, therefore, become very easy targets for hackers. Make sure that you change your password to something containing at least 8 characters long, and that includes upper and lowercase letters, and “special” characters (%^#$@&*).

Tip

You can use a password program like Roboform to create passwords …

Roboform is a password management tool that lets you easily create very secure passwords(You can use a password tool like Roboform to create strong login passwords)

We have created a simple tutorial that shows you how to change your password here: What To Do If You Need To Change WordPress Passwords

Security Measure #5 – Prevent Your wp-config.php File From Being Found

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 file)

If a hacker breaks into your WordPress site, they will typically 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 them 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 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 – Delete Or Rename Unnecessary WP Installation Files

Rename or delete your install.php, upgrade.php and readme.html files.

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

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

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress comes with a built-in editor that allows administrators to edit theme and plugin files inside the dashboard area.

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

WP Theme Editor Menu

(Accessing the WordPress theme editor using the admin menu)

The WordPress theme editor lets anyone accessing your site see and edit your WP theme files, and cause mayhem on your site.

If you want to prevent unauthorized people from accessing the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Remove Access To Your Site’s Uploads Directory

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

By default, this folder is visible to anyone online. All someone has to do to view all of the contents stored in the “uploads” folder is visit your directory using their web browser …

(WordPress uploads directory)

(WordPress uploads folder)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, someone 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, adding a blank index.php file (this is literally an empty file called “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 – WordPress Security Plugins

There are a number of great security plugins for WordPress available that specifically address most common security issues WordPress site owners face, such as preventing unauthorized users from gaining access to vital information about your site, protecting your website from malicious software, preventing unauthorized file uploads, etc.

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

SecureScanPro - WordPress complete security software solution

(SecureScanPro – WP total security software)

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

Blog Defender Security Product Suite For WordPress

Blog Defender(Blog Defender Security Product Suite For WordPress)

Blog Defender is a suite of WordPress security video tutorials, WordPress plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender scans you web site for security weaknesses …

Blog Defender Security PluginAnd then shows you how to quickly and easily fix these …

Blog Defender WordPress Security SuiteIf you don’t want to invest in a premium 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 platform, but neglecting essential maintenance tasks like ensuring 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 site to attacks 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, you cannot afford to ignore the importance of securing your website or blog.

As one last reminder of the importance of website security, below is the advice given by a security expert to all WordPress users following 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, website security is of the utmost importance if you run a WordPress site. Hopefully, 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.

Also, please subscribe to WPCompendium.org to receive notifications whenever we publish new articles and tutorials on WordPress security and tutorials about WordPress security plugins.

***

"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum

***

Recommended Video Courses For WordPress Users

How To Use cPanelHow To Use cPanel

cPanel is a powerful and simple-to-use web hosting management software application that gives website owners the ability to quickly and easily manage their servers and websites using a simple and intuitive dashboard.

This video course will teach you how to use the main features of cPanel to manage your web hosting.

More info: How To Use cPanel

Recommended Video Courses For WordPress Users

How To Set Up WordPress On LocalhostHow To Set Up WordPress On Localhost

Learn how to install, set up, and locally host a fully functioning WordPress site on your computer.

More info: How To Set Up WordPress On Localhost

Recommended Video Courses For WordPress Users

How To Use Amazon S3How To Use Amazon S3

Learn how to set up and use Amazon S3 to upload, store, manage, and protect your site’s images, large media files, downloadable files, stream videos and more.

More info: How To Use Amazon S3

Recommended Video Courses For WordPress Users

WordPress SecurityWordPress Security

Learn how to keep your WordPress site or blog secure and protected from malware, hackers and brute-force attacks.

More info: WordPress Security

Recommended Video Courses For WordPress Users

How To Use FTPHow To Use FTP

This video course shows you how to use FTP (File Transfer Protocol) to transfer and upload files between your hard drive and your server using a free FTP program called Filezilla.

More info: How To Use FTP

Recommended Video Courses For WordPress Users

How To Back Up & Restore WordPress SitesHow To Back Up & Restore WordPress Sites

Learn how to safely and automatically backup your WordPress files and database and how to easily restore your WordPress site if something were to happen.

More info: How To Back Up & Restore WordPress Sites

Recommended Video Courses For WordPress Users

Using Password ManagersUsing Password Managers

Password Managers provide an easy and secure way to keep track of all your passwords. This video course shows you how to use two FREE powerful password management tools.

More info: Using Password Managers

Author: Martin Aranovitch

Martin Aranovitch is the founder of WPCompendium.org and the author of The Small Business Digital Manager. WPCompendium.org provides hundreds of FREE tutorials that show you how to use WordPress to grow your business online with no coding skills required! Get our FREE "101+ WordPress Tips, Tricks & Hacks For Non-Techies" e-course with loads of useful WordPress tips!

Originally published as How To Protect Your WordPress Site From A Brute-Force Attack.