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 often is targeted by hackers, due to its popularity.

In 2013 a global brute force attack struck WordPress installations across almost every web host in existence.

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

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)

One of the many ways hackers use to try and break into a WordPress site is by trying to guess the site’s administration login username and password. To do this, hackers use scripts and tools that can guess hundreds of possible logins in minutes.

If you’re using easy-to-guess user names and passwords, your site can be easily hacked by a software’s repeated attempts to work out your site’s login details.

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

Botnet – What Is This?

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 software, which can then be controlled remotely as a group, often without the computer owners even being aware that this is happening.

Botnets are often used to send mass spam emails from computers of unsuspecting users.

The screenshot below was taken from an online security monitoring site showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the globe 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 compromising computer networks all around the globe since 2009. Screenshot: SecureList.com)

The ongoing botnet attacks on WordPress sites were highly distributed and well organized. Over 90,000 IP addresses were identified by a number of hosting companies just in the initial attack, when the web was flooded with millions of attempts to force their way into WordPress site administration areas. The worldwide attacks continued after this, with over 30,000 WordPress sites being hacked every day.

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

WordPress is frequently the target of malicious attempts by hackers, due to its popularity

(WordPress is the world’s most popular CMS making it a target for attacks by malicious users)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

To learn why WordPress is a secure platform for websites, read this article: Is WordPress A Secure Website Platform?

Info

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

Mike Little, the co-founder 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)

Preventing Your WordPress Site From Brute Force Attacks – 10 Security Points

Every website with a vulnerability has some potential value to hackers. Regardless of the type of business you run or plan to run online and how small you think your web presence is, website security is something you simply cannot afford to ignore. Large, medium and small business sites, personal blogs, government sites … even websites owned by online security and anti-hacking experts can and have been targeted.

If a malicious user can find a way to gain complete control of your site, your site can then be employed to target more highly-valued sites.

Additional undesirable results of having your site hacked and your site security compromised include being blacklisted by Google, having stealthy spam links promoting things like gambling, porn, etc. inserted into your content, redirecting visitors to phishing sites, drive-by downloads (adding malicious programs on your visitors’ computers), and lots of other nasties.

The truth is that software-driven bots are probably trying to break into your blog as you are reading these very words. Whether they will hack into your site will depend on how challenging you can make things for hackers to keep persisting until they either can work out a way to get access, or are forced to give up and go look for an easier 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 …

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

You will see that the test returns a number of results and details about your site …

Website Security Scan

(Hackertarget – WP security scan results. Source: Hackertarget.com)

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

Hackertarget - WordPress Security Scan(Source: Blog Defender)

The ability 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 on your server can be useful information to hackers, as this can inform them about any potential security weaknesses, especially where site owners haven’t updated their sites.

If your website is powered by WordPress and you are not preventive steps to bullet-proof your site, we can practically guarantee that, at some point, someone will attempt to hack your installation, because these attacks are systematically hitting WordPress installations worldwide!

When a website or blog is hacked, webmasters will find themselves “locked out” of their own site, or notice that their files have been interfered with or even entirely wiped out. Typically, sites will become infected with malicious scripts or viruses without the owner even being aware that this has happened.

To avoid the heartache (and potential loss of valuable business data) of 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 brute force attacked.

Warning

Note: A few of the recommended steps shown below need some technical skills to modify core WordPress or server files. If you have no web editing skills, or don’t want to mess around with file code, then ask your web host or search for a professional WordPress technical provider in our WordPress Services Directory.

***

Security Measure #1 – Contact Your Host

Get in touch with your hosting service provider and ask them what security measures they have put in place to help prevent your site from being attacked, and what is done to make sure that your server files and data get regularly backed up.

Check that your web host backs up your sites and that, if anything goes wrong, you can quickly and easily recover your site.

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

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

A full WordPress maintenance routine ensures that:

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

A complete WP maintenance routine looks like this …

Maintaining your WordPress site fully backed up and updated is vitally important for WordPress security.(Maintaining your WordPress web site backed up and updated is vitally important for WordPress security. Screenshot: WPTrainMe.com)

Again, we cannot stress enough how important it is to maintain your WP installation completely backed up and updated. WordPress 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, pay someone to do it but make sure it 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 back up your data manually, there are a number of plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Back Up, Duplicate And Keep Your WP Sites Protected With Backup Creator Plugin For WP

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

the worldwide brute-force botnet attack on WordPress is mostly attempting to compromise website administrator panels by exploiting WordPress installations that used “admin” as their user name.

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

For a simple step-by-step tutorial that shows you how to change your admin username, go here: Changing Your WordPress Username From Admin To A More Secure User Name

Security Measure #4 – Make Sure Your Password Is Strong

A “brute force” attack occurs when malicious software continually and persistently tries to guess the right combination of characters in a password and username that will give them access to your site.

Unless you put some measure in place to prevent the brute-force attack from happening (see further below for a couple of effective ways to do this), the “bot” will just persist in attacking your site until it eventually “cracks” the code.

Weak passwords, therefore, become very easy targets for brute-force attacks. Make sure that you change your password to something containing at least 8 characters long, with upper and lowercase letters, combined with “special” characters (^%$#&@*).

Practical Tip

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

You can use a password management program like Roboform to help you generate hard-to-crack passwords(Roboform is a password management program you can use to generate strong login passwords)

For a tutorial that shows you how to change your WordPress admin password, go here: Changing Your Password

Security Measure #5 – Deny Access To Your 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.

wp-config.php file

(WP Config file)

If a hacker breaks into your site, they will normally search for your 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 someone 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 accessing 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

Delete or rename 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 – Keep Your WordPress CMS, Plugins & Themes Up-To-Date

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

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

Security Measure #8 – Disable The Theme Editor

WordPress installations come with a built-in editor that lets the administrator edit theme and plugin code from the dashboard.

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

WordPress Theme Editor Menu

(The WordPress theme editor can be accessed via the admin menu)

The WordPress theme editor lets anyone accessing your site’s admin area view and modify your WordPress theme templates, and cause mayhem on your site.

To prevent unauthorized people from accessing 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 Site’s Uploads Folder

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

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

(WordPress uploads directory)

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

If any directories in your website have vulnerabilities that can be exploited by hackers, this can seriously threaten the security of your website.

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

There are several WordPress security plugins available that will address most security issues faced by WordPress site owners, such as preventing unauthorized users from gaining access to vital areas of 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 WordPress security plugin that does a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your website files and damaging your site is SecureScanPro.

SecureScanPro - total security software solution for WordPress

(SecureScanPro – total security software solution for WordPress)

SecureScanPro is easy to install and easy to use, and addresses most of the security areas that WordPress users need to address.

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

Blog Defender Security Suite

Blog Defender(Blog Defender)

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

BlogDefender scans you web site for potential security holes …

Blog Defender Security Solution For WordPress BlogsAnd lets you easily fix these …

Blog Defender Security Plugin For WordPress Web SitesIf 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 secure web platform, but neglecting basic maintenance tasks like making sure that your WP installation, plugins and themes are kept up-to-date, tightening file and data security and taking other necessary precautions can have disastrous consequences.

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

As one last reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users after the large-scale 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, website security is very important 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 consult 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 be notified whenever we publish new information on WordPress security and reviews of WordPress security plugins.

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum

***