DarkBit勒索软件分析

admin 2023年5月14日21:11:39评论27 views字数 4100阅读13分40秒阅读模式

样本来源:https://www.microsoft.com/en-us/security/blog/2023/04/07/mercury-and-dev-1084-destructive-attack-on-hybrid-environment/

"DEV-1084"的勒索载荷为8thCurse.exe,实际上是 DarkBit 勒索软件,由 Go 语言编写

基本信息

MD5:9880fae6551d1e9ee921f39751a6f3c0

DarkBit勒索软件分析

image-20230429140022731

分析

包含命令行参数

DarkBit勒索软件分析

image-20230510145611996

含义:

-all:在没有超时计数器的情况下运行
-domain string:定义域
-force:强制列入黑名单上
-list string:列表
-nomutex:强制不检查互斥体
-noransom:只传播/不加密
-password string:密码
-path string:路径
-t int:线程数(默认为-1)
-username string:用户名

文件中包含一个 json 配置文件

{
    "limits": [
  {
            "limitMB": 25,
            "parts": 1,
            "eachPart": -1
        },
        {
            "limitMB": 1000,
            "parts": 2,
            "eachPart": 12000
        },
        {
            "limitMB": 4000,
            "parts": 3,
            "eachPart": 10000
        },
        {
            "limitMB": 7000,
            "parts": 2,
            "eachPart": 20000
        },
        {
            "limitMB": 11000,
            "parts": 3,
            "eachPart": 30000
        },
        {
            "limitMB": 51000,
            "parts": 5,
            "eachPart": 30000
        },
        {
            "limitMB": 1000000,
            "parts": 3,
            "eachPart": 1000000
        },
        {
            "limitMB": 5000000,
            "parts": 5,
            "eachPart": 1000000
        },
        {
            "limitMB": 6000000,
            "parts": 20,
            "eachPart": 10000000
        }
    ],
    "extensions": {
        "msilog": 1,
        "log": 1,
        "ldf": 1,
        "lock": 1,
        "theme": 1,
        "msi": 1,
        "sys": 1,
        "wpx": 1,
        "cpl": 1,
        "adv": 1,
        "msc": 1,
        "scr": 1,
        "key": 1,
        "ico": 1,
        "dll": 1,
        "hta": 1,
        "deskthemepack": 1,
        "nomedia": 1,
        "msu": 1,
        "rtp": 1,
        "msp": 1,
        "idx": 1,
        "ani": 1,
        "386": 1,
        "diagcfg": 1,
        "bin": 1,
        "mod": 1,
        "ics": 1,
        "com": 1,
        "hlp": 1,
        "spl": 1,
        "nls": 1,
        "cab": 1,
        "diagpkg": 1,
        "icl": 1,
        "ocx": 1,
        "rom": 1,
        "prf": 1,
        "themepack": 1,
        "msstyles": 1,
        "icns": 1,
        "mpa": 1,
        "drv": 1,
        "cur": 1,
        "diagcab": 1,
        "exe": 1,
        "cmd": 1,
        "shs": 1,
        "Darkbit": 1
    }
,
    "names": {
        "thumbs.db": 1,
        "desktop.ini": 1,
        "darkbit.jpg": 1,
        "recovery_darkbit.txt": 1,
        "system volume information": 1
    },
    "processes": [],
 "hostnames": [
    //Technion - Israel Institute of Technology的主机名列表
 ]
}

json内容包括:文件大小限制:最小为25MB,最大为6GB,不同大小的文件被分成不同的部分,每个部分的大小也不相同。如 1000MB 到 4000MB 的大小的文件,被分为3部分,每部分大小不超过 10000 字节。DarkBit 会单独加密这些较小的部分中的每一个,而不是一次加密整个文件。文件扩展名限制:排除特定的文件扩展名。文件名和目录:排除特定的文件名和目录,如thumbs.db、recovery_darkbit.txt、system volume information等。进程限制:该json中未列出。主机名列表:其中包含 Technion - Israel Institute of Technology 不同学院和部门的主机。

利用 Go_Parser 解析 runtime 库,把生成map文件导入到 x64dbg 检测处理器是否为 intel 处理器

DarkBit勒索软件分析

image-20230429144150035

在 runtime_osinit 中, runtime_loadOptionalSyscalls 函数主要用于加载dll,如 advapi32.dll、rpcrt4.dll、cryptbase.dll 等,还通过 runtime_windowsFindfunc 函数来调用 GetProcAddress 函数加载动态 API

DarkBit勒索软件分析

image-20230513153602139

动态加载 SystemFunction036(与RtlGenRandom相同) 函数 用于生成随机密钥

DarkBit勒索软件分析

image-20230513150130749

动态加载 wine_get_version () 函数来检测当前环境是否是 Wine 模拟器环境

DarkBit勒索软件分析

image-20230513204022190

删除卷影所有的卷影副本

DarkBit勒索软件分析

image-20230510211248943
vssadmin.exe delete shadows /all /Quiet
/all 参数表示要删除所有的卷影副本,而不是仅删除某个特定的副本。
/Quiet 参数表示删除过程不需要用户进行任何交互操作,且不会显示任何提示信息。

遍历磁盘文件并加密

DarkBit勒索软件分析

image-20230513190441098

加密时,窗口会有一个倒计时

DarkBit勒索软件分析

image-20230513141500569

加密后的文件扩展名为.Darkbit,文件末尾存在密钥,同时在相应的文件中存在一个 RECOVERY_DARKBIT.txt 的勒索信

DarkBit勒索软件分析

image-20230513184011867

参考

https://www.microsoft.com/en-us/security/blog/2023/04/07/mercury-and-dev-1084-destructive-attack-on-hybrid-environment/ https://labs.k7computing.com/index.php/muddywater-back-with-darkbit/ https://securityaffairs.com/142160/hacking/israeli-technion-suffered-ransomware-attack.html) https://blog.cyble.com/2023/02/15/uncovering-the-dark-side-of-darkbit-ransomware/ https://evasions.checkpoint.com/techniques/processes.html https://www.yuque.com/p1ut0/qtmgyx/zmn5tp#In9F2

招新小广告

ChaMd5 Venom 招收大佬入圈

新成立组IOT+工控+样本分析 长期招新

欢迎联系[email protected]



DarkBit勒索软件分析

原文始发于微信公众号(ChaMd5安全团队):DarkBit勒索软件分析

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年5月14日21:11:39
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   DarkBit勒索软件分析https://cn-sec.com/archives/1731668.html

发表评论

匿名网友 填写信息