• Hi guys,

    I am having an issue with one of my sites. It has been hacked 3 times since 31 December 2016 while Wordfence free was active with maximum protection enabled. The first time it was hacked, WordPress and some plugins were not up to date. The subsequent two times, everything was up to date. It seems to have been hacked twice by one hacker and once by a different hacker, the former leaving a signature in the site title, and a few other places, that starts with: +ADw-/title+AD4-HaCKeD By+AF8-uMuT SunaR..+ACEAIQ

    The hacker had access to the database and reset all existing user’s passwords, then used an account with administrator privileges to log in to the WordPress dashboard. I was alerted to the hack by Wordfence’s admin login notification and I believe that the site had been compromised before the hacker logged in, because the hacker signature was in the website title that is included in the admin login notification.

    I know this is free support and I’m using the free product, so don’t expect a speedy response, if at all, but I thought you guys may also benefit by taking a look to see if you can see how this hacker is getting past your firewall? All non-identifiable details I can think of are included below:

    The only installed and active theme was Enfold by Kriesi 3.8.4 (latest version). All other themes have been deleted.

    All plugins were updated to their latest version:
    – 301 Redirects By Tony Spiro
    – Duplicator by LifeInTheGrid
    – Gravity Forms by rocketgenius
    – Wordfence Security by Wordfence
    – Yoast SEO by Team Yoast

    All other plugins had been deleted. I cannot find any published vulnerabilities for any of these.

    The site is hosted on a shared web server. The web server has the following software installed:
    – Linux 2.6.32-642.11.1.el6.centos.plus.i686
    – cPanel 56.0 (build 41)
    – Apache Version 2.4.18
    – PHP Version 5.6.23
    – MySQL Version 5.6.33
    – Perl Version 5.10.1

    I also restricted file privileges as much as I could without breaking the site, however, it does not seem like any files were modified to gain access. I did also check a list of the most recently modified files on the compromised site and found nothing of interest.

    I found two other websites running on the same shared server that were also hacked and had the same hacker signature in the site title. The hosting provider has run their own malware scan on my site, and the other two, and say that the scan comes back clean. I ran the Wordfence malware scan on the site and it came back clean with the exception of a minor difference in the wp-content/plugins/duplicator/readme.txt file which I find strange. I have analysed this file and can’t see anything malicious. Before running the scan I checked all the scan options except:
    – Enable HIGH SENSITIVITY scanning. May give false positives.
    – Use low resource scanning. Reduces server load by lengthening the scan duration.

    I have also created a clean installation of WordPress and all the above-mentioned themes and plugins and compared it to the compromised version of the website using a strong hashing algorithm and there are no unexpected differences in any of the files except the same readme.txt file mentioned above.

    Let me know if there’s any other information you would need from me. I’ll be happy to assist any way I can.

    Regards,
    Gareth

