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

In early 2013 a worldwide brute-force attack began hitting WordPress installations on almost every web host in existence around the world.

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

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

About 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 done using scripts and software that automatically tries to guess hundreds of login possibilities in minutes.

If you’re using weak usernames and predictable passwords, your website can be an easy target for hacking attempts.

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.org)

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

Botnets are typically used to send out mass spam emails.

Below is a screenshot taken from a site that monitors online security 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” …

The Zeus botnet 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. 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 millions of attempts to force their way into WordPress user admin areas took place. The brute force attacks continued after this, with over 30,000 WordPress blogs being hacked per day.

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

Powering millions of websites and blogs worldwide makes WordPress an obvious target for hackers

(WordPress powers millions of websites around the world, making it an obvious target for hacker attacks)

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 about the security of your website.

We explain why WordPress is a secure web platform in this article: Why WordPress Is A Secure Platform For Websites –

Info

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

Mike Little, the co-founder of WordPress, said this 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)

Preventing Your WordPress Site From Being Brute-Force Attacked – Ten Security Measures

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

If a hacker can access and remotely control your web site, your website can then be used to attack other valued sites.

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

The truth is that brute-force software bots are very likely trying to hack into your blog while you are reading this article right now. Whether they will hack into your site successfully or not, will depend on how hard or easy you have made things for them to keep persisting until they either can find how to break in, or give up and go look for an easier target.

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

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

Hackertarget - WordPress Security Check(Website Security Check Screenshot: https://hackertarget.com/wordpress-security-scan)

You will see that the test will return various results and information about your site setup …

WP Security Scan

(website security check results. Image source: Hackertarget.com)

It should be obvious after using this tool that if you can access all of this information about your WordPress site, hackers can too.

Website Security Scan(Product image source: Blog Defender)

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 in your site can all be potentially valuable information to hackers, as these can inform them about exploitable holes or weaknesses, especially where the owners haven’t updated their files.

If your site or blog runs on WordPress and you’re not taking steps to bolster the security of your site, it’s practically guaranteed that, at some point, someone will attempt to hack your site, because these attacks are systematically hitting WordPress sites around the world!

When a website gets hacked, website owners will find themselves “locked out” of their own site, or notice that their files have been modified or even that their content has been entirely wiped out. Often, compromised sites will be infected with malicious scripts or viruses without the owner even being aware that this has taken place.

To avoid the heartache of discovering that your website or blog has been hacked into, we have listed below 10 simple, yet essential and effective security measures that will help to prevent your WordPress site from being attacked by brute-force botnet hacking attempts.

Note

Note: Some of the recommended measures below need some technical skills to modify core WordPress and server files. If you lack these technical skills, or don’t want to mess around with code on your site, then ask your web host or search for a professional WordPress service provider in our WordPress Services Directory.

***

Security Measure #1 – Get In Touch With Your Hosting Service

Contact your hosting service provider and ask them what systems have been put in place to help prevent your site from brute force attacks, and what is done to ensure that your WordPress sites get regularly backed up.

Make sure that your host is regularly backing up your server files and that, if disaster strikes, you can quickly and easily get your files and data back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Regularly Maintained

Never rely on your web host for site backups. Instead, learn how to maintain and manage your WordPress site or get this service done for you and develop a habit of performing a full site maintenance routine frequently (e.g. weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

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

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

Again, we cannot stress enough how important maintaining your WP installation backed up and up-to-date 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 WP site maintenance yourself, get someone else 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 perform manual backups, there are many plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Backup, Copy And Protect Your WP Web Sites With Backup Creator Plugin For WordPress

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

The mass brute force botnet attack on WordPress is mostly attempting to compromise website administrator panels and gain access to the site by exploiting sites that used “admin” as their username.

For security reasons, don’t install a WordPress site with the username admin. This is the first area of potential vulnerability hackers will test. If your site’s username is “admin”, then change it immediately.

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

Security Measure #4 – Choose Strong Passwords

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

Unless you put some measure in place to prevent the brute-force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just persist in attacking your site until it eventually works out the combination.

Passwords that are easy to guess, therefore, become very easy targets for bot attacks. Make sure that you change your password combination to a string that is at least eight or nine characters long, and that includes upper and lowercase letters, and “special” characters (%^#$@&*).

Tip

You can use a password software tool like Roboform to create secure login passwords …

Roboform is a password tool you can use to help you generate strong login passwords(You can use a password software tool like Roboform to help you generate unguessable passwords)

For a simple step-by-step tutorial created especially for non-technical admin users that shows you how to change your login password, go here: How To Change Your Password In WordPress

Security Measure #5 – Prevent Access To The wp-config.php 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.

WordPress WP Config file

(WordPress WP Config file)

If hackers break into your site, they will typically try to access the wp-config.php file, because this is the file that contains your WordPress database information, 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 people getting to 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 Website Installation Files

Rename or delete 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, Plugins & Themes

Hackers are always on the lookout for vulnerabilities in earlier versions of WordPress that they can exploit, including outdated versions of WordPress plugins and themes.

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

Security Measure #8 – Disable The Theme Editor

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

You can access your WordPress Theme Editor by selecting Appearance > Editor in your dashboard menu …

WP Theme Editor Menu

(Accessing the WordPress theme editor using the dashboard menu)

This allows anyone accessing your blog to see and modify your WP 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 – Protect Your Site’s Uploads Directory

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

Normally, this folder is visible to all users online. All someone has to do to see all of the contents stored in the “uploads” folder is visit the directory using their browser …

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

(WordPress uploads folder)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers, someone could upload unauthorized file types to 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, 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 get professional help if you are not sure about what to do.

Security Measure #10 – Security Plugins

There are some great security plugins for WordPress available that specifically address many common security issues WordPress site owners face, such as preventing unauthorized users from accessing vital areas of your site, protecting your site from malicious scripts, preventing injections of code into files, 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 potential issues that could lead to hackers accessing your files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WordPress security plugin

(SecureScanPro – total security software for WordPress)

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

Blog Defender

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

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

BlogDefender scans you WordPress installation for security holes …

Blog DefenderAnd then shows you how to quickly and easily fix these …

Blog Defender WordPress Security PluginIf you don’t want to purchase 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 very secure web platform, but neglecting essential maintenance tasks like updating your WordPress installation, WP plugins and themes, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

No matter what type of business you run or plan to run online and how small you think your web presence is, securing your web sites is something you cannot afford to ignore.

As a final reminder, below is the advice given by a web 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article has provided you with the initial guidelines and help you need to 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 technical provider in our WordPress Services Directory.

We also recommend subscribing to WPCompendium.org to be notified when we publish new information on WordPress security and tutorials about WordPress security plugins and solutions.

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org

***