{"id":22674,"date":"2023-08-10T03:20:55","date_gmt":"2023-08-10T11:20:55","guid":{"rendered":"https:\/\/www.palada.net\/index.php\/2023\/08\/10\/news-16404\/"},"modified":"2023-08-10T03:20:55","modified_gmt":"2023-08-10T11:20:55","slug":"news-16404","status":"publish","type":"post","link":"https:\/\/www.palada.net\/index.php\/2023\/08\/10\/news-16404\/","title":{"rendered":"Attacker combines phone, email lures into believable, complex attack chain"},"content":{"rendered":"<p><strong>Credit to Author: Andrew Brandt| Date: Thu, 10 Aug 2023 10:00:10 +0000<\/strong><\/p>\n<div class=\"entry-content lg:prose-lg mx-auto prose max-w-4xl\">\n<p>[Editor&#8217;s note: The details of this investigation will be <a href=\"https:\/\/forum.defcon.org\/node\/245759\" target=\"_blank\" rel=\"noopener\">presented live at Defcon<\/a> on Friday, August 11 at noon in the <em>War Stories<\/em> track, in the Las Vegas Harrah&#8217;s conference center]<\/p>\n<p>In the course of performing a postmortem investigation of an infected computer, Sophos X-Ops discovered that the attack began with an innocent-sounding phone call. The caller prompted an employee of a Switzerland-based organization to initiate a complex attack chain that compromised the employee&#8217;s computer.<\/p>\n<p>Sophos Incident Response analysts found that the attackers may have targeted the call recipient personally, and crafted an elaborate social engineering attack chain that resulted in the attackers taking control of the target&#8217;s computer, briefly, before the target literally pulled the (ethernet) plug on the compromised computer. The alert employee sensed something was wrong, and disconnected the infected computer from the network, but not before the malicious payload was already at work.<\/p>\n<p>The caller, whose voice sounded like a middle-aged man, told the employee that he was a delivery driver with an urgent package destined for one of the company locations, but that nobody was there to receive the package, and he asked for a new delivery address at the employee&#8217;s office location. In order to redeliver the package, he continued, the employee would have to read aloud a code the shipping company would email.<\/p>\n<p>While the caller was still on the phone with the employee, the employee received an email message, purportedly from the caller\u2019s shipping company. The email message shown below (written in French) said that a PDF file attached to the message contained the code the delivery driver was waiting to hear before they could bring the package to the employee&#8217;s location.<\/p>\n<figure id=\"attachment_93211\" aria-describedby=\"caption-attachment-93211\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-93211\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image1-1.png\" alt=\"\" width=\"640\" height=\"303\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image1-1.png 1328w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image1-1.png?resize=300,142 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image1-1.png?resize=768,364 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image1-1.png?resize=1024,485 1024w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93211\" class=\"wp-caption-text\">From the phone to the payload, this attack relies on multiple layers of social engineering<\/figcaption><\/figure>\n<h3>Phishing message embeds graphical elements<\/h3>\n<p>The message body says that &#8220;your documents had been sent by a delivery service that hasn&#8217;t had contact with&#8221; the destination. It goes on to say that, for reasons of security, delivery isn&#8217;t possible unless the target provides the correct code to the shipper, and that the target can only get the code from the attached PDF.<\/p>\n<figure id=\"attachment_93212\" aria-describedby=\"caption-attachment-93212\" style=\"width: 514px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image2-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-93212\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image2-1.png\" alt=\"\" width=\"514\" height=\"721\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image2-1.png 514w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image2-1.png?resize=214,300 214w\" sizes=\"auto, (max-width: 514px) 100vw, 514px\" \/><\/a><figcaption id=\"caption-attachment-93212\" class=\"wp-caption-text\">The received message, in French<\/figcaption><\/figure>\n<p>The email also indicates the &#8220;shipment&#8221; is something that weighs about what a letter would weigh, and that it has &#8220;elevated (government agency)&#8221; priority.<\/p>\n<p>Despite the fact that the email message was written in the French language, technical clues left behind indicate the attackers knew the Swiss target might be a German speaker. Both are considered &#8220;official&#8221; Swiss languages. There are German-language comments embedded in the HTML (&#8220;Inhalt mit Bild links,&#8221; which translates either to &#8220;content with picture <em>links<\/em>&#8221; or &#8220;content with picture left&#8221;) that made up the email message body, which was sent to someone who used Outlook as their mail client.<\/p>\n<figure id=\"attachment_93214\" aria-describedby=\"caption-attachment-93214\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image3-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93214\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image3-1.png\" alt=\"\" width=\"640\" height=\"140\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image3-1.png 1388w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image3-1.png?resize=300,65 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image3-1.png?resize=768,168 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image3-1.png?resize=1024,224 1024w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93214\" class=\"wp-caption-text\">The source code of the email references &#8220;content with picture links&#8221;<\/figcaption><\/figure>\n<p>The curious email message triggered the attack chain that followed, but not in the way you might guess. There was no PDF attachment to the message, even though it appeared there was. Below is what the target saw in Outlook.<\/p>\n<figure id=\"attachment_93215\" aria-describedby=\"caption-attachment-93215\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image4-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93215\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image4-1.png\" alt=\"\" width=\"640\" height=\"459\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image4-1.png 794w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image4-1.png?resize=300,215 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image4-1.png?resize=768,551 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93215\" class=\"wp-caption-text\">The email with its \u201cPDF attachment\u201d&#8230;<\/figcaption><\/figure>\n<p>The employee saw what looked like an Outlook message with a PDF attachment, but it was actually a graphic embedded in the message body, designed to look just like an Outlook message with an email attachment: Both the &#8220;attachment&#8221; and the accompanying email message were just static images embedded in the message body.<\/p>\n<p>Instead, when the employee clicked where they thought an attachment appeared in the email (or if they clicked anywhere else), they triggered Outlook to visit a website.<\/p>\n<figure id=\"attachment_93216\" aria-describedby=\"caption-attachment-93216\" style=\"width: 448px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image5-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93216\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image5-1.png\" alt=\"\" width=\"448\" height=\"431\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image5-1.png 448w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image5-1.png?resize=300,289 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image5-1.png?resize=32,32 32w\" sizes=\"auto, (max-width: 448px) 100vw, 448px\" \/><\/a><figcaption id=\"caption-attachment-93216\" class=\"wp-caption-text\">\u2026isn\u2019t an attachment at all, as the tooltip shows.<\/figcaption><\/figure>\n<p>This attack mechanism struck our analysts as unusually complex &#8211; the phone call urging the target to click the email; the specially crafted email with no text in the body; the attacker-registered website with a customized &#8220;delivery&#8221; themed domain name used to host a file to download &#8211; but the complexity seemed to have purpose.<\/p>\n<p>For one thing, the fact there was no PDF attachment gives the attacker an advantage, since many email systems treat messages carrying such attachments with (appropriate) suspicion when they originate from unusual sources and would either delay the delivery of, or automatically filter, emails with PDF or other office-format attachments.<\/p>\n<p>For another, the attackers also didn&#8217;t link directly to the website they controlled hosting malicious code. Instead, they found a webpage redirection script, hosted on a benign website &#8212; one that was unlikely to raise suspicion &#8212; and linked to that, using the redirection script to navigate the employee&#8217;s browser to the malicious website.<\/p>\n<p>The following screenshot shows the HTML source code of the email message, including the link to the benign website (highlighted in green) and how its redirect sent users to the malicious website (highlighted in red).<\/p>\n<figure id=\"attachment_93217\" aria-describedby=\"caption-attachment-93217\" style=\"width: 812px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image6-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-93217\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image6-1.png\" alt=\"\" width=\"812\" height=\"464\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image6-1.png 1407w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image6-1.png?resize=300,172 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image6-1.png?resize=768,439 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image6-1.png?resize=1024,586 1024w\" sizes=\"auto, (max-width: 812px) 100vw, 812px\" \/><\/a><figcaption id=\"caption-attachment-93217\" class=\"wp-caption-text\">The email source, with the benign website (partially obfuscated, in green) and its redirect to the malicious website (in red)<\/figcaption><\/figure>\n<p>This redirection technique seems to be designed as a method of bypassing URL checking features. Some spam filters or firewalls that block malicious websites might query the URL reputation of the benign site hosting the redirection script &#8212; instead of the destination domain, <strong>safedelivery-company.com<\/strong>, registered and operated by the attackers and used to host malware. (This same attacker also appears to have used the domain <strong>aircourier-company.com <\/strong>at some point in the past.)<\/p>\n<h2>Missing information leave intriguing clues to attack<\/h2>\n<p>As we were brought in after the attack had taken place, and the attackers in this incident quickly cleaned up their mess, we only had limited information about what happened next.<\/p>\n<p>We know, for instance, that the attackers were successful at convincing the employee to click the &#8220;attachment&#8221; that opened a link in their browser. The link appears to have delivered malware that ran on the computer, because within a minute of the employee looking at the email, the attackers had begun executing commands on the employee&#8217;s computer.<\/p>\n<p>Logs retrieved from the compromised machine indicate, for instance, that an employee clicked the malicious link in the email at 11:16 in the morning, local time. They downloaded an executable file named <strong><em>sendung_N03012_16092022.com<\/em><\/strong> and apparently double-clicked it. As a result of that action, another program named <strong><em>SECURE DELIVERY SERVICE.EXE<\/em><\/strong> ran on the computer.<\/p>\n<p>At the time we performed the analysis, neither file remained on the infected computer&#8217;s storage, and the websites where the files were hosted no longer produced the files when requested. In fact, the websites were hosting a page with some &#8220;coming soon&#8221; language and a countdown timer that took up most of the page\u2019s real estate.<\/p>\n<figure id=\"attachment_93219\" aria-describedby=\"caption-attachment-93219\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image7-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93219\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image7-1.png\" alt=\"\" width=\"640\" height=\"337\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image7-1.png 1099w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image7-1.png?resize=300,158 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image7-1.png?resize=768,404 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image7-1.png?resize=1024,539 1024w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93219\" class=\"wp-caption-text\">When our IR team visited, the problematic site looked like this innocuous ReactJS template<\/figcaption><\/figure>\n<p>In fact, this is a behavior observed in other malware incidents. The countdown timer resets itself with a random days\/hours\/minutes value every time you reload the page. The code that runs this page is a ReactJS template called Deadline. The people using this haven&#8217;t even bothered to modify the template&#8217;s boilerplate <em>lorem ipsum<\/em> text block.<\/p>\n<h3>Recovered malicious scripts hidden in software license file<\/h3>\n<p>Over the next 15 minutes of the attack, the attacker downloaded and ran multiple PowerShell scripts, but they had deleted them by the time our analysts were able to look at the affected machines days later.<\/p>\n<p>In the course of looking for data the attackers may have modified or touched, we found traces of the scripts, but also discovered they had employed an unusual method to conceal them in plain sight.<\/p>\n<p>Among the files the attackers did not delete was a folder that contains the text editor Notepad++. The Notepad++ open-source project gives users the choice to download either an installer executable, or a &#8220;portable&#8221; version in a zip archive that contains all the files necessary to run the program. We found what appears to be a modified &#8220;portable&#8221; installation in the affected computer. The employee and the organization&#8217;s IT team confirmed that they neither use nor installed this software. Its appearance coincided with the attack.<\/p>\n<p>The folder contains everything that normally is included with the official &#8220;portable&#8221; download, but with a few notable changes: The Notepad++ executable and other executable components (notably, the program&#8217;s self-update utility) had been cryptographically signed using a now-revoked signing certificate originally issued to an organization called <strong>Cloud Accountants Limited<\/strong>, instead of the still-valid certificate issued to the Notepad++ organization.<\/p>\n<figure id=\"attachment_93220\" aria-describedby=\"caption-attachment-93220\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image8.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93220\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image8.png\" alt=\"\" width=\"640\" height=\"371\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image8.png 896w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image8.png?resize=300,174 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image8.png?resize=768,446 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93220\" class=\"wp-caption-text\">The legitimate Notepad++ (on the left) and the version abused by the attackers (on the right)<\/figcaption><\/figure>\n<p>We also found that the folder containing the self-updater in the malicious &#8220;portable Notepad++&#8221; folder contained 15 additional files not included with the legitimate portable installation zip.<\/p>\n<p>These additional files included a renamed copy of the legitimate DLL Windows uses to create Scheduled Tasks; an unsigned copy of the cURL library named libpurl.dll; \u00a0a Windows executable version of the (at least, in this case) <a href=\"https:\/\/www.redhat.com\/sysadmin\/getting-started-socat\">potentially unwanted Linux app, Socat<\/a>, whose developers describe it as &#8220;a relay for bidirectional data transfers between two independent data channels;&#8221; and the minimally required files necessary to open a connection to the Tor network, aka, the &#8220;dark web.&#8221;<\/p>\n<figure id=\"attachment_93221\" aria-describedby=\"caption-attachment-93221\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image9.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93221\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image9.png\" alt=\"\" width=\"640\" height=\"447\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image9.png 692w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image9.png?resize=300,209 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93221\" class=\"wp-caption-text\">The compromised version of Notepad++ has a variety of unwanted extras<\/figcaption><\/figure>\n<p>Like many open-source projects, Notepad++ is released under the GNU public software licensing scheme, which requires that developers include a plain text file with the terms of the license agreement. Notepad++ usually includes a plain text file named LICENSE. We also found a LICENSE file on this installation, but someone had appended a blob of base64-encoded data to the document. The normal copy of LICENSE is only 8kb in size; this LICENSE was 59kb larger than the original.<\/p>\n<figure id=\"attachment_93223\" aria-describedby=\"caption-attachment-93223\" style=\"width: 633px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image10.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93223\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image10.png\" alt=\"\" width=\"633\" height=\"538\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image10.png 633w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image10.png?resize=300,255 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/a><figcaption id=\"caption-attachment-93223\" class=\"wp-caption-text\">A blob of base64 garbage left in LICENSE<\/figcaption><\/figure>\n<p>When decoded, this base64 data blob outputs a PowerShell script that consists of three commands. Each command decodes another blob of base64-encoded data and uses the Invoke-Expression command to execute it.<\/p>\n<figure id=\"attachment_93224\" aria-describedby=\"caption-attachment-93224\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image11.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93224\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image11.png\" alt=\"\" width=\"640\" height=\"351\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image11.png 1175w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image11.png?resize=300,164 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image11.png?resize=768,421 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image11.png?resize=1024,561 1024w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93224\" class=\"wp-caption-text\">Additional \u201cgifts\u201d of the base64 blob<\/figcaption><\/figure>\n<p>When decoded, the three base64 blobs were three more PowerShell scripts. The first and second script are designed to install an untrusted Certificate Authority Root certificate into the certificate store in Windows, and in Firefox (if it is installed), respectively. (Firefox does not use the Windows certificate storage, but has its own.)<\/p>\n<figure id=\"attachment_93225\" aria-describedby=\"caption-attachment-93225\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image12.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93225\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image12.png\" alt=\"\" width=\"640\" height=\"128\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image12.png 911w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image12.png?resize=300,60 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image12.png?resize=768,153 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93225\" class=\"wp-caption-text\">First it inserts a certificate into Windows\u2019 certificate store, then Firefox<\/figcaption><\/figure>\n<p>The certificate appears to be crafted to mimic one issued by the legitimate certificate authority Comodo, but was not issued by them.<\/p>\n<figure id=\"attachment_93226\" aria-describedby=\"caption-attachment-93226\" style=\"width: 405px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image13.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93226\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image13.png\" alt=\"\" width=\"405\" height=\"483\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image13.png 405w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image13.png?resize=252,300 252w\" sizes=\"auto, (max-width: 405px) 100vw, 405px\" \/><\/a><figcaption id=\"caption-attachment-93226\" class=\"wp-caption-text\">Not a Comodo-issued Certificate Authority (CA) certificate<\/figcaption><\/figure>\n<p>The third script sets up a scheduled task that leverages two programs from the Notepad++ updater folder &#8211; GUP.exe and GUPP.exe &#8211; to phone home, once a day at midnight (local time), to one of five .onion addresses, randomly chosen from a hardcoded list also embedded in the script.<\/p>\n<figure id=\"attachment_93228\" aria-describedby=\"caption-attachment-93228\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image14.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93228\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image14.png\" alt=\"\" width=\"640\" height=\"254\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image14.png 657w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image14.png?resize=300,119 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93228\" class=\"wp-caption-text\">Phoning home (to one of five homes)<\/figcaption><\/figure>\n<p>While examining the logs for evidence, we found a fourth PowerShell script left behind (named <strong>ms.ps1<\/strong>) where the attackers failed to delete it. This script is a very generalized data collection tool designed to scrape the locations of sensitive data and, optionally, store it to <em>C:ProgramFilesmatches.txt<\/em> .<\/p>\n<figure id=\"attachment_93229\" aria-describedby=\"caption-attachment-93229\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image15.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93229\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image15.png\" alt=\"\" width=\"640\" height=\"416\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image15.png 841w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image15.png?resize=300,195 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image15.png?resize=768,500 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93229\" class=\"wp-caption-text\">A look into ms.ps1<\/figcaption><\/figure>\n<p>The script looks for system configuration information; accounting software data (such as QuickBooks files); password and cryptocurrency wallets; and the cookies, browsing history, and the list of installed browser plugins from every major web browser platform &#8212; Firefox, Opera, Edge, Brave, Chrome, Chromium, Vivaldi, and Tencent&#8217;s QQ Browser (mostly used in China).<\/p>\n<p>The script also contains an embedded list of 53 websites. It uses this list to hunt through the scraped browser history and cookie data and add information about which of those websites the browser had visited in the past to the matches.txt file. The target is based in Switzerland, which might explain why the website list included the Swiss-based online retailer Tutti, and 24 websites associated with cryptocurrency companies.<\/p>\n<figure id=\"attachment_93230\" aria-describedby=\"caption-attachment-93230\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image16.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93230\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image16.png\" alt=\"\" width=\"640\" height=\"132\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image16.png 899w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image16.png?resize=300,62 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image16.png?resize=768,158 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93230\" class=\"wp-caption-text\">Banks, crypto sites, and a little light shopping \u2013 the attackers want to know about the target\u2019s travels<\/figcaption><\/figure>\n<p>Cookie theft is <a href=\"https:\/\/news.sophos.com\/en-us\/2022\/08\/18\/cookie-stealing-the-new-perimeter-bypass\/\" target=\"_blank\" rel=\"noopener\">a growing trend<\/a> with <a href=\"https:\/\/news.sophos.com\/en-us\/2021\/08\/03\/trash-panda-as-a-service-raccoon-stealer-steals-cookies-cryptocoins-and-more\/\" target=\"_blank\" rel=\"noopener\">information stealing<\/a> malware, since some browser cookies can be as <a href=\"https:\/\/news.sophos.com\/en-us\/2023\/07\/20\/bad-ad-fad-leads-to-icedid-gozi-infections\/\" target=\"_blank\" rel=\"noopener\">useful for logging in<\/a> to a secure website as a password.<\/p>\n<p>What&#8217;s less clear is why this script includes 25 domains used by banks in the Australia and New Zealand region. But while researching this incident, analysts on the Managed Detection and Response team pointed me to incident notes about an attack against an Australian customer that they investigated in June, 2022.<\/p>\n<p>In the earlier incident, the target of the attack also recorded that a computer had visited URLs on two of the same malicious domains used in this incident &#8211; <strong>aircourier-company.com <\/strong>and<strong> carpoollk.com<\/strong> &#8211; and responders found several similar PowerShell scripts, including one that extracted information from the computer, and another that set up a scheduled task to invoke the same, revoked-certificate version of the Notepad++ updater utility discovered in this incident.<\/p>\n<h3>Installers found in public repositories<\/h3>\n<p>While searching open-source intelligence tools for files related to the collection of malicious files in the Notepad++ directory, we found several files &#8211; either zip archives, or installer applications &#8211; that contained a virtually identical Notepad++ program directory with the same modified, malicious updater and LICENSE file.<\/p>\n<p>One of the <a href=\"https:\/\/www.virustotal.com\/gui\/file\/d8ac4f43a5279e3aa33b2a743e17e1c59ba170c74965c45feca529fd8e817140\" target=\"_blank\" rel=\"noopener\">files that had been uploaded to VirusTotal<\/a> was an Electron app &#8211; basically, a set of JavaScript instructions designed to run inside a stripped-down version of the Chromium browser. Not only was this app&#8217;s filename (<a href=\"https:\/\/www.virustotal.com\/gui\/search\/name%253Adelivery_N03041_07042022.exe\" target=\"_blank\" rel=\"noopener\"><strong><em>delivery_N03041_07042022.exe<\/em><\/strong><\/a>) very similar to the one recorded in the logs in this incident(<strong><em>sendung_N03012_16092022.com<\/em><\/strong>) and one we serendipitously discovered from a third incident (<strong><em>envoi_N01670_24022022.exe<\/em><\/strong>), but the temporary directory it creates to store its running files includes the entire, identical Notepad++ program directory we discovered on the target&#8217;s computer.<\/p>\n<figure id=\"attachment_93232\" aria-describedby=\"caption-attachment-93232\" style=\"width: 496px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image17.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93232\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image17.png\" alt=\"\" width=\"496\" height=\"248\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image17.png 496w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image17.png?resize=300,150 300w\" sizes=\"auto, (max-width: 496px) 100vw, 496px\" \/><\/a><figcaption id=\"caption-attachment-93232\" class=\"wp-caption-text\">This looks familiar<\/figcaption><\/figure>\n<p>Thematically, the names are close enough to start to see a pattern. The Australian target received one with a name that begins with the word &#8220;delivery,&#8221; the target in a German-speaking part of the world received one named &#8220;sendung&#8221; (&#8220;shipment&#8221;) and a French speaking target received one named &#8220;envoi&#8221; (&#8220;dispatch&#8221;). The filenames also include a date that follows the same paradigm of <em>DDMMYYYY<\/em>.<\/p>\n<figure id=\"attachment_93233\" aria-describedby=\"caption-attachment-93233\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image18.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93233\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image18.png\" alt=\"\" width=\"640\" height=\"446\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image18.png 997w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image18.png?resize=300,209 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image18.png?resize=768,535 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93233\" class=\"wp-caption-text\">The deceptively chipper Electron app<\/figcaption><\/figure>\n<p>When executed, the Electron app unpacks the Chromium browser files into a temporary directory and launches a program called <strong>Universe Parcel Service.exe<\/strong>, which is just a renamed Chromium executable. The app displays a full-screen window centered around a button labeled &#8220;Show Information&#8221; with the text &#8220;Click on the button to see the Tracking Details&#8221; at the bottom of the page.<\/p>\n<p>When first executed, the app connects (in the background) to a web service that reports back the public IP address of the computer running the app, and then attempts to connect to a URL of a file hosted in Google Drive. While we captured the connection taking place, the code hosted on Google&#8217;s cloud apparently has been disabled and is not functional.<\/p>\n<figure id=\"attachment_93234\" aria-describedby=\"caption-attachment-93234\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image19.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93234\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image19.png\" alt=\"\" width=\"640\" height=\"39\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image19.png 728w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image19.png?resize=300,18 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93234\" class=\"wp-caption-text\">The Electron app making outbound communication to two IP addresses<\/figcaption><\/figure>\n<p>Clicking the &#8220;Show Information&#8221; button on the app causes the app to pause a few seconds, then display something that is supposed to look like a package tracking number on the screen. The number randomly generates every time you push the button.<\/p>\n<figure id=\"attachment_93235\" aria-describedby=\"caption-attachment-93235\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image20.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93235\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image20.png\" alt=\"\" width=\"640\" height=\"447\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image20.png 997w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image20.png?resize=300,209 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image20.png?resize=768,536 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93235\" class=\"wp-caption-text\">Oopsie<\/figcaption><\/figure>\n<p>Meanwhile, in the background, the scripts embedded in the Notepad++ LICENSE file begin to run, and the script invokes the Socat utility to open multiple connections to Tor, listening on a variety of high port numbers for inbound traffic.<\/p>\n<figure id=\"attachment_93236\" aria-describedby=\"caption-attachment-93236\" style=\"width: 765px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image21.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-93236\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image21.png\" alt=\"\" width=\"765\" height=\"116\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image21.png 941w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image21.png?resize=300,46 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image21.png?resize=768,117 768w\" sizes=\"auto, (max-width: 765px) 100vw, 765px\" \/><\/a><figcaption id=\"caption-attachment-93236\" class=\"wp-caption-text\">Socat methodically doing its thing, opening Tor connections<\/figcaption><\/figure>\n<p>The Notepad++ executables in the archive on VirusTotal were <a href=\"https:\/\/www.virustotal.com\/gui\/search\/signature%253A7785EF0E7CF11EE5270CA136567988BAD63B0001\/files\" target=\"_blank\" rel=\"noopener\">signed with the same revoked certificate<\/a> used to sign the executables we recovered during the postmortem investigation. Upon closer examination, the content of the decoded scripts originating with the modified LICENSE file found in the VirusTotal sample closely resembled those we recovered from the infected computer. Only the variable names and .onion dark web addresses were changed; the scripts otherwise contained identical instructions.<\/p>\n<figure id=\"attachment_93237\" aria-describedby=\"caption-attachment-93237\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image22.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-93237\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image22.png\" alt=\"\" width=\"640\" height=\"340\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image22.png 1243w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image22.png?resize=300,159 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image22.png?resize=768,408 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/image22.png?resize=1024,544 1024w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-93237\" class=\"wp-caption-text\">Suffering succotash: suspiciously similar scripts<\/figcaption><\/figure>\n<p>Notably, these scripts from outside sources contained <a href=\"https:\/\/www.virustotal.com\/gui\/file\/301b2b0c6eef71a33312207abf6c4b7f0fd703a988529a9cd457a412eb9f9992\">the same, fake Comodo CA certificate<\/a> found embedded in the scripts on the machine we examined.<\/p>\n<p>Surveillance may be one reason why an attacker would want to install a CA certificate into the system certificate storage: Doing so makes it possible for an attacker to perform a machine-in-the-middle attack and capture the decrypted content of an HTTPS browsing session.<\/p>\n<h2>Guidance for anyone who still answers their phone<\/h2>\n<p>The employee, watching what was happening on their computer in real time, took the initiative and physically disconnected the affected machine from the network by pulling out the network cable. This left the machine infected but unable to contact or be reached by the attackers, which proved to be potentially an enterprise-saving move, halting the progress of the attack mid-stream. The employee who did this deserves a commendation for their quick thinking, because the attack could have been a lot worse.<\/p>\n<p>The elements of this attack were well-planned and coordinated in advance, involving a human who made a voice telephone call and possibly one or more other people who had built out a variety of malicious Windows Scripting Host and PowerShell scripts, plus the Electron app that delivered and ran them. It&#8217;s worth noting that actual voice telephone calls can be part of the social engineering aspect of an attack and, in this case, was used to good effect by the threat actors.<\/p>\n<p>We often give advice about not opening links or attachments sent over email from unfamiliar persons; we don&#8217;t usually caution people to be suspicious about those same emails when someone calls you on the phone to tell you to expect the email&#8217;s arrival. But if you don&#8217;t know the person who&#8217;s calling, it&#8217;s fair to say that treating such calls with suspicion is a good defensive measure.<\/p>\n<h3>Detections and acknowledgments<\/h3>\n<p>Sophos X-Ops wishes to thank Incident Response analysts Aaron Short, Bill Kearney, and Ollie Jones for their work on the incident. PowerShell scripts like the ones found in this incident will trigger a detection of <strong>Troj\/PSDL-OM<\/strong> or <strong>Troj\/PS-KH<\/strong> in Sophos endpoint products. <a href=\"https:\/\/github.com\/sophoslabs\/IoCs\/blob\/master\/IOC_imagespam.csv\" target=\"_blank\" rel=\"noopener\">Indicators of compromise for files in this investigation<\/a> are listed on the <a href=\"https:\/\/github.com\/sophoslabs\/IoCs\" target=\"_blank\" rel=\"noopener\">SophosLabs GitHub<\/a>.<\/p>\n<\/p><\/div>\n<p><a href=\"https:\/\/news.sophos.com\/en-us\/2023\/08\/10\/image-spam-attack\/\" target=\"bwo\" >http:\/\/feeds.feedburner.com\/sophos\/dgdY<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/08\/Image-spam-featured-image.png\"\/><\/p>\n<p><strong>Credit to Author: Andrew Brandt| Date: Thu, 10 Aug 2023 10:00:10 +0000<\/strong><\/p>\n<p>A social engineering phone call lends authenticity to the attacker&#8217;s malicious email<\/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":[10378,10377],"tags":[13346,27291,129,29948,29949,29950,10510,27030,16771,10618,29951],"class_list":["post-22674","post","type-post","status-publish","format-standard","hentry","category-security","category-sophos","tag-defcon","tag-electron","tag-featured","tag-image-spam","tag-notepad","tag-socat","tag-social-engineering","tag-sophos-x-ops","tag-threat-research","tag-tor","tag-war-stories"],"_links":{"self":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/22674","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=22674"}],"version-history":[{"count":0,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/22674\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=22674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=22674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=22674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}