A group of cybercriminals managed to hide their web skimmer in the EXIF metadata of an image that was then surreptitiously loaded by compromised online stores, Malwarebytes reveals. (Hackers)
Although image files have been long used to carry malicious code and exfiltrate data (steganography became a popular trick among hackers several years ago), it’s unusual to have web skimmers hidden in image files.
Such scripts are designed to identify and steal credit card data and other sensitive information that unsuspecting users enter on compromised ecommerce websites, and to send the harvested data to campaign operators.
The recently observed attack, Malwarebytes’ security researchers say, stands out not only because of the use of images to hide skimmers, but also because it uses images to exfiltrate stolen credit card data.
The script would load a favicon file identical to the favicon used by the compromised store (a logo of their brand), and the web skimmer was being loaded from the Copyright metadata field of this image.
The skimmer was designed to grab the content of the input fields where online shoppers enter their name, billing address and credit card details, just as other similar code does.
The skimmer also encodes the harvested data, reverses the string, and sends the information to an external server as an image file, via a POST request.
“The threat actors probably decided to stick with the image theme to also conceal the exfiltrated data via the favicon.ico file,” Malwarebytes notes.
During their investigation, the security researchers found a copy of the skimmer toolkit’s source code in an open directory of a compromised site, which provided them with the possibility to understand how the favicon.ico file is crafted with the injected script inside of the Copyright field.
Malwarebytes was also able to identify an earlier version of the skimmer, which lacked the obfuscation present in the latest iteration but had the same code features, and believes that it might have ties with Magecart Group 9.