
Recently, one of our analysts, Weston H., found a very interesting credit card thief in a Magento environment that loads malicious JavaScript code without using script tags. In this article I will explain how it was found, how to decode it and how it works!
One of our customers reported that one of their website visitors received a warning from their antivirus program when they navigated to their payment page:
Calls were made to a known malicious domain that was already blacklisted by several vendors for distribution of malware and involvement in carding attacks:
This certainly indicated that a card thief was present somewhere on our client’s website.
Credit Cards Thief in a Magento Website
In a previous article, I described the different types of card thieves that can infect e-commerce websites. PHP, being a server-side programming language, cannot be seen directly by anti-virus programs, so this infection must be JavaScript and visible to the browser.
Our first step in locating such an infection is to query the database for the following string: