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 SecurityWhen you are the most popular 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 web designers, it’s inevitable that at some point in time, WordPress will come under attack by hackers.

In April 2013, WordPress installations around the world were subjected to a worldwide brute force attack.

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

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 a WordPress site. One of these is by trying to guess the site’s administration login username and password. To attempt this, hackers use software programs and scripts that automatically tries to guess hundreds of login permutations in minutes.

If you’re using weak user names and predictable passwords, your website could be an easy target for hackers.

This is called a “brute-force” login attack.

Botnets – What Are They?

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 compromised and infected with malicious code or scripts, which can then be controlled remotely as a group, typically without the unsuspecting computer owners’ knowledge.

Botnets are often used to send out mass spam emails.

The screenshot below was 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 world since 2009.

(ZeuS is a botnet that has been actively infecting computer networks all around the globe since 2009. Image: SecureList.com)

The ongoing botnet attacks on WordPress sites were well organized and highly distributed. 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 users admin areas. The worldwide brute-force attacks continued after this, with over 30,000 WordPress sites and blogs being hacked per 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, BBC News, PC Magazine, and even on the official website of the US Department of Homeland Security …

Powering millions of websites and blogs worldwide makes WordPress a target for hacker attacks

(WordPress powers millions of websites around the world, which makes it a natural target for hacking)

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

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

We explain why WordPress is a secure web platform in this article: Are Open Source Web Platforms Like WordPress Secure?

Important

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

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

Protecting Your WordPress Website From Being Brute-Force Attacked – Ten Security Checks

Every web site with a security vulnerability offers some value to hackers. A compromised website not only offers wannabe hackers opportunities to improve their skills and claim “bragging rights” among their peers, but it can also be a valuable resource for distributed denial of service (DDoS) attacks, spreading malware and information theft.

If a malicious user can discover a software security flaw, your blog can then be employed as a “bot” in a planned cyber attack against other valued sites.

Additional undesirable impacts of having your site hacked include getting blacklisted by search engines, having spammy links advertising things like viagra, porn, 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 malicious bots are probably trying to hack into your web site right now. Whether they can break in successfully or not, depends on how hard or easy you will make things for hackers to keep persisting until they either can find a way to get access, or are forced to give up and go look for a more vulnerable target.

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

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

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

You will see that the scan returns various results and details about your site …

Hackertarget - Website Security Check

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

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

Hackertarget - WP Security Check(Screenshot source: BlogDefender site)

The ability 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 these can inform them about any exploitable security vulnerabilities, especially in older versions.

If your site or blog runs on WordPress and you’re not preventive steps to bolster the security of your site, it’s practically guaranteed that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically targeting WordPress sites worldwide!

Typically, whenever a website gets compromised, website owners will find themselves “locked out” of their own site, or notice that their files have been modified or that everything has been entirely wiped out. Often, compromised sites will be infected with malicious software or viruses without the owner’s knowledge or awareness.

To avoid the heartache (and potential financial loss) that comes with having your site being hacked into, below are 10 simple, yet essential and effective security checks that will help to protect your WordPress site from being attacked by brute force botnet hacking attempts.

Useful Info

Note: A few of the measures below require some technical skills to modify core WordPress and/or 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 WordPress technical provider in our WordPress Services Directory.

***

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

Contact your webhosting provider and ask them exactly what precautions are in place to protect your site from botnet attacks, and what is done to ensure that your WordPress sites get regularly backed up.

Check that your webhosting company regularly backs up your sites and that, if anything happens, you can quickly and easily recover your files.

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

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

A full WordPress maintenance routine ensures that:

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

A proper WP maintenance routine looks like this …

Maintaining your WP site fully backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP installation fully backed up and up-to-date is vitally important for WordPress security. Screenshot source: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WP website or blog frequently backed up and updated. WordPress site maintenance is not hard to do 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 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 your heart is still beating!

If you don’t want to perform manual backups, there are many free and paid plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Backup, Copy And Keep Your WP Website Protected With Backup Creator WP Plugin

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

the worldwide brute force botnet attack on WordPress sites was mostly an attempt to compromise site admin panels by exploiting WP sites that used “admin” as the user name.

For security purposes, don’t install sites with the username “admin”. This is the first thing hackers will test. If your blog’s username is “admin”, change it immediately.

For a simple step-by-step tutorial on how to change your login username, go here: Changing Your Admin Username In WordPress

Security Measure #4 – Make Sure Your Password Is Secure

A “brute force” attack occurs when malicious software persistently tries to guess the right password and username character string 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 persist in attacking your site until it eventually “cracks” the code.

Weak passwords, therefore, become really easy targets for hackers. Make sure that you change your password combination to a string that is at least eight characters long, and that includes upper and lowercase letters, combined with a few “special” characters (^%$#&@*).

Tip

Roboform is a password software that lets you create secure passwords …

Roboform is a password management software you can use to generate different secure passwords(Roboform is a password tool you can use to help you generate different secure login passwords)

For a step-by-step tutorial on how to change your login password, go here: Changing Your WordPress Password

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

The wp-config.php file contains important information about your WP database and is used to define advanced WordPress options.

WP Config file

(wp-config.php file)

If hackers break into your site, they will normally search for the wp-config.php file, because this file contains your WordPress database details, 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 being attacked and even being used as part of a bot net, therefore, prevent people from being able to easily get 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 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, just rename them.

Security Measure #7 – Keep Your WordPress Installation, Themes & Plugins Up-To-Date

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

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

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress comes with a built-in editor that allows the site administrator to edit theme and plugin files from 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 using the admin menu)

This allows anyone accessing your blog’s admin to view and edit your theme files, or create mayhem on your site.

To prevent 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 – Secure Your Site’s Uploads Folder

The WordPress “uploads” directory stores all the media that gets uploaded to your website.

Normally, this folder is visible to all users online. All a person needs to do to see all of the contents in the “uploads” folder is visit the directory using a web browser …

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

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

If any directories in your website have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this can seriously threaten the security of 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, adding a blank index.php file (this is literally a blank file called “index.php”) to your uploads directory, and so on. Again, it’s best to ask help from someone with experience if you are not sure about what to do.

Security Measure #10 – WordPress Security Plugins

There are a number of great WordPress security plugins available that will address most security issues faced by WordPress site owners, such as preventing hackers from gaining access to vital information about your site, protecting your website from botnets, preventing injections of code into files, 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 issues that could lead to hackers accessing your files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - total security software for WordPress

(SecureScanPro – WP complete security plugin)

SecureScanPro is easy to install and easy to use, and does a great job of addressing 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 WordPress Security Solution

Blog Defender(Blog Defender Security Plugin)

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

BlogDefender shows you where the security holes in your WordPress installation are …

Blog DefenderAnd then shows you how to easily fix these …

Blog Defender Security PluginIf you don’t want to invest in a security plugin like SecureScanPro or BlogDefender, then use various free WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure web platform, but neglecting essential maintenance tasks like ensuring that your WP installation, plugins and themes are kept updated to their latest versions, tightening file and data protection and taking other necessary precautions can expose your site 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 afford to 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 security expert to all WordPress users following the mass brute-force attacks by botnets 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, this information 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 seek help from a WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

Also, remember subscribe to WPCompendium.org to be notified when we publish new articles and tutorials on WordPress security and tutorials about new security plugins and solutions.

***

"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com

***