{"id":22094,"date":"2023-05-24T16:10:55","date_gmt":"2023-05-25T00:10:55","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2023\/05\/24\/news-15824\/"},"modified":"2023-05-24T16:10:55","modified_gmt":"2023-05-25T00:10:55","slug":"news-15824","status":"publish","type":"post","link":"http:\/\/www.palada.net\/index.php\/2023\/05\/24\/news-15824\/","title":{"rendered":"Tracking down a trojan: An inside look at threat hunting in a corporate network"},"content":{"rendered":"<p style=\"text-align: left;\">At Malwarebytes, we talk a lot about the importance of threat hunting for SMBs&mdash;and not for no good reason, either. Just consider the fact that, when a threat actor breaches a network, they don&rsquo;t attack right away.&nbsp;<a href=\"https:\/\/www.csoonline.com\/article\/3657571\/attack-dwell-times-drop-ransomware-ttps-evolve-china-ramps-up-espionage-activity.html\" target=\"_blank\">The median amount of time<\/a>&nbsp;between system compromise and detection is 21 days.<\/p>\n<p>By that time, it&rsquo;s often too late. Data has been harvested or ransomware has been deployed.<\/p>\n<p><a href=\"https:\/\/www.malwarebytes.com\/blog\/business\/2022\/09\/cyber-threat-hunting-for-smbs-how-mdr-can-help\">Threat hunting<\/a> helps find and remediate highly-obfuscated threats like these that quietly lurk in the network, siphoning off confidential data and searching for credentials to access the &ldquo;keys to the kingdom.&rdquo;<\/p>\n<p>The bad news for small-to-medium sized businesses (SMBs): Manually intensive and costly threat-hunting tools usually restrict this practice to larger organizations with an advanced cybersecurity model and a well-staffed security operations center (SOC).<\/p>\n<p><a href=\"https:\/\/www.malwarebytes.com\/blog\/business\/2022\/10\/introducing-malwarebytes-managed-detection-and-response-mdr\">That&rsquo;s where Malwarebytes Managed Detection and Response (MDR) comes in.<\/a><\/p>\n<p>Malwarebytes MDR is a service that provides around-the-clock monitoring of an organization&rsquo;s environment for signs of a cyberattack.<\/p>\n<p>But talk is cheap: let&rsquo;s look at a real time where Malwarebytes MDR successfully helped a company detect and respond to a potent banking Trojan known as QBot.<\/p>\n<h2>The Incident<\/h2>\n<p>On a date left undisclosed for security reasons, a reputable oil and gas company we&rsquo;ll refer to as Company 1 experienced an intrusion in their network. The culprit was <strong>Qakbot<\/strong> (also known as QBot).<\/p>\n<p><a href=\"https:\/\/www.malwarebytes.com\/blog\/news\/2023\/04\/qbot-changes-tactic-remains-a-menace-to-business-networks\">QBot is notorious for its abilities to steal sensitive information<\/a>, like login credentials, financial data, and personal information, and even create backdoors for additional malware to infiltrate the compromised system. What&#8217;s more, it also facilitates remote access to the compromised machines.<\/p>\n<p>QBot has recently been observed being distributed as part of a phishing campaign using PDFs and Windows Script Files (WSF).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/business\/2023\/05\/easset_upload_file47677_266184_e.png\" alt=\"\" width=\"737\" height=\"147\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/p>\n<p style=\"text-align: center;\">The QBot campaign illustrated (Source: Jerome Segura | Malwarebytes Labs)<\/p>\n<p>QBot attacks start with a reply-chain phishing email, when threat actors reply to a chain of emails with a malicious link or attachment.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/business\/2023\/05\/easset_upload_file89775_266184_e.png\" alt=\"\" width=\"865\" height=\"587\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/p>\n<p style=\"text-align: center;\">A sample reply-chain phishing email in French, carrying a PDF attachment disguised as a cancellation letter. (Source: BleepingComputer)<\/p>\n<p>Once someone in the email chain opens the attached PDF, they see a message saying, &#8220;This document contains protected files, to display them, click on the &#8216;open&#8217; button.&#8221; Clicking the button downloads a ZIP file containing the WSF script.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/business\/2023\/05\/easset_upload_file55401_266184_e.png\" alt=\"\" width=\"1237\" height=\"611\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/p>\n<p>The heavily obfuscated script contains a mix of JS and VBScript code that, when run, triggers a PowerShell that then downloads the QBot DLL from a list of hardcoded URLs. This script tries each URL until a file is downloaded to the Windows Temp folder (%TEMP%) and executed.<\/p>\n<p>Once QBot runs, it issues a PING command to check for an internet connection. It then injects itself into wermgr.exe, a legitimate Windows Error Manager program, to run quietly in the background.<\/p>\n<h2>The Infection<\/h2>\n<p>The initial infection at Company 1 was traced to a laptop in their network.The Qakbot malware used <strong>Windows Script File (WSF), executed by WSCRIPT.EXE, to launch a PowerShell script encoded in Base64.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/business\/2023\/05\/easset_upload_file52946_266184_e.png\" alt=\"\" width=\"1321\" height=\"598\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/service.malwarebytes.com\/hc\/en-us\/articles\/4413808732691-Suspicious-Activity-Details-in-Nebula\">The Process Graph tile<\/a> under the Suspicious Activity page in Nebula shows&nbsp;a visual representation of the files or processes touched by the suspicious activity.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/business\/2023\/05\/easset_upload_file54071_266184_e.png\" alt=\"\" width=\"247\" height=\"507\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/p>\n<p style=\"text-align: center;\">Clicking on the node to view more details, we see WSCRIPT.EXE&nbsp;was used to execute a Windows Script File, which spawned an instance of PS executing a Base64 encoded command.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/business\/2023\/05\/easset_upload_file70676_266184_e.png\" alt=\"\" width=\"254\" height=\"570\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/p>\n<p style=\"text-align: center;\">Node detail showing malicious encoded PowerShell script.<\/p>\n<p>This script was designed to be patient and stealthy.<\/p>\n<p>It first initiated a waiting period of 4 seconds before creating an array of URLs, presumably leading to malicious websites. The malware then attempted to download a file from each URL, with each file being checked for a minimum size of 100,000 bytes, implying a meaningful content requirement. If a download failed, the script would wait for 4 seconds before moving to the next URL.<\/p>\n<p>The downloaded files were executed using the <strong>RUNDLL32.EXE Windows utility, which was invoked from the PowerShell instance<\/strong>. This allowed the downloaded file, dubbed &#8220;<strong>FreeformOzarkite.marseillais<\/strong>,&#8221; to load and execute its malicious payload.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/business\/2023\/05\/easset_upload_file29101_266184_e.png\" alt=\"\" width=\"251\" height=\"528\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/p>\n<p style=\"text-align: center;\">RUNDLL32.EXE was invoked from the previous instance of PowerShell to execute a malicious payload or module that is stored in the file &#8220;FreeformOzarkite.marseillais&#8221; in the temporary folder of the infected user.&nbsp;<\/p>\n<h2>The Malicious DLL<\/h2>\n<p>A specific DLL file, identified as <strong>zibkwyxdtpcrqshpuqkoomcoba.dll<\/strong>, was found to be one of the malicious codes executed by the Qakbot infection.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/business\/2023\/05\/easset_upload_file13711_266184_e.png\" alt=\"\" width=\"250\" height=\"541\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/p>\n<p style=\"text-align: center;\">Node detail showing the&nbsp;malicious DLL is executed (zibkwyxdtpcrqshpuqkoomcoba.dll).<\/p>\n<p>Decomposition of this DLL revealed several nefarious functions, including:<\/p>\n<ul>\n<li>Code injection into other processes.<\/li>\n<li>Harvesting of sensitive data, like Chrome and Outlook passwords, Wi-Fi passwords, and Bitcoin wallets.<\/li>\n<li>Capturing screenshots.<\/li>\n<li>Modifying system settings, like disabling the User Account Control (UAC), to make the system more vulnerable to further attacks.<\/li>\n<li>Communication with a remote command and control (C&amp;C) server for data exfiltration and remote command execution.<\/li>\n<\/ul>\n<p>The team also saw&nbsp;system enumeration utilizing <strong>WHOAMI.EXE<\/strong> and <strong>IPCONFIG.EXE<\/strong>:<\/p>\n<ul>\n<li>whoami \/all<\/li>\n<li>ipconfig \/all<\/li>\n<\/ul>\n<h2>Data Exfiltration and Remediation<\/h2>\n<p>The malware attempted to send the collected data to a known Qakbot C2 IP address. This is presumably where the stolen data would be accumulated and analyzed by the malicious actors.<\/p>\n<p>However, the Malwarebytes MDR team promptly <strong>detected and contained this threat<\/strong>, taking steps such as cleaning&nbsp;the system of the infection, informing Company 1 of the incident, and providing actionable recommendations to prevent future compromises.<\/p>\n<h2>Threat hunting&nbsp;with MDR<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.malwarebytes.com\/blog\/business\/2023\/05\/easset_upload_file38670_266184_e.png\" alt=\"\" width=\"1400\" height=\"859\" style=\"display: block; margin-left: auto; margin-right: auto;\" \/><\/p>\n<p style=\"text-align: center;\">How Malwarebytes MDR works<\/p>\n<p>Threat hunting is essential for small-and-medium-sized businesses, as attackers can potentially remain undetected for over two weeks after compromising a network.<\/p>\n<p>Unfortunately, threat hunting is complicated and requires a dedicated SOC and seasoned cybersecurity staff, barring most SMBs from utilizing this important security practice.&nbsp;<\/p>\n<p>In this article, we&rsquo;ve outlined the significant role that <a href=\"https:\/\/www.malwarebytes.com\/business\/managed-detection-and-response\">Malwarebytes MDR<\/a> can play in<strong> uncovering, managing, and remediating threats like Qakbot<\/strong>,&nbsp;helping you&nbsp;avoid business disruption and financial loss.<\/p>\n<p>Want to learn more about Malwarebytes MDR and threat hunting? Click the link below for a quote.&nbsp;<\/p>\n<p style=\"text-align: center;\"><strong><span class=\"blue-cta-bttn\" style=\"color: #ffffff;\"><a href=\"https:\/\/try.malwarebytes.com\/mdr-consultation-new\/\" style=\"color: #ffffff;\">Stop Qbot attacks today<\/a><\/span><\/strong><\/p>\n<p><a href=\"https:\/\/www.malwarebytes.com\/blog\/business\/2023\/05\/tracking-down-a-trojan-an-inside-look-at-threat-hunting-in-a-corporate-network\" 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\/business\" rel=\"category tag\">Business<\/a><\/p>\n<p>How Malwarebytes MDR successfully helped a company detect and respond to the potent banking Trojan QBot.<\/p>\n<table width=\"100%\">\n<tr>\n<td align=\"right\">\n<p><b>(<a href=\"https:\/\/www.malwarebytes.com\/blog\/business\/2023\/05\/tracking-down-a-trojan-an-inside-look-at-threat-hunting-in-a-corporate-network\" title=\"Tracking down a trojan: An inside look at threat hunting in a corporate network\">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\/business\/2023\/05\/tracking-down-a-trojan-an-inside-look-at-threat-hunting-in-a-corporate-network\">Tracking down a trojan: An inside look at threat hunting in a corporate network<\/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":[1001],"class_list":["post-22094","post","type-post","status-publish","format-standard","hentry","category-malwarebytes","category-security","tag-business"],"_links":{"self":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/22094","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=22094"}],"version-history":[{"count":0,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/22094\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=22094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=22094"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=22094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}