{"id":20693,"date":"2022-11-30T05:21:22","date_gmt":"2022-11-30T13:21:22","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2022\/11\/30\/news-14426\/"},"modified":"2022-11-30T05:21:22","modified_gmt":"2022-11-30T13:21:22","slug":"news-14426","status":"publish","type":"post","link":"https:\/\/www.palada.net\/index.php\/2022\/11\/30\/news-14426\/","title":{"rendered":"LockBit 3.0 &#8216;Black&#8217; attacks and leaks reveal wormable capabilities and tooling"},"content":{"rendered":"<p><strong>Credit to Author: Andrew Brandt| Date: Wed, 30 Nov 2022 12:00:17 +0000<\/strong><\/p>\n<div class=\"entry-content lg:prose-lg mx-auto prose max-w-4xl\">\n<p>A postmortem analysis of multiple incidents in which attackers eventually launched the latest version of LockBit ransomware (known variously as <a href=\"https:\/\/twitter.com\/vxunderground\/status\/1541156954214727685\">LockBit 3.0<\/a> or \u2018LockBit Black\u2019), revealed the tooling used by at least one affiliate. Sophos&#8217; Managed Detection and Response (MDR) team has observed both ransomware affiliates and legitimate penetration testers use the same collection of tooling over the past 3 months.<\/p>\n<p><a href=\"https:\/\/twitter.com\/vxunderground\/status\/1528801206923141122\">Leaked data about LockBit<\/a> that showed the backend controls for the ransomware also seems to indicate that the creators have begun experimenting with the use of scripting that would allow the malware to &#8220;self-spread&#8221; using Windows Group Policy Objects (GPO) or the tool PSExec, potentially making it easier for the malware to laterally move and infect computers without the need for affiliates to know how to take advantage of these features for themselves, potentially speeding up the time it takes them to deploy the ransomware and encrypt targets.<\/p>\n<p>A reverse-engineering analysis of the LockBit functionality shows that the ransomware has carried over most of its functionality from LockBit 2.0 and adopted new behaviors that make it more difficult to analyze by researchers. For instance, in some cases it now requires the affiliate to use a 32-character &#8216;password&#8217; in the command line of the ransomware binary when launched, or else it won&#8217;t run, though not all the samples we looked at required the password.<\/p>\n<p>We also observed that the ransomware runs with <em>LocalServiceNetworkRestricted<\/em> permissions, so it does not need full Administrator-level access to do its damage (supporting observations of the malware made by other researchers).<\/p>\n<p>Most notably, we&#8217;ve observed (along with other researchers) that many LockBit 3.0 features and subroutines appear to have been lifted directly from BlackMatter ransomware.<\/p>\n<h3>Is LockBit 3.0 just &#8216;improved&#8217; BlackMatter?<\/h3>\n<p><a href=\"https:\/\/blog.cluster25.duskrise.com\/2022\/07\/06\/lockbit-3-0-making-the-ransomware-great-again\">Other researchers<\/a> previously noted that LockBit 3.0 appears to have adopted (or heavily borrowed) several concepts and techniques from the BlackMatter ransomware family.<\/p>\n<p>We dug into this ourselves, and found a number of similarities which strongly suggest that LockBit 3.0 reuses code from BlackMatter.<\/p>\n<h4>Anti-debugging trick<\/h4>\n<p>Blackmatter and Lockbit 3.0 use a specific trick to conceal their internal functions calls from researchers. In both cases, the ransomware loads\/resolves a Windows DLL from its hash tables, which are based on ROT13.<\/p>\n<p>It will try to get pointers from the functions it needs by searching the PEB (Process Environment Block) of the module. It will then look for a specific binary data marker in the code (0xABABABAB) at the end of the heap; if it finds this marker, it means someone is debugging the code, and it doesn&#8217;t save the pointer, so the ransomware quits.<\/p>\n<p>After these checks, it will create a special stub for each API it requires. There are five different types of stubs that can be created (randomly). Each stub is a small piece of shellcode that performs API hash resolution on the fly and jumps to the API address in memory. This adds some difficulties while reversing using a debugger.<\/p>\n<figure id=\"attachment_88350\" aria-describedby=\"caption-attachment-88350\" style=\"width: 661px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image1-2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88350\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image1-2.png\" alt=\"Screenshot of disassembler code\" width=\"661\" height=\"706\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image1-2.png 1026w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image1-2.png?resize=281,300 281w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image1-2.png?resize=768,820 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image1-2.png?resize=959,1024 959w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/a><figcaption id=\"caption-attachment-88350\" class=\"wp-caption-text\">LockBit\u2019s 0xABABABAB marker<\/figcaption><\/figure>\n<p>SophosLabs has put together <a href=\"https:\/\/gchq.github.io\/CyberChef\/#recipe=Disassemble_x86('32','Full%20x86%20architecture',16,0,true,true)&amp;input=QjggNDQ4M2Y2NjAKQzFDMCAwNApGRkUw\">a CyberChef recipe for decoding<\/a> these stub shellcode snippets.<\/p>\n<figure id=\"attachment_88351\" aria-describedby=\"caption-attachment-88351\" style=\"width: 613px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image2-2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88351\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image2-2.png\" alt=\"Output of a CyberChef recipe\" width=\"613\" height=\"411\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image2-2.png 1180w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image2-2.png?resize=300,201 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image2-2.png?resize=768,515 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image2-2.png?resize=1024,686 1024w\" sizes=\"auto, (max-width: 613px) 100vw, 613px\" \/><\/a><figcaption id=\"caption-attachment-88351\" class=\"wp-caption-text\">The first stub, as an example (decoded with <a href=\"https:\/\/gchq.github.io\/CyberChef\/#recipe=Disassemble_x86('32','Full%20x86%20architecture',16,0,true,true)&amp;input=QjggNDQ4M2Y2NjAKQzFDMCAwNApGRkUw\">CyberChef<\/a>)<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<h4>Obfuscation of strings<\/h4>\n<p>Many strings in both LockBit 3.0 and BlackMatter are obfuscated, resolved during runtime by pushing the obfuscated strings on to the stack and decrypting with an XOR function. In both LockBit and BlackMatter, the code to achieve this is very similar.<\/p>\n<figure id=\"attachment_88352\" aria-describedby=\"caption-attachment-88352\" style=\"width: 625px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image3-2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88352 size-full\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image3-2.png\" alt=\"Screenshot of disassembler code\" width=\"625\" height=\"346\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image3-2.png 625w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image3-2.png?resize=300,166 300w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><figcaption id=\"caption-attachment-88352\" class=\"wp-caption-text\">BlackMatter\u2019s string obfuscation (image credit: <a href=\"https:\/\/chuongdong.com\/reverse%20engineering\/2021\/09\/05\/BlackMatterRansomware\/\">Chuong Dong<\/a>)<\/figcaption><\/figure>\n<p>Georgia Tech student <a href=\"https:\/\/chuongdong.com\/reverse engineering\/2021\/09\/05\/BlackMatterRansomware\/\">Chuong Dong<\/a> analyzed BlackMatter and showed this feature on his blog, with the screenshot above.<\/p>\n<figure id=\"attachment_88353\" aria-describedby=\"caption-attachment-88353\" style=\"width: 613px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image4-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88353\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image4-1.png\" alt=\"Screenshot of disassembler code\" width=\"613\" height=\"376\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image4-1.png 870w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image4-1.png?resize=300,184 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image4-1.png?resize=768,471 768w\" sizes=\"auto, (max-width: 613px) 100vw, 613px\" \/><\/a><figcaption id=\"caption-attachment-88353\" class=\"wp-caption-text\">LockBit\u2019s string obfuscation, in comparison<\/figcaption><\/figure>\n<p>By comparison, LockBit 3.0 has adopted a string obfuscation method that looks and works in a very similar fashion to BlackMatter&#8217;s function.<\/p>\n<h4>API resolution<\/h4>\n<p>LockBit uses exactly the same implementation as BlackMatter to resolve API calls, with one exception: LockBit adds an extra step in an attempt to conceal the function from debuggers.<\/p>\n<figure id=\"attachment_88354\" aria-describedby=\"caption-attachment-88354\" style=\"width: 599px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image5-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88354 size-full\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image5-1.png\" alt=\"Screenshot of disassembler code\" width=\"599\" height=\"548\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image5-1.png 599w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image5-1.png?resize=300,274 300w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><\/a><figcaption id=\"caption-attachment-88354\" class=\"wp-caption-text\">BlackMatter\u2019s dynamic API resolution (image credit: <a href=\"https:\/\/chuongdong.com\/reverse%20engineering\/2021\/09\/05\/BlackMatterRansomware\/\">Chuong Dong<\/a>)<\/figcaption><\/figure>\n<p>The array of calls performs precisely the same function in LockBit 3.0<i>.<\/i><\/p>\n<figure id=\"attachment_88355\" aria-describedby=\"caption-attachment-88355\" style=\"width: 631px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image6-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88355\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image6-1.png\" alt=\"Screenshot of disassembler code\" width=\"631\" height=\"446\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image6-1.png 1456w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image6-1.png?resize=300,212 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image6-1.png?resize=768,542 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image6-1.png?resize=1024,723 1024w\" sizes=\"auto, (max-width: 631px) 100vw, 631px\" \/><\/a><figcaption id=\"caption-attachment-88355\" class=\"wp-caption-text\">LockBit\u2019s dynamic API resolution<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<h4>Hiding threads<\/h4>\n<p>Both LockBit and BlackMatter hide threads using the <em>NtSetInformationThread<\/em> function, with the parameter <em>ThreadHideFromDebugger<\/em>. As you probably can guess, this means that the debugger doesn&#8217;t receive events related to this thread.<\/p>\n<figure id=\"attachment_88356\" aria-describedby=\"caption-attachment-88356\" style=\"width: 629px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image7-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88356\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image7-1.png\" alt=\"Screenshot of disassembler code\" width=\"629\" height=\"227\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image7-1.png 906w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image7-1.png?resize=300,108 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image7-1.png?resize=768,277 768w\" sizes=\"auto, (max-width: 629px) 100vw, 629px\" \/><\/a><figcaption id=\"caption-attachment-88356\" class=\"wp-caption-text\">LockBit employs the same ThreadHideFromDebugger feature as an evasion technique<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<h4>Printing<\/h4>\n<p>LockBit, like BlackMatter, sends ransom notes to available printers.<\/p>\n<figure id=\"attachment_88357\" aria-describedby=\"caption-attachment-88357\" style=\"width: 624px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image8-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88357\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image8-1.png\" alt=\"Screenshot of disassembler code\" width=\"624\" height=\"261\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image8-1.png 880w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image8-1.png?resize=300,125 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image8-1.png?resize=768,321 768w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/a><figcaption id=\"caption-attachment-88357\" class=\"wp-caption-text\">LockBit can send its ransom notes directly to printers, as BlackMatter can do<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<h4>Deletion of shadow copies<\/h4>\n<p>Both ransomware will sabotage the infected computer&#8217;s ability to recover from file encryption by deleting the Volume Shadow Copy files.<\/p>\n<p>LockBit calls the<em> IWbemLocator::ConnectServer<\/em> method to connect with the local ROOTCIMV2 namespace and obtain the pointer to an IWbemServices object that eventually calls <em>IWbemServices::ExecQuery<\/em> to execute the WQL query.<\/p>\n<figure id=\"attachment_88358\" aria-describedby=\"caption-attachment-88358\" style=\"width: 629px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image9-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88358\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image9-1.png\" alt=\"Screenshot of disassembler code\" width=\"629\" height=\"338\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image9-1.png 966w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image9-1.png?resize=300,161 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image9-1.png?resize=768,413 768w\" sizes=\"auto, (max-width: 629px) 100vw, 629px\" \/><\/a><figcaption id=\"caption-attachment-88358\" class=\"wp-caption-text\">BlackMatter code for deleting shadow copies (image credit: <a href=\"https:\/\/chuongdong.com\/reverse%20engineering\/2021\/09\/05\/BlackMatterRansomware\/\">Chuong Dong<\/a>)<\/figcaption><\/figure>\n<p>LockBit&#8217;s method of doing this is identical to BlackMatter\u2019s implementation, except that it adds a bit of string obfuscation to the subroutine.<\/p>\n<figure id=\"attachment_88359\" aria-describedby=\"caption-attachment-88359\" style=\"width: 665px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image10-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88359\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image10-1.png\" alt=\"Screenshot of disassembler code\" width=\"665\" height=\"476\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image10-1.png 1432w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image10-1.png?resize=300,215 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image10-1.png?resize=768,550 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image10-1.png?resize=1024,733 1024w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/a><figcaption id=\"caption-attachment-88359\" class=\"wp-caption-text\">LockBit\u2019s deletion of shadow copies<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<h4>Enumerating DNS hostnames<\/h4>\n<p>Both LockBit and BlackMatter enumerate hostnames on the network by calling <em>NetShareEnum<\/em>.<\/p>\n<figure id=\"attachment_88360\" aria-describedby=\"caption-attachment-88360\" style=\"width: 631px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image11-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88360\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image11-1.png\" alt=\"Screenshot of disassembler code\" width=\"631\" height=\"324\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image11-1.png 988w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image11-1.png?resize=300,154 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image11-1.png?resize=768,394 768w\" sizes=\"auto, (max-width: 631px) 100vw, 631px\" \/><\/a><figcaption id=\"caption-attachment-88360\" class=\"wp-caption-text\">BlackMatter calls NetShareEnum() to enumerate hostnames\u2026 (image credit: <a href=\"https:\/\/chuongdong.com\/reverse%20engineering\/2021\/09\/05\/BlackMatterRansomware\/\">Chuong Dong<\/a>)<\/figcaption><\/figure>\n<p>In the source code for LockBit, the function looks like it has been copied, verbatim, from BlackMatter.<\/p>\n<figure id=\"attachment_88361\" aria-describedby=\"caption-attachment-88361\" style=\"width: 637px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image12-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88361\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image12-1.png\" alt=\"Screenshot of disassembler code\" width=\"637\" height=\"280\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image12-1.png 1283w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image12-1.png?resize=300,132 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image12-1.png?resize=768,338 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image12-1.png?resize=1024,450 1024w\" sizes=\"auto, (max-width: 637px) 100vw, 637px\" \/><\/a><figcaption id=\"caption-attachment-88361\" class=\"wp-caption-text\">\u2026as does LockBit<\/figcaption><\/figure>\n<h4>Determining the operating system version<\/h4>\n<p>Both ransomware strains use identical code to check the OS version \u2013 even using the same return codes (although this is a natural choice, since the return codes are hexadecimal representations of the version number).<\/p>\n<figure style=\"width: 633px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image13-1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88362\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image13-1.png\" alt=\"Screenshot of disassembler code\" width=\"633\" height=\"481\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image13-1.png 793w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image13-1.png?resize=300,228 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image13-1.png?resize=768,584 768w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/a><figcaption class=\"wp-caption-text\">BlackMatter\u2019s code for checking the OS version (image credit: <a href=\"https:\/\/chuongdong.com\/reverse%20engineering\/2021\/09\/05\/BlackMatterRansomware\/\">Chuong Dong<\/a>)<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_88363\" aria-describedby=\"caption-attachment-88363\" style=\"width: 631px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image14.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88363\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image14.png\" alt=\"Screenshot of disassembler code\" width=\"631\" height=\"497\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image14.png 925w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image14.png?resize=300,236 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image14.png?resize=768,605 768w\" sizes=\"auto, (max-width: 631px) 100vw, 631px\" \/><\/a><figcaption id=\"caption-attachment-88363\" class=\"wp-caption-text\">LockBit\u2019s OS enumeration routine<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<h4>Configuration<\/h4>\n<p>Both ransomware contain embedded configuration data inside their binary executables. W<span style=\"font-size: 1em\">e noted that LockBit decodes its config in a similar way to BlackMatter, albeit with some small differences. <\/span><\/p>\n<p><span style=\"font-size: 1em\">For instance, BlackMatter saves its configuration in the <strong>.rsrc<\/strong> section, whereas LockBit stores it in <strong>.pdata<\/strong>.\u00a0<\/span><\/p>\n<figure id=\"attachment_88364\" aria-describedby=\"caption-attachment-88364\" style=\"width: 632px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image15.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88364\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image15.png\" alt=\"Screenshot of disassembler code\" width=\"632\" height=\"364\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image15.png 873w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image15.png?resize=300,173 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image15.png?resize=768,443 768w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><\/a><figcaption id=\"caption-attachment-88364\" class=\"wp-caption-text\">BlackMatter\u2019s config decryption routine (image credit: <a href=\"https:\/\/chuongdong.com\/reverse%20engineering\/2021\/09\/05\/BlackMatterRansomware\/\">Chuong Dong<\/a>)<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 1em\">And LockBit uses a different linear congruential generator (LCG) algorithm for decoding.<\/span><\/p>\n<figure id=\"attachment_88365\" aria-describedby=\"caption-attachment-88365\" style=\"width: 630px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image16.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-88365\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image16.png\" alt=\"Screenshot of disassembler code\" width=\"630\" height=\"288\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image16.png 1266w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image16.png?resize=300,137 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image16.png?resize=768,351 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/11\/image16.png?resize=1024,468 1024w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/a><figcaption id=\"caption-attachment-88365\" class=\"wp-caption-text\">LockBit\u2019s config decryption routine<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/blog.cluster25.duskrise.com\/2022\/07\/06\/lockbit-3-0-making-the-ransomware-great-again\">Some researchers have speculated<\/a> that the close relationship between the LockBit and BlackMatter code indicates that one or more of BlackMatter&#8217;s coders were recruited by LockBit; that LockBit bought the BlackMatter codebase; or a collaboration between developers. As we noted in <a href=\"https:\/\/assets.sophos.com\/X24WTUEQ\/at\/q6r6n3x43mnrfchn5tfh3qmw\/sophos-x-ops-active-adversary-multiple-attackers-wp.pdf\">our white paper on multiple attackers<\/a> earlier this year, it\u2019s not uncommon for ransomware groups to interact, either inadvertently or deliberately.<\/p>\n<p>Either way, these findings are further evidence that the ransomware ecosystem is complex, and fluid. Groups reuse, borrow, or steal each other\u2019s ideas, code, and tactics as it suits them. And, as the LockBit 3.0 leak site (containing, among other things, a bug bounty and a reward for \u201cbrilliant ideas\u201d) suggests, that gang in particular is not averse to paying for innovation.<\/p>\n<h3>LockBit tooling mimics what legitimate pentesters would use<\/h3>\n<p>Another aspect of the way LockBit 3.0&#8217;s affiliates are deploying the ransomware shows that they&#8217;re becoming very difficult to distinguish from the work of a legitimate penetration tester &#8211; aside from the fact that legitimate penetration testers, of course, have been contracted by the targeted company beforehand, and are legally allowed to perform the pentest.<\/p>\n<p>The tooling we observed the attackers using included a package from GitHub called <a href=\"https:\/\/github.com\/Yaxser\/Backstab\">Backstab<\/a>. The primary function of Backstab is, as the name implies, to sabotage the tooling that analysts in security operations centers use to monitor for suspicious activity in real time. The utility uses Microsoft&#8217;s own Process Explorer driver (signed by Microsoft) to terminate protected anti-malware processes and disable EDR utilities. Both Sophos and other researchers have observed <a href=\"https:\/\/blogs.blackberry.com\/en\/2022\/08\/lockbit-3-0-ransomware-abuses-windows-defender-to-load-cobalt-strike\">LockBit attackers using Cobalt Strike<\/a>, which has become a nearly ubiquitous attack tool among ransomware threat actors, and directly manipulating Windows Defender to evade detection.<\/p>\n<p>Further complicating the parentage of LockBit 3.0 is the fact that we also encountered attackers using a password-locked variant of the ransomware, called <strong>lbb_pass.exe<\/strong> , which has also been used by attackers that deploy REvil ransomware. This may suggest that there are threat actors affiliated with both groups, or that threat actors not affiliated with LockBit have taken advantage of the leaked LockBit 3.0 builder. At least one group, BlooDy, has reportedly used the builder, and <a href=\"https:\/\/therecord.media\/builder-for-babuk-locker-ransomware-leaked-online\/\">if history is anything to go by<\/a>, more may follow suit.<\/p>\n<p>LockBit 3.0 attackers also used a number of publicly-available tools and utilities that are now commonplace among ransomware threat actors, including the anti-hooking utility GMER, a tool called AV Remover published by antimalware company ESET, and a number of PowerShell scripts designed to remove Sophos products from computers where Tamper Protection has either never been enabled, or has been disabled by the attackers after they obtained the credentials to the organization&#8217;s management console.<\/p>\n<p>We also saw evidence the attackers used a tool called <a href=\"https:\/\/github.com\/hegusung\/netscan\">Netscan<\/a> to probe the target&#8217;s network, and of course, the ubiquitous password-sniffer Mimikatz.<\/p>\n<h3>Incident response makes no distinction<\/h3>\n<p>Because these utilities are in widespread use, MDR and Rapid Response treats them all equally &#8211; as though an attack is underway &#8211; and immediately alerts the targets when they&#8217;re detected.<\/p>\n<p>We found the attackers took advantage of less-than-ideal security measures in place on the targeted networks. As we mentioned in our Active Adversaries Report on multiple ransomware attackers, the lack of multifactor authentication (MFA) on critical internal logins (such as management consoles) permits an intruder to use tooling that can sniff or keystroke-capture administrators&#8217; passwords and then gain access to that management console.<\/p>\n<p>It&#8217;s safe to assume that experienced threat actors are at least as familiar with Sophos Central and other console tools as the legitimate users of those consoles, and they know exactly where to go to weaken or disable the endpoint protection software. In fact, in at least one incident involving a LockBit threat actor, we observed them downloading files which, from their names, appeared to be intended to remove Sophos protection: <strong>sophoscentralremoval-master.zip<\/strong> and <strong>sophos-removal-tool-master.zip<\/strong>. So protecting those admin logins is among the most critically important steps admins can take to defend their networks.<\/p>\n<p>For a list of IOCs associated with LockBit 3.0, please see <a href=\"https:\/\/github.com\/sophoslabs\/IoCs\/blob\/master\/Ransomware-Lockbit3-IOCs.csv\">our GitHub<\/a>.<\/p>\n<h3>Acknowledgments<\/h3>\n<p>Sophos X-Ops acknowledges the collaboration of Colin Cowie, Gabor Szappanos, Alex Vermaning, and Steeve Gaudreault in producing this report.<\/p>\n<\/p><\/div>\n<p><a href=\"https:\/\/news.sophos.com\/en-us\/2022\/11\/30\/lockbit-blackmatter\/\" 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\/2022\/11\/shutterstock_1813101946.jpg\"\/><\/p>\n<p><strong>Credit to Author: Andrew Brandt| Date: Wed, 30 Nov 2022 12:00:17 +0000<\/strong><\/p>\n<p>Reverse-engineering reveals close similarities to BlackMatter ransomware, with some improvements<\/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":[28023,24646,129,24616,28024,3765,27030,16771],"class_list":["post-20693","post","type-post","status-publish","format-standard","hentry","category-security","category-sophos","tag-0xabababab","tag-blackmatter","tag-featured","tag-lockbit","tag-lockbit-black","tag-ransomware","tag-sophos-x-ops","tag-threat-research"],"_links":{"self":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/20693","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=20693"}],"version-history":[{"count":0,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/20693\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=20693"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=20693"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=20693"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}