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 SecurityBeing the world’s most used CMS makes WordPress a natural target for hacking.

In April 2013, WordPress installations around the world were subjected to large-scale brute force attacks.

These attacks were caused by botnets (computers 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)

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. This is achieved using software programs that automatically tries to guess hundreds of possible login combinations in minutes.

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

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

A “Botnet” is a network of computers that have been compromised and infected with malicious code, which can then be controlled remotely as a group, typically without the computer owners’ knowledge.

Botnets are typically used to blast out mass spam emails.

Below is a screenshot taken from an online security monitoring site showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the world since 2009 …

ZeuS is a botnet that 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. Screenshot: SecureList.com)

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

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

Being the world's most popular CMS makes WordPress a target for hacking

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

Does This Mean We Should Stop Using WordPress?

No. In fact, there are many great reasons why you should choose WordPress if you are concerned about the security of your online business.

To learn what makes WordPress a very secure web platform, read this article: Why WordPress Is A Secure Platform For Websites –

Important Info

It’s important to note that, in the case of April 2013 mass brute force 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, the co-founder of WordPress with Matt Mullenweg, said this 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 Site From Being Brute Force Attacked – 10 Security Points

Every website with a vulnerability presents an opportunity to hackers. A compromised site provides hackers with a valuable resource to launch DDoS attacks, spread malware and engage in information theft.

If someone can exploit a security flaw, your site can then be employed as a “bot” in a planned cyberattack against other highly-valued sites.

Additional undesirable effects of having your site hacked include getting blacklisted by Google, having stealthy spam links promoting things like online meds, discounted fashion, etc. inserted into your content and page title and descriptions, malicious redirects to phishing sites, drive-by downloads (adding malware on your visitors’ computers), and many other nasty things.

The harsh reality is that brute-force software bots are probably trying to break into your website right now. Whether they will do this successfully or not, depends on how hard you will make it for hackers to continue trying until they can discover how to get in, or are forced to give up and go look for an easier target.

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

If you visit Hackertarget.com and run your website through their WordPress security scan …

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

You will see that the scan will return a number of results and details about your website …

Website Security Check

(WordPress security scan results. Product image: Hackertarget.com)

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

Hackertarget - WP Security Check(Product image source: BlogDefender site)

The ability to see what 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 potentially valuable information to hackers, as these can inform them about potential holes or weaknesses, especially where site owners haven’t updated their software versions.

If your website is driven by WordPress and you are not preventive steps to bolster the security of your site, then we can practically guarantee that, at some point, your site will be hacked, or at least targeted by bots, because these brute-force attacks are systematically targeting WordPress installations all the world!

When a website or blog gets broken into, blog owners will find themselves completely “locked out” of their own site, or notice that their content has been altered or that everything has been entirely wiped out. Often, compromised sites will become infected with malicious scripts or viruses without the owner even being aware that this has occurred.

To help avoid the heartache (and significant financial loss) of having your web site being hacked into, below are ten essential and effective security checks that will help to protect your WordPress site from botnet attacks.

Important Info

Note: A few of the steps below need some technical understanding of how to modify core WordPress and server files. If you are not technical-minded, or don’t want to mess around with file code, then ask your web host or search for a WordPress service provider in our WordPress Services Directory.

***

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

Get in touch with your hosting provider and ask them what security systems have been put in place to help prevent your site from being attacked, and what is done to ensure that your WordPress sites are being regularly backed up.

Check that your host backs 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 Frequently Up-To-Date

Never rely only on your webhosting service for your site backups. Instead, learn how to manage your WordPress site or pay someone to get this done for you and maintain a habit of religiously performing a full site maintenance routine on a frequent basis (e.g. weekly, monthly, etc …)

A proper WordPress maintenance routine ensures that:

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

A complete WP 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 or blog frequently backed up and up-to-date is vitally important for WordPress security. Source: WPTrainMe.com)

Again, we cannot stress enough how vitally important maintaining your WP website 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. If you do not want to learn how to do WordPress maintenance yourself, pay someone to do it but make sure this gets done. Backing up your site is the next 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 free and paid plugins you can use. Learn about a WordPress backup plugin that can automate your site backups here: Back Up, Clone And Protect Your WP Websites And Blogs With Backup Creator WordPress Plugin

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

the worldwide brute-force attack on WordPress sites was mostly attempting to compromise site administrator panels and gain access to the site by exploiting installations with “admin” as the account name.

For reasons of website security, avoid setting up sites with the username “admin”. This is the first area of potential vulnerability hackers will test. If your site’s user name is admin, you will should change it immediately.

We have created a tutorial on how to change your username here: How To Change Your Admin Username In WordPress To Another Username

Security Measure #4 – Avoid Weak Passwords

A “brute force” attack occurs when a malicious script continually and persistently tries to guess the right combination of characters in a password and username that will give the hacker entry to your website.

Unless some measure is put into place to prevent the brute-force attack (see further below for a couple of effective ways to do 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 hackers. Make sure that you change your password to a string that contains at least eight or nine characters long, and that includes upper and lowercase letters, and add a few “special” characters (e.g. ^, #, &, etc).

Tip

You can use a password management program like Roboform to help you generate very secure passwords …

Roboform is a password program that lets you easily generate very secure passwords(Roboform is a password management program you can use to create different passwords)

For a tutorial that shows you how to change your password, go here: Changing Login Passwords In WordPress

Security Measure #5 – Secure 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.php file)

If hackers break into your site, they will search for the wp-config.php file, because this file 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 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 Installation Files

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

These files can be deleted after installation. If you don’t want to delete these files, just rename them.

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

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

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

Security Measure #8 – Disable Your Theme Editor

WordPress installations come with a built-in editor feature that allows the administrator to edit theme and plugin code inside the dashboard.

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

WP Theme Editor Menu

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

The WordPress theme editor lets anyone accessing your blog’s admin view and modify your theme files, and create mayhem on your site.

To prevent unauthorized 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 Site’s Uploads Directory

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

By default, this folder is visible to online users. All a person needs to do to view all of the contents stored in your “uploads” folder is navigate to your directory using their web browser …

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

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

If any files stored in his folder have vulnerabilities that can be exploited by hackers or malicious users, this could 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 file with nothing in it called “index.php”) to your uploads directory, and so on. Again, it’s best to hire a professional if you are not sure about what to do.

Security Measure #10 – Security Plugins

There are some great WordPress security plugins available that will address most common security issues WordPress site owners face, such as preventing unauthorized users from accessing your site, protecting your site from malicious scripts, 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 issues that could lead to hackers accessing your files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - WP total security plugin

(SecureScanPro – WP complete security plugin)

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

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

Blog Defender WordPress Security Solution

Blog Defender WordPress Security Plugin(Blog Defender Security Plugin For WordPress)

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

BlogDefender shows you where potential security weaknesses in your website are …

Blog DefenderAnd lets you fix these quickly and easily …

Blog DefenderIf you don’t want to purchase a 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 simple maintenance tasks like keeping your WordPress installation, plugins and themes updated to their latest versions, tightening file and data security and taking other necessary precautions can expose your site to malicious by hackers and bots.

Regardless of the type 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 sites.

As one last reminder, below is the advice given by an expert on website security to all WordPress users after the large-scale brute-force attacks by botnets 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 very important if you run a WordPress site. Hopefully, this article has shown you what to do 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, don’t forget to subscribe to WPCompendium.org to receive notifications whenever we publish new tutorials on WordPress security and tutorials about WordPress security plugins and solutions.

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com

***