Card skimming malware found on thousands of Magento-based sites

A card skimming operation has compromised 7,339 Magento-based online stores, allowing the attackers to quietly slurp payment card info as it’s being entered by customers.

card skimming Magento

Flagged in early August by Peeter Marvet (in Estonian) and then by security researcher Willem de Groot these online shops were hit in the last six monts.

“The average recovery time is a few weeks, but at least 1,450 stores have hosted the parasite during the full past 6 months,” de Groot shared.

And the campaign continues: according to his scans, the attackers have been hijacking 50 to 60 new stores per day over the last two weeks.

About the MagentoCore campaign

The online shops are likely compromised in a variety of ways: through Magento security holes, compromised accounts (either via malware or brute-forcing), etc.

Once the attackers gain access to the control panel of an e-commerce site, they change the code of the site’s HTML template to include a call for a malicious script (mage.js) hosted on the attackers’ servers:

card skimming Magento

The script records customers’ keystrokes as they enter their card number, expiry date, security code and personally identifiable information (PII) and uploads the data to a server controlled by the attackers.

“By intercepting the data while it’s still in the browser, the crooks don’t need to go grubbing through the databases on your server to dig out data from recent transactions,” Sophos’ Paul Ducklin notes.

“Even more sneakily, the crooks get access to data that is only ever present during the transaction but never stored afterwards, such as the victim’s CVV (security code).”

All the while, the site functions as usual and doesn’t show any indication that it’s compromised.

The MagentoCore skimmer malware includes recovery mechanisms – it adds backdoors, changes the password of several common account user names to how1are2you – and removes any competing malware from the site.

Protection and remediation

According to de Groot, among the victims of this operations are multi-million dollar, publicly traded companies and, of course, their customers.

If you’re running a Magento-based e-commerce operation, you would do well to check whether you’ve been hit as well.

If you find the skimmer in your store, de Groot first advises finding the attackers’ entry point(s), installed backdoors and unauthorized changes to the codebase. All of these have to be closed/removed simultaneously and you should revert to a certified safe copy of the codebase.

Finally, you should minimize the risk of the installation being compromised again by making sure that security patches and updates are implemented in a timely manner, and by choosing strong passwords and implementing two-factor authentication for all accounts.

Ducklin also advises installing an anti-virus scanner on your server and keeping an eye on logs for unexpected changes or unauthorised uploads.

UPDATE (September 5, 1:23 PM PT):

“Our security team has found that around 5,000 Magento Open Source users were affected by brute force attacks, in which MagentoCore malware planted skimmers on sites. There is no evidence that any Magento Enterprise customers were impacted,” a Magento spokesperson shared with Help Net Security.

Also, nearly all of the sites they’ve identified as being infected with the MagentoCore malware signature are missing patches and/or running on an outdated version.

“We’re committed to ensuring the security of our customers and encourage all merchants to stay up-to-date on security patches. Additionally, we recommend all merchants should sign up for our security scan utility to continually monitor their site for vulnerabilities and malware. A full digest of security best practices can be found here.”

Don't miss