Security Experts:

Magento Malware Hides Stolen Card Data in Image Files

Cybercriminals have been using innocent-looking image files to store and exfiltrate payment card data stolen from compromised ecommerce websites running on the Magento platform.

It’s not uncommon for malicious actors to plant card swiper malware on ecommerce websites. A campaign observed recently by Sucuri and RiskIQ targeted over 100 online shops powered by Magento, Powerfront CMS and OpenCart.

One interesting attack spotted recently by Sucuri involves a card-swiping malware designed to target Magento shops. Such malware typically exfiltrates stolen card data via email or by adding it to a file that is later retrieved by the attackers.

In the attacks observed by Sucuri, cybercriminals have used a malicious PHP file that dumps stolen data into an image file. The use of fake images is not uncommon, but these files usually don’t contain a real image.

In this case, however, the image that stores the card data is real and it’s related to products actually sold on the targeted website. The image can be viewed by the website’s administrator, making it less likely to raise any suspicion.

The stolen data is stored at the end of the file, after the legitimate image code, in clear text. Since the image is publicly accessible, the hackers don’t even need to maintain access to the website after they plant the malware.

“All the attacker would need to do is download the image from the website just like any other and view its source code,” Sucuri researcher Ben Martin said in a blog post.

According to Sucuri, most of the stolen cards came from the United States, but victims also include users from Japan, Turkey, Saudi Arabia and Canada.

Sucuri has advised online shop owners to protect their websites by keeping all their software updated. The company has pointed out that the malicious files used in these types of attacks can often be identified based on their “last modified” date, which is typically more recent if the infection is detected quickly.

Dutch researcher Willem De Groot reported earlier this month that he had identified more than 5,900 breached online stores set up to skim payment card data. While hundreds of the affected websites were cleaned up after their owners were notified, De Groot said many merchants refused to believe that their websites were compromised or they simply did not care.

Related Reading: "KimcilWare" Ransomware Targets Magento Websites

Related Reading: Attackers Disguise Malware as Magento Patch

Related Reading: Critical Magento Flaws Expose Sites to Takeover

view counter
Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.