New Magecart skimmers practice steganography, data transfer via WebSocket

A researcher has discovered a pair of new Magecart-style web skimmers, each one featuring an evasion technique that’s not typically employed by this breed of malware: steganography and the transfer a data via the WebSocket protocol.

The researcher, who uses the handle @AffableKraut, posted his two findings on Twitter last month, prompting the team from Malwarebytes to further analyze the threats and report the findings.

According to Malwarebytes, the steganography-based skimmer is the first documented skimmer to use this technique, which commonly involves hiding code within harmless-looking imagery.

In a Dec. 26 tweet, @AffableKraut said a colleague of his found the skimmer while searching through SIEM data. “The skimmer group uploads or modifies an existing image and appends the JS code,” the researcher says. In this case, the image appears to be an innocuous “free shipping” ribbon, which was observed on a shopping site.

“As it happens, the majority of web crawlers and scanners will concentrate on HTML and JavaScript files, and often ignore media files, which tend to be large and slow down processing,” states Malwarebytes Director of Threat Intelligence Jeroma Segura in a company blog post earlier this week. “What better place to sneak in some code?”

On Dec. 16, @AffableKraut posted his findings on the other web skimmer, which at the time appeared to still be in development and didn’t always work as intended. The skimmer is 840 lines long “and there’s a fair amount of minified and somewhat obfuscated code,” the researcher noted in a series of tweets describing the threat.

But unique to this malicious tool is its ability to use the WebSocket communication protocol to both load payloads and exfiltrate checkout data over a TCP connection.

“The goal is to conceal a connection to a server controlled by the criminals over a WebSocket,” explains Segura’s Malwarebytes post.

Segura goes on to describe the skimmer’s command-and-control communications process in detail: Once the malware’s code runs in the browser, it triggers a client handshake request and subsequent response, which in turns results in a series of bidirectional messages between the victim’s browser and the server. Next, “A larger Base64 encoded blurb is downloaded onto the client and processed as JavaScript code. This turns out to be the credit card skimming code,” the post continues.

@AffableKrau was able to link a single domain, bulksuppchat[.]com, to the threat, but could not tie this particular domain to any known Magecart group.

The post New Magecart skimmers practice steganography, data transfer via WebSocket appeared first on SC Media.

Original Source