• I manage around 60 WordPress sites, I am not new to WordPress and have been using it extensively for 3 years. I take security very seriously and have read extensive articles on the topic (and my sincere thanks to those that put them on the web, both here and in other places). I have had 2 notable hacking examples that were successful, both were defacements. I see around 100 attempts per day across all sites using brute force with the admin user name which I don’t use for that reason. While investigating the “What” they were doing, it occurred to me “how”.

    With this many sites there is a strong correlation between sites that have been recently active and the frequency of attempts to get into them. So if I or someone else updates site x, then I can predict within a few hours someone from somewhere is trying to get in to site x. So, while these attempts may appear to be random it seems that they know that a site has been updated. My question to those with greater experience and knowledge than I is how do they know? (I remove the pingomatic on most sites,) so is there another mechanism the hacker community is plugged into. If I knew what it was I would try to suppress it.

    Secondly, the “What”: From the most recent attempts I noted the following behaviour in terms of what they were doing. It seems to happen from outside of the WordPress installation. The login name is changed to admin (for everyone) and the password hash is overwritten in the database. This appears to be an automated mechanism as it overwrites all users in the MySql database, not just one. If you happen to be on the site at the time you are immediately bounced off. That is how I detected it. The reset mechanism seems to repeat over a fixed interval, so you can reset it back, change the passwords etc, but around 10 minutes later it has changed again. I assume that if the attack starts on the database, and it is possibly to force all users to the username “admin”, change the hash, then it is relatively simple to guess a password or enter a password to get in.

    Now those people who have studied this will know this is most likely to occur by having a file or code added into an existing file in the wordpress installation. The hacker executes it by going directly to it. I have seen this too a while back following a MailPoet vulnerability.

    In my case I run these; WordFence with rich reporting, Simple Firewall, and Sucuri Auditing tool. Not all are as effective as they may seem, the best guide to what is going on on your site is the Sucuri auditing tool. This tool alerted me to hacking activity on the site. Between these three, one of them scans the file structure in the installation looking for and reporting changed files. So a rogue file is unlikely. I have also taken apart an installation before and compared it with a completely clean build and they still could reset the password and user name. (Perhaps through the hosting?)

    The best solution I found was to move wp-config.php out of the Public_html or www directory and place it in the root of your hosting. This has made a difference. If something is in your hosting then it can access wp-config.php if it is in the website file structure. It contains the password and username for the MySql database. That was how they were doing it. WordPress will continue to function with wp-config.php in this location.

    If anyone else has some insights here I would love to hear them.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Have you seen this article http://codex.wordpress.org/Hardening_WordPress

    Are you actually hacked?

    Thread Starter Wingers574

    (@wingers574)

    Thanks Andrew, yes I have seen that article. I have not been hacked recently, my thread is about the correlation between updating something and then finding dozens of hackers trying to get into the most recently updated sites. They must be finding out somehow, it is too much of a co-incidence.

    I find the BulletProofSecurity plugin is very helpful in preventing site hacking (I had all my sites hacked 3 years ago) for 2 main reasons:

    • it warns if any of your files have open access permissions
    • it takes a backup of your files and will quarantine/restore anything that has been changed unexpectedly

    It also blocks and logs hacking attempts as well as failed logins, and the logs can be very enlightening, showing you just how many attempts there are from bots to break into your site.

    Thread Starter Wingers574

    (@wingers574)

    Many thanks for this Poddys, I will take a look. Are there any forums around that discuss methods and how to combat them? Today in particular I have now had around 300 attempts to log into around 5 sites using Brute Force just in the past 4 hours. I get reports back from all of the sites when someone is trying to do something. So yes I agree these plugins open up a world that you do not normally see.

    I find the BulletProofSecurity plugin is very helpful…

    If there is anything anywhere any better, I would be amazed!

    Please do check it out: https://wordpress.org/plugins/bulletproof-security/

    I have been using that at several sites for over two years now, and I have yet to ever have *any* kind of hack happen anywhere…and then just yesterday I began using BPS Pro at one site to go beyond .htaccess and secure all PHP activity.

    Thread Starter Wingers574

    (@wingers574)

    Thank you for your replies. The situation is not really resolved as it keeps happening. I was hoping to get some insight into the communications from WordPress when it installs. Something is triggering these attacks. That was what I was trying to find out.

    The symptoms and behaviour suggests that it is happening within the hosting, even on a clean installation. It may be a hosting related vulnerability.

    @leejosepho

    I agree that BulletProof Security is an excellent security plugin with a highly committed and responsive developer team.

    If there is anything anywhere any better, I would be amazed!

    Take a look at the features of the Ninja Firewall. Their benchmarking tests also make for interesting reading:

    WordPress brute-force attack detection plugins comparison

    WordPress brute-force attack protection in a production environment

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Hacker activity, how and what?’ is closed to new replies.