Viewing 9 replies - 1 through 9 (of 9 total)
  • I’m not affiliated with Wordfence – just a longtime user – but from what you describe it would seem that the hackers have previously installed a backdoor on your site – possibly even at the server level – allowing them access regardless of WF or any other security firewall.

    If they already have a “skeleton key” to the site as it were, it doesn’t matter what kind of firewall or scans you run or have in place – they can get in.

    Depending on your technical abilities, you may want to engage WF for professional site clean-up, as finding any backdoors can be difficult and time-consuming if you’re not familiar with the process and what to look for.

    • This reply was modified 7 years, 10 months ago by bluebearmedia.
    Thread Starter garethlawson

    (@garethlawson)

    Thanks for the advice @bluebearmedia.

    I am an experienced PHP developer (since 2003) and have manually compared the files on the compromised server with the files of a clean installation with all the same extensions. No unexpected differences. I have also analysed the apache access logs and there are only entries related to valid WordPress ULRs.

    I am as sure as I can be that there are no file-based backdoors on the hosting account. The only backdoor I think they may have is if they have compromised the entire hosting server. I have requested that the hosting company do an analysis of the entire server, but they are not very cooperative.

    I am waiting for the website owner to decide if they want to get Wordfence involved. Would be happy to hand this over to them, but it’s in the website owner’s hands.

    Thanks again,
    Gareth

    Makes sense – hope you can get it sorted!

    Hi Gareth,
    it’s always hard to guess based on a description but judging by the information you have shared here it does sound like they are gaining access via a vulnerability in the hosting environment rather than the WP install itself. The fact that the host is not cooperative is unfortunately not unusual, but always a red flag to me. One thing you could check for if you haven’t already is to see if there is any reference to wp-config in the access logs. Also, did you check the access logs for any requests matching the IP that logged in as admin?

    Thread Starter garethlawson

    (@garethlawson)

    I understand that, and thanks for the response and advice on what to check. I do appreciate it.

    Earlier in December there are two references to wp-config.php in the access logs, but both resulted in a 404 and the IP address is 178.137.83.166 which is owned by Kyivstar GSM a Ukrainian mobile phone operator. Both where an attempt at directory traversal which clearly failed: GET /wp-admin/admin-ajax.php?action=revslider_show_image&img=../wp-config.php HTTP/1.1

    Slider Revolution is not installed on this site and I believe Wordfence blocks this attack anyway as I’ve seen it in the attack reports often on most of the sites I maintain.

    Every time the site was hacked, there are logs related to the relevant IP address. The first time, the relevant IP address visited the home page, then /wp-login.php, then POSTed to /wp-login.php and was authenticated. Once authenticated they accessed /wp-admin/theme-editor.php and POSTed to it, probably to deface the site. There are no other logs related to that IP address.

    The most recent time it was hacked, seemingly by a different hacker (different signature was left on the site) was similar: straight to /wp-login.php, POSTed to it, was authenticated and then went to /wp-admin/options-general.php and POSTed to /wp-admin/options.php modifying the website title. Then went to the home page, no doubt to enjoy his victory ??

    All of this, in my opinion, continues to strengthen the case that the hackers gained direct access to the database via some other channel and not the website. The hosting company says that they have taken all necessary security precautions and won’t offer any further assistance, in spite of my having provided all this information and having found two other websites on the same shared server that have been compromised in the same way. I am consider asking for permission to run a vulnerability scanner on the IP address, but I doubt they’d consent anyway.

    We are trying to convince the website owner to move their site to a different hosting provider who we trust.

    Thanks again for trying to help!

    Hi again!
    It is theoretically possible that they are using another IP to gain access to the contents of wp-config via a vulnerability, then access the database, and then log in to WordPress. It sounds more likely though that they are getting in to the database directly. If the database environment is not secure they could for example have hacked one site and via that gained access to other databases than just the one. One potential access point could be phpMyAdmin for example (on your site or any other site on the server). One thing you could try is to see if you can connect to that database from another server. I’m not a super expert on database security but I know that it should not be possible to do that by default. Also, something the host can do is enable general query logging for the MySQL database (and store those logs in a safe location). Then next time you are hacked it would be possible to figure out where it all began.

    No problem, happy to help. Best of luck for now!

    Thread Starter garethlawson

    (@garethlawson)

    Yes, what you’re saying is exactly what I’m thinking. I know that the database connection uses “localhost”, and all the other sites that have databases probably also do, so if they’re able to get elevated access to the database through the server or another website on the server, or if they’re able to get to and read the wp-config.php file via the same, then they’re in.

    Hopefully we can convince the client to either get Wordfence in to investigate and either find the hole or confirm my conclusion, or to move to a different provider.

    If we do move to another provider, I plan to install WordPress, the theme and all plugins from scratch and then import the content and configuration to make sure I don’t transfer a backdoor that I may have missed somehow.

    Cheers,
    Gareth

    • This reply was modified 7 years, 10 months ago by garethlawson.

    I am seeing this type of activity on one of my sites as well. The site has moved hosts 4 different times. Each time the attacker gains access all over again. I have gone as far as removing all but the main administrator and recoding the entire site. The main admin account is not called admin. I started seeing entries in my Word Fence log that showed a certain IP address was blocked. It says:

    This email was sent from your website “</title>Hacked By FOXILITRIX EL<DIV style=”DISPLAY: none”><xmp>” by Wordfence plugin…

    Several hours later the title was reported back normally instead. Wordfence scan is showing no problems. Nobody fixed the title between the times. What is going on here?

    One last note: Foxilitrix El has a series of YouTube videos that show him exploiting WordPress. The videos are not very coherent and whatever he is typing in some of the videos appears to be in Arabic or some other language like that.

    Thread Starter garethlawson

    (@garethlawson)

    Thanks for adding your experience @chowned. Fortunately for me, these attacks stopped shortly after my last post. It seemed to coincide with the release of WordPress 4.7.1, but I am not at all sure, and don’t really believe the change in WordPress version is the thing that did the trick.

    Personally, I believe the hosting provider quietly patched an OS vulnerability without saying anything, but cannot prove anything either way. When you say, “recoding the entire site”, what do you mean by that?

    Sorry to hear about the ongoing attacks on your site. Hope you can get to the bottom of it and please let us know here if you do.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Site hacked 3 times with Wordfence (free) enabled’ is closed to new replies.