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 SecurityWhen you are the leading content management system in the world and the online publishing platform of choice for millions of websites and loved by thousands of web developers and website designers, it’s inevitable that at some point in time, WordPress will become an obvious target for attacks from hackers wanting to score a “big win”.

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

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

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

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 a WordPress site. One of these is by trying to guess the site’s administration login username and password. This is achieved with software tools that can work through hundreds of login combinations in minutes.

If you’re using obvious usernames and predictable passwords, your website could be an easy target for hackers.

This is called a “brute force” login attack.

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)

A “Botnet” is a network of private computers that have been infected with malicious scripts or software code, which are then controlled remotely as a group, often without the computer owners even being aware that this is happening.

Botnets are typically used to send out mass spam emails.

Below is a screenshot taken from an online security monitoring site showing the locations of the command centers of a botnet that has been actively infecting 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 globe since 2009. Screenshot source: SecureList.com)

These were highly distributed and well organized botnet attacks. Over 90,000 IP addresses were identified by several hosting companies in the initial attack alone, when millions of attempts to force their way into WordPress site admin areas took place. The large-scale brute-force attacks then continued, with over 30,000 WordPress sites and blogs being hacked every day.

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

WordPress is often the target of malicious attacks by hackers, due to its popularity

(WordPress powers millions of sites worldwide, which makes it a frequent target for hacking attacks)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are many good reasons why you should use WordPress if you are concerned at all about the security of your web presence.

We explain what makes WordPress a very secure platform for websites in this article: Why WordPress Is A Secure Platform For Websites –

Important

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

Mike Little, the co-founder of WordPress with Matt Mullenweg, 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)

Preventing Your WordPress Blog From Brute Force Attacks – Ten Security Measures

Every website with a vulnerability provides an opportunity to hackers. A vulnerable web site presents hackers with a platform for launching distributed attacks, spreading malware and to engage in information theft.

If hackers can exploit a way to gain any form of control of your web site, that website or blog can then be employed as a “bot” in a planned cyber attack against larger and more highly-valued web sites.

Additional undesirable impacts of being hacked and your site security compromised include getting blacklisted by search engines, having stealthy spam links promoting things like online meds, discounted fashion, etc. in your content and page title and descriptions, 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 hackers are very likely trying to break into your web site right now. Whether they will do this successfully or not, depends on how challenging you will make things for them to continue trying until they either discover a way to get access, or give up and go look for a less secure target.

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

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

Hackertarget - WordPress Security Scan(Website Security Scan Image source: https://hackertarget.com/wordpress-security-scan)

You will see that the test will display various results and details about your website setup …

Hackertarget - Website Security Scan

(Hackertarget – website security scan results. Image source: Hackertarget.com)

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

Website Security Scan(Screenshot: BlogDefender website)

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 are all useful information to hackers, as this informs them about any potential security weaknesses, especially where the owners haven’t updated their sites.

If your site or blog is driven by WordPress and you are not proactive steps to toughen up your site, then we can practically guarantee that, at some time in the near future, someone will attempt to hack your site, because these attacks are systematically targeting WordPress installations worldwide!

When a website is broken into, blog owners can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been vandalized or even that their content has been 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 (and significant financial loss) that comes with having your website or blog being 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 steps below require some technical skills to modify core WordPress and server files. If you are not technical-minded, 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 – Contact Your Webhosting Company

Get in touch with your hosting provider and ask them exactly what security measures have been put into place to help prevent your site from being attacked, and what is done to ensure that your files and data are being backed up.

Make sure that your webhosting provider backs up your server files and that, if anything happens, you can quickly and easily get back your files.

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

You should never rely only on your hosting provider for your site backups. Instead, learn how to maintain your WordPress site or pay someone to get this service done for you and maintain a habit of religiously performing a full site maintenance routine on a frequent basis (e.g. daily, weekly, fortnightly, etc …)

A full WordPress maintenance routine ensures that:

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

A proper WordPress maintenance routine looks like this …

Maintaining your WordPress site backed up and up-to-date is vitally important for WordPress security.(Maintaining your WordPress site completely backed up and up-to-date is vitally important for WordPress security. Image: WPTrainMe.com)

Again, we cannot stress enough how important maintaining your WP site frequently backed up and updated is. WordPress 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 WP site maintenance yourself, pay someone to do it but make sure it gets done. Backing up your website 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 WordPress plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Backup, Duplicate & Protect Your WordPress Websites And Blogs With Backup Creator Plugin For WP

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

the worldwide brute force attack on WordPress is mostly attempting to compromise website administrator panels and gain access to the site by exploiting sites with “admin” as the user name.

For reasons of website security, don’t set up a WordPress site with the username admin. This is the first area hackers will test. If your site’s username is admin, you need to change this immediately.

We have created a step-by-step tutorial created especially for non-technical WP admin users on how to change your admin username here: How To Change Your WP Admin User Name To A More Secure User Name

Security Measure #4 – Choose A Strong Password

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

Unless you put some measure in place to prevent the brute force attack (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 works out the combination.

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

Practical Tip

If you have trouble coming up with strong passwords or you are reluctant to set up different passwords for all of your online logins, then use a password tool like Roboform …

Roboform is a password software you can use to create different strong passwords(You can use a password management software tool like Roboform to help you generate strong passwords)

For a simple tutorial on how to change your password, go here: How To Change WordPress Passwords

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.php file

(wp-config.php)

If a hacker breaks into your website, they will typically look for 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 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 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 Website Installation Files

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

These files are not required after installation. If you don’t want to remove these files, just rename them.

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

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

Make sure to keep your software files, plugins, themes, etc. up-to-date.

Security Measure #8 – Disable Your Theme Editor

WordPress comes with a built-in editor feature that allows you to edit plugin and theme files from the dashboard.

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

WordPress Theme Editor Menu

(Accessing the WordPress theme editor using the WP dashboard menu)

The WordPress theme editor allows anyone accessing your site to view and change your WordPress theme files, or create havoc on your site.

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

Security Measure #9 – Protect The WordPress Uploads Directory

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

Normally, this folder is visible to online users. All someone has to do to see the contents in your “uploads” directory is visit the directory using a web browser …

(WordPress uploads folder)

(WordPress uploads folder)

If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, someone could upload unauthorized file types or compromise the security of your website.

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, adding a blank index.php file (this is literally a blank file named “index.php”) to your uploads directory, and so on. Again, it’s best to seek professional help if you are not sure about what to do.

Security Measure #10 – Install Security Plugins

Several security plugins for WordPress are available that specifically address most security issues faced by WordPress website owners, such as preventing hackers from accessing your site, protecting your website from malicious exploits, preventing unauthorized file uploads, etc.

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

SecureScanPro - WP total security software

(SecureScanPro – security software solution 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 great security plugin you may want to consider using is BlogDefender.

Blog Defender

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 WordPress installation for potential security vulnerabilities …

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

Blog Defender Security Solution For WordPress SitesIf 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 very secure web platform, but neglecting basic maintenance tasks like keeping your WordPress installation, WP plugins and themes up-to-date, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

Regardless of the kind 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 securing your web sites.

As a final reminder of the importance of keeping your websites protected, below is the advice given by a website security expert to all WordPress users following the large-scale 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 provided you with the initial steps you need to take 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 professional WordPress service provider in our WordPress Services Directory.

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

***

"Wow! I never knew there's so much to learn about WordPress! I bought one of the WordPress for Dummies three years ago, such authors need to be on this course!" - Rich Law, Create A Blog Now

***