{"id":21529,"date":"2023-03-21T16:10:27","date_gmt":"2023-03-22T00:10:27","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2023\/03\/21\/news-15260\/"},"modified":"2023-03-21T16:10:27","modified_gmt":"2023-03-22T00:10:27","slug":"news-15260","status":"publish","type":"post","link":"http:\/\/www.palada.net\/index.php\/2023\/03\/21\/news-15260\/","title":{"rendered":"A look at a Magecart skimmer using the Hunter obfuscator"},"content":{"rendered":"<p>Threat actors are notorious for trying to hide their code in various ways, from binary packers to obfuscators. On their own, these tools are not&nbsp;always malicious&nbsp;as they can also be be used by companies or individuals who wish to keep their work safe from piracy, but overall they tend to be largely abused.<\/p>\n<p>In the case of credit card skimmers in client-side attacks, obfuscators are a common occurrence as they can make code identification more difficult. Defenders typically have the choice to either&nbsp;rely on&nbsp;the browser&#8217;s debugger and step through the code, or can statically try to reverse it. The latter tends to be quite time consuming, but the former&nbsp;can often problematic if the&nbsp;malware author&nbsp;adds anti-debugging routines.<\/p>\n<p>Today, we look at a Magecart skimmer that uses Hunter, a PHP Javascript obfuscator. During our investigation, we were able to discover a number of domains all part of the same infrastructure with custom skimmers for several Magento stores.<\/p>\n<h2>Initial injection on e-commerce sites<\/h2>\n<p>The attack relies on 2 steps: the first one is code injected inside the website&#8217;s source that calls out a remote URL. That URL in turn, loads the skimmer within the payment checkout process.<\/p>\n<p>We notice a large blurb of code that contains some static elements and others that are uniquely generated. The &#8216;<em>eval<\/em>&#8216; portion of the code is a clear giveaway that the random looking string is being processed dynamically to return some instructions.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/threat-intelligence\/2023\/03\/easset_upload_file46265_262493_e.png\" alt=\"\" width=\"830\" height=\"352\" \/><\/p>\n<p>The function (h,u,n,t,e,r) helps us to identify that this obfuscator is called Hunter and <a href=\"https:\/\/github.com\/nicxlau\/hunter-php-javascript-obfuscator\" target=\"_blank\">available on GitHub<\/a>. To decode the obfuscated string, we can simply write out the content of <em>eval<\/em> and we obtain a single line of JavaScript pointing to a URL.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/threat-intelligence\/2023\/03\/easset_upload_file26904_262493_e.png\" alt=\"\" width=\"697\" height=\"563\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/p>\n<p>This URL contains code that has been obfuscated with Hunter once again. This time, once we deobfuscate it, we see what&nbsp;appears to be HTML code&nbsp;with forms referring to credit card fields. This is the actual skimmer.<\/p>\n<h2>Skimmer at checkout page<\/h2>\n<p>When a victim who&#8217;s shopping at a compromised online store goes to check out, there will be additional fields injected in the contact form that aren&#8217;t normally there. Below is the legitimate checkout page of a store without the skimmer being loaded:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/threat-intelligence\/2023\/03\/easset_upload_file76770_262493_e.png\" alt=\"\" width=\"964\" height=\"748\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/>We can see that the payment process is on the bottom right hand side. In contrast, this is what the same page looks like when the skimmer is loaded:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/threat-intelligence\/2023\/03\/easset_upload_file4736_262493_e.png\" alt=\"\" width=\"952\" height=\"582\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/>Additional fields were inserted between the shopper&#8217;s email address and name. In this case, the threat actor didn&#8217;t do a very good job because the fields are in English while the rest is in Spanish.<\/p>\n<p>The credit card data to be stolen is encoded, then stored inside a cookie and subsequently exfiltrated via a POST request.<\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/threat-intelligence\/2023\/03\/easset_upload_file21336_262493_e.png\" alt=\"\" width=\"869\" height=\"481\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/h2>\n<h2>Infrastructure<\/h2>\n<p>The skimmer domains registered with Porkbun all appear to be hosted on the same server at&nbsp;193.201.9.116 (ASN49505):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/threat-intelligence\/2023\/03\/easset_upload_file71453_262493_e.png\" alt=\"\" width=\"1026\" height=\"810\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/p>\n<p>We can get any of the currently still resolving domains to show&nbsp;their own version of the skimmer code by&nbsp;crafting&nbsp;a GET request with the proper referer:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/threat-intelligence\/2023\/03\/easset_upload_file19426_262493_e.png\" alt=\"\" width=\"586\" height=\"366\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/>The Hunter&nbsp;obfuscator is handy but quite easy to reverse and as such provides minimal stealth capabilities. Based on the skimmer code, this is not a very sophisticated attack probably limited to less than a hundred stores. However, this was the first time we encountered a Magecart skimmer using this kind of obfuscation and most endpoint security products are not detecting the client-side JavaScript.<\/p>\n<p>Malwarebytes&nbsp;customers are shielded against this campaign via our web protection in <a href=\"https:\/\/www.malwarebytes.com\/business\/endpoint-protection\" target=\"_blank\">End Protection (EP)<\/a>, <a href=\"https:\/\/www.malwarebytes.com\/business\/edr\" target=\"_blank\">Endpoint Detection and Response (EDR)<\/a> and <a href=\"https:\/\/www.malwarebytes.com\/premium\" target=\"_blank\">Malwarebytes Premium<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/threat-intelligence\/2023\/03\/easset_upload_file80526_262493_e.png\" alt=\"\" width=\"525\" height=\"327\" \/><\/p>\n<h2>Indicators of Compromise<\/h2>\n<div><strong>Host:<\/strong><\/div>\n<div>193.201.9.116<\/div>\n<div><\/div>\n<div><strong>Skimmer domains:<\/strong><\/div>\n<div>1537la[.]buzz&nbsp;<\/div>\n<div>1537li[.]buzz&nbsp;<\/div>\n<div>1537lx[.]buzz&nbsp;<\/div>\n<div>1568la[.]buzz&nbsp;<\/div>\n<div>1568li[.]buzz&nbsp;<\/div>\n<div>1568lx[.]buzz&nbsp;<\/div>\n<div>1599la[.]buzz&nbsp;<\/div>\n<div>1599li[.]buzz&nbsp;<\/div>\n<div>1599lx[.]buzz&nbsp;<\/div>\n<div>1599lz[.]buzz&nbsp;<\/div>\n<div>appcloud1[.]buzz&nbsp;<\/div>\n<div>appcloud19[.]buzz&nbsp;<\/div>\n<div>appcloud2[.]buzz&nbsp;<\/div>\n<div>appcloud20[.]buzz&nbsp;<\/div>\n<div>appcloud3[.]buzz&nbsp;<\/div>\n<div>appcloud5[.]buzz&nbsp;<\/div>\n<div>araboxtv[.]sbs&nbsp;<\/div>\n<div>blindsmax[.]sbs&nbsp;<\/div>\n<div>bubapeq[.]quest&nbsp;<\/div>\n<div>dev-extension[.]cloud&nbsp;<\/div>\n<div>dev-extension[.]one&nbsp;<\/div>\n<div>dev-extension[.]us&nbsp;<\/div>\n<div>hedeya[.]sbs<\/div>\n<div>hedeya[.]sbs&nbsp;<\/div>\n<div>inspirefitness[.]sbs&nbsp;<\/div>\n<div>motherearthlabs[.]sbs&nbsp;<\/div>\n<div>nasaservers[.]sbs&nbsp;<\/div>\n<div>newarriwal[.]quest&nbsp;<\/div>\n<div>paramountchemicals[.]sbs&nbsp;<\/div>\n<div>peqart[.]sbs&nbsp;<\/div>\n<div>remediadigital[.]sbs&nbsp;<\/div>\n<div>roboshop[.]sbs&nbsp;<\/div>\n<div>schmerzfrei-shop[.]sbs&nbsp;<\/div>\n<div>swsgswsg[.]sbs&nbsp;<\/div>\n<div>thecornerstoreau[.]sbs&nbsp;<\/div>\n<div>ultracoolfl[.]sbs<\/div>\n<p><a href=\"https:\/\/www.malwarebytes.com\/blog\/threat-intelligence\/2023\/03\/hunter-skimmer\" target=\"bwo\" >https:\/\/blog.malwarebytes.com\/feed\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<table cellpadding=\"10\">\n<tr>\n<td valign=\"top\" align=\"left\">\n<p>Categories: <a href=\"https:\/\/www.malwarebytes.com\/blog\/category\/threat-intelligence\" rel=\"category tag\">Threat Intelligence<\/a><\/p>\n<p>Tags: magecart<\/p>\n<p>Tags: skimmer<\/p>\n<p>Tags: obfuscation<\/p>\n<p>Tags: hunter<\/p>\n<p>Tags: credit card<\/p>\n<p>Tags: magento<\/p>\n<p>The threat actor behind this operation is using an open-source JavaScript obfuscator to hide its code.<\/p>\n<table width=\"100%\">\n<tr>\n<td align=\"right\">\n<p><b>(<a href=\"https:\/\/www.malwarebytes.com\/blog\/threat-intelligence\/2023\/03\/hunter-skimmer\" title=\"A look at a Magecart skimmer using the Hunter obfuscator\">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:\/\/www.malwarebytes.com\/blog\/threat-intelligence\/2023\/03\/hunter-skimmer\">A look at a Magecart skimmer using the Hunter obfuscator<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/www.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,28916,19622,12370,12039,19623,12040],"class_list":["post-21529","post","type-post","status-publish","format-standard","hentry","category-malwarebytes","category-security","tag-credit-card","tag-hunter","tag-magecart","tag-magento","tag-obfuscation","tag-skimmer","tag-threat-intelligence"],"_links":{"self":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/21529","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=21529"}],"version-history":[{"count":0,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/21529\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=21529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=21529"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=21529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}