{"id":19145,"date":"2022-05-28T19:04:25","date_gmt":"2022-05-29T03:04:25","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2022\/05\/28\/news-12878\/"},"modified":"2022-05-28T19:04:25","modified_gmt":"2022-05-29T03:04:25","slug":"news-12878","status":"publish","type":"post","link":"https:\/\/www.palada.net\/index.php\/2022\/05\/28\/news-12878\/","title":{"rendered":"Beneath the surface: Uncovering the shift in web skimming"},"content":{"rendered":"<p><strong>Credit to Author: Paul Oliveria| Date: Mon, 23 May 2022 16:00:00 +0000<\/strong><\/p>\n<p>Microsoft security researchers recently observed that web skimming campaigns now employ various obfuscation techniques to deliver and hide skimming scripts. It\u2019s a shift from earlier tactics where attackers conspicuously injected malicious scripts into e-commerce platforms and content management systems (CMSs) via vulnerability exploitation, making this threat highly evasive to traditional security solutions. As of this writing, some of the latest skimming HTML and JavaScript files uploaded in VirusTotal have very low detection rates.<\/p>\n<p>Web skimming typically targets platforms like Magento, PrestaShop, and WordPress, which are popular choices for online shops because of their ease of use and portability with third-party plugins. Unfortunately, these platforms and plugins come with vulnerabilities that the attackers have constantly attempted to leverage. One notable web skimming campaign\/group is <a href=\"https:\/\/www.riskiq.com\/what-is-magecart\/\">Magecart<\/a>, which gained media coverage over the years for affecting thousands of websites, including several popular brands.<\/p>\n<p>In one of the campaigns we\u2019ve observed, attackers obfuscated the skimming script by encoding it in PHP, which, in turn, was embedded inside an image file\u2014a likely attempt to leverage PHP calls when a website\u2019s index page is loaded. Recently, we\u2019ve also seen compromised web applications injected with malicious JavaScript masquerading as Google Analytics and Meta Pixel (formerly Facebook Pixel) scripts. Some skimming scripts even had anti-debugging mechanisms, in that they first checked if the browser\u2019s developer tools were open.<\/p>\n<p>Given the scale of web skimming campaigns and the impact they have on organizations and their customers, a comprehensive security solution is needed to detect and block this threat. <a href=\"https:\/\/www.microsoft.com\/security\/business\/threat-protection\/microsoft-365-defender\">Microsoft 365 Defender<\/a> provides a coordinated defense that\u2019s enriched by our visibility into attacker infrastructure and <a href=\"https:\/\/www.riskiq.com\/blog\/magecart\/\">continuous monitoring<\/a> of the threat landscape.<\/p>\n<p>In this blog, we provide the technical details of the recent skimming campaigns\u2019 obfuscation techniques. We also offer steps for defenders and users to protect themselves and their organizations from such attacks.<\/p>\n<h2>How web skimming works<\/h2>\n<p>This primary goal of web skimming campaigns is to harvest and later exfiltrate users\u2019 payment information, such as credit card details, during checkout. To achieve this, attackers typically take advantage of vulnerabilities in e-commerce platforms and CMSs to gain access to pages they want to inject the skimming script into. Another common method is web-based supply chain attacks, where attackers use vulnerabilities in installed third-party plugins and themes or compromise ad networks that may inevitably serve malicious ads without the site owner\u2019s knowledge or consent.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"799\" height=\"493\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig1-skimming-attack-overview.png\" alt=\"Attack chain diagram with icons and arrows depicting a typical web skimming attack.\" class=\"wp-image-114615\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig1-skimming-attack-overview.png 799w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig1-skimming-attack-overview-300x185.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig1-skimming-attack-overview-768x474.png 768w\" sizes=\"auto, (max-width: 799px) 100vw, 799px\" \/><figcaption>Figure 1. Overview of a web skimming attack<\/figcaption><\/figure>\n<p>As mentioned earlier, one notable skimming campaign is <a href=\"https:\/\/www.riskiq.com\/what-is-magecart\/\">Magecart<\/a>. First observed in 2010, Magecart campaigns have increased in number and become stealthier through heavy obfuscation techniques, new injection points, and delivery methods. In the last five years, popular organizations or brands have been affected by Magecart\u2014from an <a href=\"https:\/\/www.riskiq.com\/blog\/labs\/magecart-british-airways-breach\/\">airline company<\/a> and <a href=\"https:\/\/www.riskiq.com\/blog\/labs\/magecart-ticketmaster-breach\/\">online ticketing services<\/a> to a <a href=\"https:\/\/sansec.io\/research\/puma-magecart\">sports brand<\/a> and <a href=\"https:\/\/www.bleepingcomputer.com\/news\/security\/segway-store-hacked-to-steal-customers-credit-cards\/\">personal transporter<\/a>. In 2019, <a href=\"https:\/\/www.riskiq.com\/blog\/labs\/cloudcms-picreel-magecart\/\">tens of thousands of websites<\/a> got compromised because of a misconfiguration in the cloud service provider where these sites were hosted. Such an increase in these types of attacks prompted the Payment Card Industry Security Standards Council (PCI SSC) to <a href=\"https:\/\/www.pcisecuritystandards.org\/pdfs\/PCISSC_Magecart_Bulletin_RHISAC_FINAL.pdf\">release a bulletin<\/a> that warns users about the threat. In April 2022, PCI also <a href=\"https:\/\/portswigger.net\/daily-swig\/credit-card-industry-standard-revised-to-repel-card-skimmer-attacks\">released<\/a> a major revision in its Data Security Standard (DSS), which now includes additional requirements for e-commerce environments to help prevent skimming.<\/p>\n<h2>Recent developments<\/h2>\n<p>In their earlier iterations, most web skimming campaigns directly targeted unpatched e-commerce platforms like Magento. Also, the malicious JavaScript they injected were very conspicuous. However, as the campaigns\u2019 attack vectors and routines evolved, attackers also started using different techniques to hide their skimming scripts.<\/p>\n<h3>Malicious images with obfuscated script<\/h3>\n<p>During our research, we came across two instances of malicious image files being uploaded to a Magento-hosted server. Both images contained a PHP script with a Base64-encoded JavaScript, and while they had identical JavaScript code, they slightly differed in their PHP implementation. The first image, disguised as a favicon (also known as a shortcut or URL icon), was available on VirusTotal, while the other one was a typical web image file discovered by our team. Their hashes are included in the <a href=\"#ioc\">Indicators of compromise<\/a> section below.<\/p>\n<p>We first observed the malicious favicon in November 2021, when a few campaigns started dropping remote access trojans (RATs) on target web servers, in addition to injecting scripts into web pages. This delivery method moves away from the usual <em>modus<\/em>; it appears that attackers are now targeting the server side to inject their scripts, enabling them to bypass conventional browser protections like Content Security Policy (CSP), which prevents the loading of any external scripts. Meanwhile, the more recent image file was uploaded on the <em>\/media\/wysiwyg\/<\/em> directory, most likely by leveraging a vulnerability in the Magento CMS.<\/p>\n<p>The insertion of the PHP script in an image file is interesting because, by default, the web server wouldn\u2019t run the said code. Based on previous similar attacks, we believe that the attacker used a PHP <em>include<\/em> expression to include the image (that contains the PHP code) in the website\u2019s index page, so that it automatically loads at every webpage visit.<\/p>\n<p>In both images\u2019 cases, once the embedded PHP script was run, it first retrieved the current page\u2019s URL and looked for the \u201ccheckout\u201d and \u201conepage&#8221; keywords, both of which are mapped to Magento\u2019s checkout page.<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig2-magento-shopping-cart-page-checkout.png\" alt=\"Partial screenshot of a Magento shopping cart web page.\" class=\"wp-image-114618\" width=\"600\" height=\"236\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig2-magento-shopping-cart-page-checkout.png 800w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig2-magento-shopping-cart-page-checkout-300x118.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig2-magento-shopping-cart-page-checkout-768x301.png 768w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption>Figure 2. Screenshot of a Magento shopping cart page with the \u201ccheckout\u201d keyword in the URL<\/figcaption><\/figure>\n<p>Before serving the skimming script, the PHP script also checked that administrator cookies weren\u2019t set to ensure that a web admin isn\u2019t currently signed in. Such a check ensured that the script only targeted the site visitors (online shoppers).<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig3-php-script-checks-admin-cookies.png\" alt=\"Partial screenshot of a PHP code snippet.\" class=\"wp-image-114621\" width=\"601\" height=\"150\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig3-php-script-checks-admin-cookies.png 801w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig3-php-script-checks-admin-cookies-300x75.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig3-php-script-checks-admin-cookies-768x192.png 768w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><figcaption>Figure 3. Portion of the PHP script that checks for admin cookies<\/figcaption><\/figure>\n<p>The skimming script was encoded multiple times using hexadecimal (Base16) and then Base64. When decoded, it had an array of strings that were referenced and substituted further to construct a complete JavaScript code. Below are snippets of the decoded skimming script.<\/p>\n<p>The <em>boms()<\/em> function (Figure 4) was responsible for creating and serving the fake checkout payment form (Figure 5) that collected target users\u2019 payment details.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"800\" height=\"488\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig4-script-fake-checkout-payment-form.png\" alt=\"Partial screenshot of a web skimming script.\" class=\"wp-image-114624\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig4-script-fake-checkout-payment-form.png 800w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig4-script-fake-checkout-payment-form-300x183.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig4-script-fake-checkout-payment-form-768x468.png 768w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig4-script-fake-checkout-payment-form-440x268.png 440w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig4-script-fake-checkout-payment-form-392x240.png 392w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption>Figure 4. Portion of the skimming script that creates and serves the fake checkout payment form<\/figcaption><\/figure>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig5-fake-checkout-form.png\" alt=\"Partial screenshot of the fake checkout form.\" class=\"wp-image-114627\" width=\"401\" height=\"278\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig5-fake-checkout-form.png 801w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig5-fake-checkout-form-300x208.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig5-fake-checkout-form-768x532.png 768w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><figcaption>Figure 5. Sample screenshot of the fake checkout form that collects user payment details<\/figcaption><\/figure>\n<p>The said function is only triggered if the <em>__ffse<\/em> cookie value wasn\u2019t set to \u201c236232342323626326\u201d\u2014most probably a check to ensure that the website isn\u2019t already infected.<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig6-script-cookie-value.png\" alt=\"Partial screenshot of a web skimming script.\" class=\"wp-image-114630\" width=\"401\" height=\"141\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig6-script-cookie-value.png 801w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig6-script-cookie-value-300x105.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig6-script-cookie-value-768x269.png 768w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><figcaption>Figure 6. Portion of the skimming script that checks for a specific cookie value<\/figcaption><\/figure>\n<p>When the user submitted their details in the fake form, the <em>glob_snsd() <\/em>function is triggered (Figure 7), which then collected the said details in the form elements (input, select), encoded them in hex and Base64, and finally added them to the cookies (Figure 8).<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig7-script-credential-theft-exfiltration.png\" alt=\"Partial screenshot of a web skimming script.\" class=\"wp-image-114633\" width=\"401\" height=\"130\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig7-script-credential-theft-exfiltration.png 801w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig7-script-credential-theft-exfiltration-300x97.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig7-script-credential-theft-exfiltration-768x248.png 768w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><figcaption>Figure 7. Portion of the skimming script that launches the credential theft and exfiltration routines<\/figcaption><\/figure>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"800\" height=\"405\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig8-script-credential-theft.png\" alt=\"Partial screenshot of a web skimming script.\" class=\"wp-image-114636\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig8-script-credential-theft.png 800w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig8-script-credential-theft-300x152.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig8-script-credential-theft-768x389.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption>Figure 8. Portion of the skimming script that performs the credential theft routine<\/figcaption><\/figure>\n<p>The encoded stolen information was then exfiltrated to an attacker-controlled C2 via PHP curl requests.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"801\" height=\"332\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig9-script-exfiltration.png\" alt=\"Partial screenshot of a web skimming script.\" class=\"wp-image-114639\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig9-script-exfiltration.png 801w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig9-script-exfiltration-300x124.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig9-script-exfiltration-768x318.png 768w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><figcaption>Figure 9. Portion of the skimming script that performs the exfiltration routine<\/figcaption><\/figure>\n<h3>Concatenated and encoded skimming host URL<\/h3>\n<p>We also came across four lines of JavaScript injected into a compromised webpage. Like the malicious images we previously analyzed, the script in this scenario would run only when it finds the \u201ccheckout\u201d keyword in the target web page URL. It would then fetch the skimming script hosted on an attacker-controlled domain to load a fake checkout form.<\/p>\n<p>The attacker-controlled domain was encoded in Base64 and concatenated from several strings. As of this writing, the said domain is still active.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"803\" height=\"104\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig10-encoded-concatenated-skimming-url.png\" alt=\"Partial screenshot of a JavaScript code.\" class=\"wp-image-114642\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig10-encoded-concatenated-skimming-url.png 803w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig10-encoded-concatenated-skimming-url-300x39.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig10-encoded-concatenated-skimming-url-768x99.png 768w\" sizes=\"auto, (max-width: 803px) 100vw, 803px\" \/><figcaption>Figure 10. Code snippet containing the concatenated and encoded URL that hosts the skimming script<\/figcaption><\/figure>\n<p>The skimming script itself wasn\u2019t obfuscated and had two main functions: <em>getData()<\/em> and <em>__send()<\/em>. <em>getData()<\/em> was responsible for getting form data on the web page, converting them to JSON, and passing it onto <em>__send()<\/em>. Interestingly, this function also checked for crawlers and other possible debugging attempts before skimming data. It specifically checked if the user had opened the browser developer tool, as seen in the snippet below:<\/p>\n<pre class=\"wp-block-preformatted\">if (devtools.open) return;<br>&nbsp;if (\/bot|googlebot|crawler|spider|robot|crawling\/i.test(navigator.userAgent)) return;<\/pre>\n<p>The<em> __send() <\/em>function, in turn, created an image object and prepared the URL for exfiltration. Note that while it formed the image, this function loaded the URL with the captured data in the <em>data<\/em>parameter. The parameter value was also encoded in Base64.<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"399\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig11b-hosted-script-that-exfiltrates-data-1024x399.png\" alt=\"Partial screenshot of a web skimming script.\" class=\"wp-image-114819\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig11b-hosted-script-that-exfiltrates-data-1024x399.png 1024w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig11b-hosted-script-that-exfiltrates-data-300x117.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig11b-hosted-script-that-exfiltrates-data-768x300.png 768w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig11b-hosted-script-that-exfiltrates-data-1536x599.png 1536w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig11b-hosted-script-that-exfiltrates-data-2048x799.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Figure 11. Snippet of the hosted script that exfiltrates web page data<\/figcaption><\/figure>\n<h3>Google Analytics and Meta Pixel script spoofing<\/h3>\n<p>Attackers have also started masquerading as Google Analytics and Meta Pixel (formerly Facebook Pixel) scripts to trick site administrators or developers into thinking they\u2019re looking at non-malicious codes, thus evading detection.<\/p>\n<p>The screenshot below illustrates how a Base64-encoded string was placed inside a spoofed Google Tag Manager code. This string decoded to <em>trafficapps[.]business\/data[.]php?p=form<\/em>.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"801\" height=\"289\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig12-spoofed-google-tag-manager-with-skimming-script-628b54a675694.png\" alt=\"Partial screenshot of a web skimming script.\" class=\"wp-image-114798\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig12-spoofed-google-tag-manager-with-skimming-script-628b54a675694.png 801w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig12-spoofed-google-tag-manager-with-skimming-script-628b54a675694-300x108.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig12-spoofed-google-tag-manager-with-skimming-script-628b54a675694-768x277.png 768w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><figcaption>Figure 12. Encoded skimming script in a spoofed Google Analytics code<\/figcaption><\/figure>\n<p>We also observed a similar technique where the skimming script mimicked Meta Pixel\u2019s function parameters and JavaScript file name to avoid detection. Like the example in the previous section, the URL in this technique was encoded in Base64 and split into several strings. The concatenated string decoded to <em>\/\/sotech[.]fun\/identity[.]js<\/em>, and it contained obfuscated code. Interestingly, the decoded URL also had the query string <em>d=GTM-34PX2SO<\/em>, which is specific to Google Tag Manager and <em>not<\/em> Meta Pixel.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"800\" height=\"290\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig13-spoofed-meta-pixel-with-skimming-script.png\" alt=\"Partial screenshot of a web skimming script.\" class=\"wp-image-114651\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig13-spoofed-meta-pixel-with-skimming-script.png 800w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig13-spoofed-meta-pixel-with-skimming-script-300x109.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig13-spoofed-meta-pixel-with-skimming-script-768x278.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption>Figure 13. Encoded skimming script in a spoofed Meta Pixel code<\/figcaption><\/figure>\n<p>The attackers behind the Meta Pixel spoofing used newly registered domains (NRDs) hosted on HTTPS to carry out their attacks. All the domains we saw associated with this skimming campaign were registered around the same time via a popular budget hosting provider, as seen in the list below. However, the actual hosting sites were hidden behind Cloudflare\u2019s infrastructure.<\/p>\n<ul>\n<li>sotech[.]fun \u2013 created August 30, 2021<\/li>\n<li>techlok[.]bar \u2013 created September 3, 2021<\/li>\n<li>dratserv[.]bar \u2013 created September 15, 2021<\/li>\n<\/ul>\n<p>The hosted script had multiple layers of obfuscation. Based on what we were able to partially de-obfuscate, not only did the code serve the skimming script, but it also did the following:<\/p>\n<ul>\n<li>steal passwords \u2013 <em>input[name=&#8221;billing[customer_password]&#8221;]<\/em><\/li>\n<li>perform an anti-debugging technique \u2013 <em>function isDebugEnabled()<\/em><\/li>\n<\/ul>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"801\" height=\"272\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig14-encoded-skimming-script.png\" alt=\"Partial screenshot of a JavaScript code.\" class=\"wp-image-114654\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig14-encoded-skimming-script.png 801w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig14-encoded-skimming-script-300x102.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig14-encoded-skimming-script-768x261.png 768w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><figcaption>Figure 14. Snippet of the encoded skimming script<\/figcaption><\/figure>\n<h2>Defending against web skimming<\/h2>\n<p>For organizations, the impact of web skimming campaigns could translate into monetary loss, reputation damage, and loss of customer trust. Web administrators and other defenders should therefore keep a close eye on such attacks. As it is, web skimming scripts closely resemble other JavaScript code used to perform legitimate business functions like web analytics. In addition, skimming scripts aren\u2019t only found in HTML files; CSS, SVG, and other file types can also embed code that runs JavaScript once the related web pages load.<\/p>\n<p>Given the increasingly evasive tactics employed in skimming campaigns, organizations should ensure that their e-commerce platforms, CMSs, and installed plugins are up to date with the latest security patches and that they only download and use third-party plugins and services from trusted sources. They must also perform a regular and thorough check of their web assets for any compromised or suspicious content. Among the similarities we found in these recent skimming scripts include the presence of&nbsp; Base64-encoded strings such as \u201ccheckout\u201d and \u201conepage\u201d and the presence of the <em>atob()<\/em> JavaScript function in compromised pages. Such clues could help defenders surface these malicious scripts.<\/p>\n<p>Organizations should also complement best practices with a comprehensive security solution like <a href=\"https:\/\/www.microsoft.com\/security\/business\/threat-protection\/microsoft-365-defender\">Microsoft 365 Defender<\/a>, which can detect and block skimming scripts on endpoints and servers by coordinating threat defense across various domains. It\u2019s also backed by threat experts whose continuous monitoring of the computing landscape for new attacker tools and techniques enriches our protection technologies. For example, in the case of Magecart, RiskIQ <a href=\"https:\/\/cdn.riskiq.com\/wp-content\/uploads\/2018\/11\/RiskIQ-Flashpoint-Inside-MageCart-Report.pdf\">published<\/a> a report that profiled the attacker groups behind it. <a href=\"https:\/\/www.riskiq.com\/blog\/magecart\/\">Updates<\/a> about the latest skimming campaigns observed are also provided.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"800\" height=\"451\" src=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig15-defender-for-endpoint-detecting-skimming-malware.png\" alt=\"Partial screenshot of Microsoft Defender of Endpoint UI showing the following alert:  'MageBanker' credential theft malware was detected\" class=\"wp-image-114657\" srcset=\"https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig15-defender-for-endpoint-detecting-skimming-malware.png 800w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig15-defender-for-endpoint-detecting-skimming-malware-300x169.png 300w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig15-defender-for-endpoint-detecting-skimming-malware-768x433.png 768w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig15-defender-for-endpoint-detecting-skimming-malware-767x431.png 767w, https:\/\/www.microsoft.com\/security\/blog\/uploads\/securityprod\/2022\/05\/fig15-defender-for-endpoint-detecting-skimming-malware-539x303.png 539w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption>Figure 15. Microsoft Defender for Endpoint detecting a web skimming malware<\/figcaption><\/figure>\n<p>Meanwhile, online shoppers can protect themselves from web skimming attacks by ensuring their browser sessions are secure, especially during the checkout process. They should be wary of any unexpected or suspicious pop-ups that ask for payment details. Finally, users should turn on <a href=\"https:\/\/docs.microsoft.com\/microsoft-365\/security\/defender-endpoint\/enable-cloud-protection-microsoft-defender-antivirus?view=o365-worldwide\">cloud-delivered protection<\/a>&nbsp;and automatic sample submission on Microsoft Defender Antivirus (or a similar feature in their security product). This capability utilizes artificial intelligence and machine learning to quickly identify and stop new and unknown threats.<\/p>\n<p><a href=\"https:\/\/www.microsoft.com\/microsoft-365\/security\/microsoft-365-defender\">Learn how you can stop attacks through automated, cross-domain security with Microsoft 365 Defender.<\/a><\/p>\n<p><strong><em>Microsoft 365 Defender Research Team<\/em><\/strong><\/p>\n<h2>Appendix<\/h2>\n<h3 id=\"ioc\">Indicators of compromise<\/h3>\n<h4>File hashes (SHA-256)<\/h4>\n<ul>\n<li><a href=\"https:\/\/www.virustotal.com\/gui\/file\/a6fc14a7bb5e05c1d271add5b38744523fed01a18ce5578b965ee02e19589e77\/detection\">a6fc14a7bb5e05c1d271add5b38744523fed01a18ce5578b965ee02e19589e77<\/a><\/li>\n<li><a href=\"https:\/\/www.virustotal.com\/gui\/file\/b397e7ad2d00dcef4cf4ba5df363684b1fefcc64c23ab110032a7b2ebb77ab4a\">b397e7ad2d00dcef4cf4ba5df363684b1fefcc64c23ab110032a7b2ebb77ab4a<\/a><\/li>\n<li><a href=\"https:\/\/www.virustotal.com\/gui\/file\/88e9d5eddd24546ab78ce8db1eb474a20b9694f52d4c7ad976fbfa683b7ce635\">88e9d5eddd24546ab78ce8db1eb474a20b9694f52d4c7ad976fbfa683b7ce635<\/a><\/li>\n<\/ul>\n<h4>Encoded URLs<\/h4>\n<p>Below is a list of Base64-encoded URLs injected in affected CMSs and their corresponding decoded values. These URLs host the malicious JavaScript the attackers use for web skimming.<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<tbody>\n<tr>\n<td><strong>Base64-encoded URL<\/strong><\/td>\n<td><strong>Actual (Decoded) URL<\/strong><\/td>\n<\/tr>\n<tr>\n<td>aHR0cHM6Ly80NS4xOTcuMTQxLjI1MC9zdGF0eXN0aWNzLnBocA==<\/td>\n<td>hxxps:\/\/45[.]197[.]141[.]250\/statystics[.]php<\/td>\n<\/tr>\n<tr>\n<td>aHR0cHM6Ly80NS4xOTcuMTQxLjI1MC9hbmFseXRpY3MucGhw<\/td>\n<td>hxxps:\/\/45[.]197[.]141[.]250\/analytics[.]php<\/td>\n<\/tr>\n<tr>\n<td>Ly9hcGl1anF1ZXJ5LmNvbS9hamF4L2xpYnMvanF1ZXJ5LzMuNS4xL2pxdWVyeS0zLjExLjAubWluLmpzP2k9<\/td>\n<td>\/\/apiujquery[.]com\/ajax\/libs\/jquery\/3[.]5[.]1\/jquery-3[.]11[.]0[.]min[.]js?i=<\/td>\n<\/tr>\n<tr>\n<td>dHJhZmZpY2FwcHMuYnVzaW5lc3MvZGF0YS5waHA\/cD1mb3Jt<\/td>\n<td>trafficapps[.]business\/data[.]php?p=form<\/td>\n<\/tr>\n<tr>\n<td>aHR0cHM6Ly9qcXVlcmlkZXYuYXQvanF1ZXJ5LmJhLWhhc2hjaGFuZ2UubWluLmpz<\/td>\n<td>hxxps:\/\/jqueridev[.]at\/jquery[.]ba-hashchange[.]min[.]js<\/td>\n<\/tr>\n<tr>\n<td>aHR0cHM6Ly9qcXVlcnlzdGF0aWMueHl6L2pxdWVyeS1zdGF0aWMuanM=<\/td>\n<td>hxxps:\/\/jquerystatic[.]xyz\/jquery-static[.]js<\/td>\n<\/tr>\n<tr>\n<td>Ly9zb3RlY2guZnVuL2lkZW50aXR5Lmpz<\/td>\n<td>\/\/sotech[.]fun\/identity[.]js<\/td>\n<\/tr>\n<tr>\n<td>Ly90ZWNobG9rLmJhci9zY2V2ZW50Lm1pbi5qcw<\/td>\n<td>\/\/techlok[.]bar\/scevent[.]min[.]js<\/td>\n<\/tr>\n<tr>\n<td>Ly9kcmF0c2Vydi5iYXIvc2NyaXB0LW1pbi0yLjUuNC5taW4uanM<\/td>\n<td>\/\/dratserv[.]bar\/script-min-2[.]5[.]4[.]min[.]js<\/td>\n<\/tr>\n<tr>\n<td>aHR0cHM6Ly9pZHRyYW5zZmVyLmljdS93d3cuZ29vZ2xlLWFuYWx5dGljcy5jb20vYXJvbWFvbmxpbmVzdG9yZS5jb20uanM=<\/td>\n<td>hxxps:\/\/idtransfer[.]icu\/www[.]google-analytics[.]com\/aromaonlinestore[.]com[.]js<\/td>\n<\/tr>\n<tr>\n<td>dHJhZmZpY2FwcHMub3JnL2RhdGEucGhwP3A9ZjE2aTEz<\/td>\n<td>trafficapps[.]org\/data[.]php?p=f16i13<\/td>\n<\/tr>\n<tr>\n<td>aHR0cHM6Ly9jaWxlbnQtdHJhY2tpbmcuY29tL2pzL3RyYWNraW5nLTIuMS5taW4uanM=<\/td>\n<td>hxxps:\/\/cilent-tracking[.]com\/js\/tracking-2[.]1[.]min[.]js<\/td>\n<\/tr>\n<tr>\n<td>Z29vZ2xlc2VydmljZXMub25saW5lL3Y0L2FwaS9hcGlWMi5qcw==<\/td>\n<td>googleservices[.]online\/v4\/api\/apiV2[.]js<\/td>\n<\/tr>\n<tr>\n<td>bGlnaHRnZXRqcy5jb20vbGlnaHQuanM=<\/td>\n<td>lightgetjs[.]com\/light[.]js<\/td>\n<\/tr>\n<tr>\n<td>anNwYWNrLnByby9hcGkuanM=<\/td>\n<td>jspack[.]pro\/api[.]js<\/td>\n<\/tr>\n<tr>\n<td>bWFnZWVudG8uY29tL3YzL2FwaS9sb2dzLmpz<\/td>\n<td>mageento[.]com\/v3\/api\/logs[.]js<\/td>\n<\/tr>\n<tr>\n<td>YWdpbGl0eXNjcmlwdHMuY29tL2pzL3NhZmVmaWxlLmpz<\/td>\n<td>agilityscripts[.]com\/js\/safefile[.]js<\/td>\n<\/tr>\n<tr>\n<td>aHR0cHM6Ly8xMDYuMTUuMTc5LjI1NQ==<\/td>\n<td>hxxps:\/\/106[.]15[.]179[.]255<\/td>\n<\/tr>\n<tr>\n<td>aHR0cHM6Ly8xMDMuMjMzLjExLjI4L2pRdWVyeV9TdFhsRmlpc3hDRE4ucGhwP2hhc2g9MDZkMDhhMjA0YmRkZmViZTI4NTg0MDhhNjJjNzQyZTk0NDgyNDE2NA==<\/td>\n<td>hxxps:\/\/103[.]233[.]11[.]28\/jQuery_StXlFiisxCDN[.]php?hash=06d08a204bddfebe2858408a62c742e944824164<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<h3>Microsoft 365 Defender detections<\/h3>\n<h4>Microsoft Defender Antivirus<\/h4>\n<p>Below are Microsoft detections that detect malicious JavaScript skimmers in web servers.<\/p>\n<p><strong>Magento skimmers<\/strong><\/p>\n<ul>\n<li>TrojanSpy:JS\/Banker.AA<\/li>\n<li>TrojanSpy:JS\/SuspBanker.AA<\/li>\n<li>TrojanSpy:JS\/MageBanker.CC<\/li>\n<li>TrojanSpy:JS\/GTagManagerBanker.A<\/li>\n<li>TrojanSpy:JS\/GTagManagerBanker.B<\/li>\n<li>TrojanSpy:JS\/GenWebBanker.A<\/li>\n<li>TrojanSpy:JS\/FbPixelSkimming.A<\/li>\n<li>TrojanSpy:JS\/Banker.BB<\/li>\n<li>TrojanSpy:JS\/PossibleSkimmer.A<\/li>\n<\/ul>\n<p><strong>WordPress WooCommerce skimmer<\/strong><\/p>\n<ul>\n<li>TrojanSpy:JS\/WooCommBanker.BB<\/li>\n<\/ul>\n<p><strong>PrestaShop skimmer<\/strong><\/p>\n<ul>\n<li>TrojanSpy:JS\/PrestaBanker.BB<\/li>\n<\/ul>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/www.microsoft.com\/security\/blog\/2022\/05\/23\/beneath-the-surface-uncovering-the-shift-in-web-skimming\/\">Beneath the surface: Uncovering the shift in web skimming<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/www.microsoft.com\/security\/blog\">Microsoft Security Blog<\/a>.<\/p>\n<p><a href=\"https:\/\/www.microsoft.com\/security\/blog\/2022\/05\/23\/beneath-the-surface-uncovering-the-shift-in-web-skimming\/\" target=\"bwo\" >https:\/\/blogs.technet.microsoft.com\/mmpc\/feed\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><strong>Credit to Author: Paul Oliveria| Date: Mon, 23 May 2022 16:00:00 +0000<\/strong><\/p>\n<p>Web skimming campaigns now employ various obfuscation techniques to deliver and hide the skimming scripts. It\u2019s a shift from earlier tactics where attackers conspicuously injected the malicious scripts into e-commerce platforms and content management systems (CMSs) via vulnerability exploitation, making this threat highly evasive to traditional security solutions.<\/p>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/www.microsoft.com\/security\/blog\/2022\/05\/23\/beneath-the-surface-uncovering-the-shift-in-web-skimming\/\">Beneath the surface: Uncovering the shift in web skimming<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/www.microsoft.com\/security\/blog\">Microsoft Security Blog<\/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":[10759,10378],"tags":[4500,22453],"class_list":["post-19145","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-security","tag-cybersecurity","tag-microsoft-security-intelligence"],"_links":{"self":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/19145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=19145"}],"version-history":[{"count":0,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/19145\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=19145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=19145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=19145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}