Security Experts:

Connect with us

Hi, what are you looking for?


Malware & Threats

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.

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

Written By

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.

Click to comment

Expert Insights

Related Content

Malware & Threats

Microsoft plans to improve the protection of Office users by blocking XLL add-ins from the internet.


CISA, NSA, and MS-ISAC issued an alert on the malicious use of RMM software to steal money from bank accounts.


A recently disclosed vBulletin vulnerability, which had a zero-day status for roughly two days last week, was exploited in a hacker attack targeting the...


Chinese threat actor DragonSpark has been using the SparkRAT open source backdoor in attacks targeting East Asian organizations.


Russia-linked cyberespionage group APT29 has been observed using embassy-themed lures and the GraphicalNeutrino malware in recent attacks.


No one combatting cybercrime knows everything, but everyone in the battle has some intelligence to contribute to the larger knowledge base.

Malware & Threats

Security researchers are warning of a new wave of malicious NPM and PyPI packages designed to steal user information and download additional payloads.


The changing nature of what we still generally call ransomware will continue through 2023, driven by three primary conditions.