# 靶场背景

你是一名威胁情报分析师。一个 APT 组织正在利用以 "朝觐(Hajj)" 为主题的钓鱼诱饵,定向攻击政府和外交官员,窃取 WhatsApp 数据。你的团队从多家安全厂商的公开报告、博客文章和内部安全告警中收集了碎片化的情报。你的任务是构建该威胁组织的完整画像,将不同报告之间的线索串联起来,回答关于他们身份、工具和动机的问题。

本次 Sherlock 来自 Hack The Box,作者是 profzzor,提供了三篇证据来源:

  • Evidence 1Kaspersky SecureList: Mysterious Elephant APT: TTPs and tools
  • Evidence 2Knownsec 404: APT-K-47 "Mysterious Elephant", a new APT organization in South Asia
  • Evidence 3Knownsec 404: Unveiling the Past and Present of APT-K-47 Weapon: Asyncshell

# Task 1 — APT 组织的主要名称

Q:What is the primary name of the APT group described in the SecureList report?

A: Mysterious Elephant

详细过程:

这道题是所有威胁情报分析的起点 —— 确定你在追踪的是谁。

打开 Evidence 1(SecureList 文章),标题和全文内容都很明确。Kaspersky GReAT 团队将这组攻击活动命名为 Mysterious Elephant。文章的第一段就给出了定义:

Mysterious Elephant is a highly active advanced persistent threat (APT) group that we at Kaspersky GReAT discovered in 2023.

Knownsec 404 团队的 Evidence 2 中也提到了同样的映射关系:Kaspersky 在 2023 年第二季度发现了这个新 APT 组织,并将其命名为 "Mysterious Elephant",而 Knownsec 404 团队用内部编号 APT-K-47 来追踪它,中文名称为 "神秘象"。


# Task 2 — 攻击活动可追溯的最早年份

Q:According to the Knownsec 404 team's analysis (Evidence-3), since which year has this group's attack activity been dated back to?

A: 2022

详细过程:

Evidence 3(Asyncshell 文章)在概述部分明确交代了活动时间线:

APT-K-47, also known as Mysterious Elephant, was the first APT organization to disclose details of its activities by the Knownsec 404 Advanced Threat Intelligence team. The organization is presumed to have originated in the South Asian region, and its attack activities date back as far as 2022.

这个结论也被 Evidence 2 印证。Knownsec 404 团队在 ORPCBackdoor 分析中回溯发现:

After backtracking analysis, we found that the earliest attack activities of the organization should start around March 2022.

所以答案是 2022,具体来说是从 2022 年 3 月左右开始的。


# Task 3 — ORPCBackdoor 的第一个恶意导出函数

Q:The group uses a custom backdoor that communicates via Office Remote Procedure Call (ORPCBackdoor). According to the Knownsec 404 team's analysis (Evidence-2), what is the name of the first malicious exported entry function?

A: GetFileVersionInfoByHandleEx(void)

详细过程:

ORPCBackdoor 是 Knownsec 404 团队在 2023 年 3 月首次捕获到的新型后门。为了隐藏自己,它利用 DLL 劫持(DLL hijacking) 技术伪装成一个看似无害的系统 DLL—— version.dll

Evidence 2 中列出了 ORPCBackdoor 的 17 个导出函数,其中包括:

GetFileVersionInfoA
GetFileVersionInfoByHandle
GetFileVersionInfoExW
GetFileVersionInfoSizeA
...
VerQueryValueA
VerQueryValueW
GetFileVersionInfoByHandleEx(void)     ← 第一个恶意入口
DllEntryPoint                           ← 第二个恶意入口

文章明确说明:

There are two malicious entries of ORPCBackdoor, the first is GetFileVersionInfoByHandleEx(void) export function, second place is DllEntryPoint.

为什么把恶意代码藏在 version.dll 里?Windows 系统中很多程序都会调用 version.dll 来获取文件版本信息。攻击者用一个假的 version.dll (恶意 DLL)放到目标目录中,当合法程序加载 version.dll 时,加载的是恶意版本。"白加黑" 技术 —— 白色的合法启动文件 + 黑色的恶意 DLL,实现免杀效果。

题目问的是 "第一个" 恶意导出函数,那就是 GetFileVersionInfoByHandleEx(void)


# Task 4 — 持久化前检查的文件

Q:The previously mentioned backdoor checks for a file before creating persistence. What is the name of the file?

A: ts.dat

详细过程:

ORPCBackdoor 在创建持久化之前,会先检查一个特定的文件是否已经存在,防止重复创建任务导致暴露。

Evidence 2 原文:

Before persistent creation, ORPCBackdoor determines whether the ts.dat file exists in the same path. If the file does not exist, ORPCBackdoor will create persistence. The TaskScheduler CLSID is invoked by COM, which name is Microsoft Update. After the task is created, the ts.dat file is created.

完整的执行流程是:

  1. 检查同目录下是否存在 ts.dat
  2. 如果不存在 → 创建持久化(用 COM 接口调用 TaskScheduler,任务名 "Microsoft Update")
  3. 持久化创建完成后,生成 ts.dat 文件
  4. 下一次运行发现 ts.dat 已存在 → 跳过持久化步骤

这是恶意软件常见的 "一次性安装" 模式。攻击者不希望在同一台机器上反复创建计划任务,因为过多的任务会增加暴露风险。 ts.dat 充当了一个 "安装标记" 的角色。

此外,ORPCBackdoor 还有第二个标记文件 $cache.dat (位于 ProgramData 路径下),用于控制是否与 C2 服务器建立交互连接。不过题目问的是持久化阶段检查的文件,也就是 ts.dat


# Task 5 — ORPCBackdoor 连接到的南亚 APT 组织

Q:The use of the backdoor links the APT to another well-known South Asian APT group. What is the name of this other group?

A: BITTER

详细过程:

这个题的答案在于理解 ORPCBackdoor 的归属演变过程。

Knownsec 404 团队在 2023 年 5 月首次发布 ORPCBackdoor 分析时,最初将其归因于哪个组织?Evidence 2 开头明确提到:

In the report, we identified the weapon as the latest weapon used by BITTER.

BITTER(也被称为 T-APT-17蔓灵花)是一个长期活跃的南亚 APT 组织,以针对中国、巴基斯坦等国的政府、能源、军工领域为目标。ORPCBackdoor 的技术特征跟 BITTER 以往的 CHM 钓鱼手法、代码结构高度相似:

  • CHM 文件结构几乎一致
  • doc.htm 文件的代码逻辑、函数命名和规避技术几乎相同
  • 后续下载的二阶段文件都是 MSI 文件

后来 Kaspersky 发现这个后门的使用者是一个全新组织(Mysterious Elephant),Knownsec 404 也据此分配了新编号 APT-K-47。但 ORPCBackdoor 本身的技术特征仍然将 Mysterious Elephant 与 BITTER 紧密联系在一起。


# Task 6 — TCP→HTTPS 演进的 Asyncshell 版本

Q:The APT group we are currently investigating has consistently used and updated another backdoor since 2023, with its C2 communication evolving from TCP to HTTPS. What is the name of this tool?

A: Asyncshell-v2

详细过程:

Evidence 3 的标题就很明确:"Unveiling the Past and Present of APT-K-47 Weapon: Asyncshell"。Knownsec 404 团队一直在追踪这个组织使用的另一个主要后门 ——Asyncshell

文章将 Asyncshell 的演变分成了四个版本:

版本时间主要变化
v12023 年 9 月首次交付基础 TCP 通信,支持 cmd 和 powershell
v22024 年 4 月通信从 TCP 切换到 HTTPS
v32024 年 7 月从文件(license)解密 C2,攻击链更新
v42024 年 11 月变种 base64 隐藏字符串,伪装成 Web 服务请求

其中关键版本变化原文是:

Load communication changed from tcp to https, so we noted as Asyncshell-v2.

As time moved on to April 2024, the team discovered a new Asyncshell attack sample from the organization... Load communication changed from tcp to https.

Evdience 1(SecureList)也提到了 Asyncshell 的简单版演变:

The group's latest campaign, which began in early 2025, reveals a significant shift in their TTPs, with an increased emphasis on using new custom-made tools as well as customized open-source tools, such as BabShell and MemLoader modules.

从 2023 年到 2025 年,Mysterious Elephant 持续使用 Asyncshell,并且不断升级。v2 版本的关键变化就是通信协议从原始 TCP 改为 HTTPS,使得流量更难以被检测。


# Task 7 — MemLoader HidenDesk 的最小进程数

Q:To evade sandbox analysis, the MemLoader HidenDesk tool checks the number of active processes before running. What is the minimum number of processes required for it to proceed?

A: 40

详细过程:

MemLoader HidenDesk 是 Evidence 1(SecureList)中描述的 Mysterious Elephant 定制化开源工具之一,通过 BabShell 加载。

The malware checks the number of active processes and terminates itself if there are fewer than 40 processes running — a technique used to evade sandbox analysis.

为什么是 40?

沙箱环境(sandbox)是安全分析师用于动态分析恶意样本的隔离环境。典型的沙箱有以下特征:

  • 进程数量少(刚启动的分析环境,没有真实用户操作)
  • 没有真实的办公应用程序在运行
  • 网络连接受限

恶意软件通过 CreateToolhelp32SnapshotEnumProcesses 枚举系统所有进程,然后计数。如果发现进程数 < 40,就认为自己在沙箱中,直接退出 —— 不暴露真正的恶意行为。

这个技术叫做 "沙箱检测(Sandbox Evasion)",是 APT 组织常用的反分析手段。


# Task 8 — MemLoader HidenDesk 创建的隐藏桌面名称

Q:The MemLoader HidenDesk tool creates a covert environment for its activities by creating and switching to a specific environment. What is the name of this hidden desktop?

A: MalwareTech_Hidden

详细过程:

MemLoader HidenDesk 还使用了一个更隐蔽的技术 —— 创建隐藏桌面

SecureList 原文:

The malware then creates a hidden desktop named "MalwareTech_Hidden" and switches to it, providing a covert environment for its activities. This technique is borrowed from an open-source project on GitHub.

什么是隐藏桌面?

Windows 支持多个桌面(Desktop),每个桌面可以有独立的窗口集合。常用的桌面叫 "Default",但你可以通过 CreateDesktop() API 创建额外的桌面。默认情况下,只有当前活动的桌面是可见的,其他桌面上运行的窗口不会被用户看到。

MemLoader HidenDesk 的做法是:

  1. 调用 CreateDesktop("MalwareTech_Hidden") 创建一个新的隐藏桌面
  2. 调用 SwitchDesktop() 切换到该桌面
  3. 在该桌面上执行恶意 payload

这样,即使用户的 Windows 登录了,恶意软件的窗口、弹框等 UI 元素都出现在隐藏桌面上,受害者完全看不到。这是一种成熟的规避检测技术,攻击者从 GitHub 开源项目中借鉴了这段代码。


# Task 9 — Registry Run Keys / Startup Folder 的 MITRE ATT&CK ID

Q:The MemLoader HidenDesk tool achieves persistence by placing a shortcut in the autostart folder to ensure it runs after a system reboot. What is the MITRE ATT&CK ID for the 'Registry Run Keys / Startup Folder' technique?

A: T1547.001

详细过程:

MemLoader HidenDesk 通过将自身的快捷方式放入 **autostart folder(启动文件夹)** 来实现持久化。启动文件夹中的程序会在用户登录时自动运行。

SecureList 原文:

It creates a shortcut to its executable and saves it in the autostart folder, ensuring it can restart itself after a system reboot.

在 MITRE ATT&CK 框架中,启动文件夹与注册表启动项被归为同一个技术大类 ——T1547: Boot or Logon Autostart Execution,其子技术 .001 专门对应 Registry Run Keys / Startup Folder

所以答案是 T1547.001

其他相关的 MITRE ID 还有:

  • T1059.001 — PowerShell
  • T1041 — Exfiltration Over C2 Channel

后面两题也会用到。


# Task 10 — 递归搜索 Desktop 和 Downloads 的窃密工具

Q:The actor uses several custom exfiltration tools targeting WhatsApp. What is the name of the tool that recursively searches specific directories, including the "Desktop" and "Downloads" folders?

A: Stom Exfiltrator

详细过程:

Mysterious Elephant 开发了多个针对 WhatsApp 的定制化数据窃取工具。Evidence 1(SecureList)中介绍了三个:

工具名称功能描述
Uplo Exfiltrator按文件扩展名类型窃取,遍历深度优先遍历算法
Stom Exfiltrator递归搜索 "Desktop" 和 "Downloads" 目录,遍历所有非 C 盘分区
ChromeStealer Exfiltrator窃取 Chrome 浏览器数据(cookies、tokens)

SecureList 原文对 Stom Exfiltrator 的描述:

The Stom Exfiltrator is a commonly used exfiltration tool that recursively searches specific directories, including the "Desktop" and "Downloads" folders, as well as all drives except the C drive, to collect files with predefined extensions. Its latest variant is specifically designed to target files shared through the WhatsApp application.

最新变体甚至硬编码了 WhatsApp 的文件传输路径:

%AppData%\Packages\xxxxx.WhatsAppDesktop_[WhatsApp ID]\LocalState\Shared\transfers\

窃取的文件类型包括 .PDF.DOCX.TXT.JPG.PNG.ZIP.RAR.PPTX.DOC.XLS.XLSX.PST.OST


# Task 11 — PowerShell 的 MITRE ATT&CK ID

Q:Kaspersky's analysis highlights the actor's heavy use of scripts for execution and deploying payloads. What is the MITRE ATT&CK ID for the 'PowerShell' technique?

A: T1059.001

详细过程:

SecureList 文章中专门有一节讨论 Mysterious Elephant 对 PowerShell 的滥用:

The threat actor uses PowerShell scripts to execute commands, deploy additional payloads, and establish persistence. These scripts are loaded from C2 servers and often use legitimate system administration tools, such as curl and certutil, to download and execute malicious files.

文章中展示了一个典型的恶意 PowerShell 脚本示例,该脚本用于下载下一阶段 payload(保存为 ping.exe ),然后创建计划任务执行 payload 并将结果发回 C2 服务器。

在 MITRE ATT&CK 框架中,T1059Command and Scripting Interpreter(命令和脚本解释器)技术大类,子技术 .001 专门对应 PowerShell

所以答案是 T1059.001


# Task 12 — 与 Origami Elephant 关联的下载器

Q:In their early attack chains, Mysterious Elephant used a downloader that was previously associated with the Origami Elephant group. What was the name of this downloader?

A: Vtyrei

详细过程:

Mysterious Elephant 的早期攻击链与其他南亚 APT 组织存在大量交叉。Evidence 1(SecureList)详细描述了组织之间的工具复用关系:

The actor's early attack chains featured distinctive elements, such as remote template injections and exploitation of CVE-2017-11882, followed by the use of a downloader called "Vtyrei", which was previously connected to Origami Elephant and later abandoned by this group.

几个关键信息:

  • Vtyrei 是一个下载器,最初由 Origami Elephant 组织开发和使用
  • Origami Elephant 后来放弃了 Vtyrei 的维护和更新
  • Mysterious Elephant 捡起了这个被遗弃的工具,继续使用、维护和改进

这也说明了南亚 APT 生态的一个重要特征:组织之间存在深度合作和资源共享。SecureList 还指出 Mysterious Elephant 的恶意代码中包含了来自多个 APT 组织的代码片段:

We found that Mysterious Elephant's malware contained code from multiple APT groups, including Origami Elephant, Confucius, and SideWinder, which suggested deep collaboration and resource sharing between teams.


# Task 13 — 2024 年 1 月 Asyncshell 投递利用的 CVE

Q:In a January 2024 campaign delivering an Asyncshell payload, which CVE was exploited in the malicious archive file?

A: CVE-2023-38831

详细过程:

Evidence 3(Asyncshell 文章)在 "4.1 Discover Asyncshell for the first time" 中明确描述了初始捕获场景:

Our team first discovered Asyncshell back in January 2024, when we found a malicious sample exploiting the CVE-2023-38831 vulnerability, with the overall attack chain shown below.

CVE-2023-38831 是什么?

这是 WinRAR 中的一个路径遍历漏洞,影响 WinRAR 6.23 及更早版本。漏洞原理是:当用户打开一个 ZIP/RAR 压缩包中的看似正常的文件(如 PDF 或 JPG)时,WinRAR 会错误地允许同目录下的恶意可执行文件同时被执行。

在 Asyncshell 的早期投递场景中:

  1. 攻击者制作了包含恶意 payload 的 RAR 压缩包
  2. 使用公务员薪酬相关的诱饵文件伪装
  3. 受害者用存在漏洞的 WinRAR 打开时,Asyncshell payload 被静默执行
  4. Asyncshell-v1 通过 TCP 建立 C2 连接,具备 cmd 和 powershell 命令执行能力

注意题目提示:使用连字符 - 而非长破折号 。所以答案格式为 CVE-2023-38831


# Task 14 — ChromeStealer 样本 WhatsAppOB.exe 的 MD5

Q:What is the MD5 hash of the ChromeStealer Exfiltrator sample named WhatsAppOB.exe?

A: 9e50adb6107067ff0bab73307f5499b6

详细过程:

Evidence 1(SecureList)在文章末尾的 IOCs(Indicators of Compromise)部分提供了所有恶意文件的哈希值。在 ChromeStealer Exfiltrator 条目下明确列出:

ChromeStealer Exfiltrator
9e50adb6107067ff0bab73307f5499b6 WhatsAppOB.exe

ChromeStealer Exfiltrator 是 Mysterious Elephant 专门用于窃取 Chrome 浏览器数据的工具。SecureList 描述:

The ChromeStealer Exfiltrator... targets Google Chrome browser data, including cookies, tokens, and other sensitive information. It searches specific directories within the Chrome user data... including the IndexedDB directory and the "Local Storage" directory.

值得注意的是,C2 服务器的返回信息表明这个工具特别关注 WhatsApp 相关数据,也就是为什么样本文件名叫 WhatsAppOB.exe 。它通过 Chrome 的 IndexedDB 存储结构来提取 WhatsApp Web 的聊天记录、联系人、认证令牌等敏感数据。


# Task 15 — Exfiltration Over C2 Channel 的 MITRE ATT&CK ID

Q:The intelligence describes multiple custom tools designed to upload stolen data to the actor's servers. According to the MITRE ATT&CK framework, what is the ID for the 'Exfiltration Over C2 Channel' technique?

A: T1041

详细过程:

Mysterious Elephant 的三个主要窃密工具(Uplo Exfiltrator、Stom Exfiltrator、ChromeStealer Exfiltrator)都采用相同的回传机制 —— 通过已有的 C2 通道将窃取的数据上传到攻击者的服务器。

在 MITRE ATT&CK 框架中,T1041: Exfiltration Over C2 Channel 描述的是:攻击者利用已有的命令与控制通道(即建立好的 C2 连接)来传输窃取的数据,而不是通过新的独立连接。

这种方式的优势在于:

  1. 降低检测面 —— 不需要创建新的出站连接,减少被防火墙或 IDS 发现的概率
  2. 利用加密通道 ——C2 通信通常已经加密(HTTPS),窃取的数据随之也被加密传输
  3. 简化工具体系 —— 无需为数据回传单独开发工具或服务器

三个窃密工具的具体回传路径都是先将数据写入本地临时目录或文件,然后通过 C2 协议将其上传到远程服务器。


# 答案速查表

Task题目答案
1APT 组织主要名称Mysterious Elephant
2攻击活动起始年份2022
3ORPCBackdoor 第一个恶意导出函数GetFileVersionInfoByHandleEx(void)
4持久化前检查的文件ts.dat
5ORPCBackdoor 关联的南亚 APT 组织BITTER
6TCP→HTTPS 演进的 Asyncshell 版本Asyncshell-v2
7MemLoader 最小进程数40
8隐藏桌面名称MalwareTech_Hidden
9Registry Run Keys / Startup Folder MITRE IDT1547.001
10递归搜索 Desktop/Downloads 的窃密工具Stom Exfiltrator
11PowerShell MITRE IDT1059.001
12Origami Elephant 关联的下载器Vtyrei
132024 年 1 月 Asyncshell 投递利用的 CVECVE-2023-38831
14WhatsAppOB.exe MD59e50adb6107067ff0bab73307f5499b6
15Exfiltration Over C2 Channel MITRE IDT1041

# 情报画像总结

通过 15 道题目的分析,我们构建了 Mysterious Elephant 的完整威胁画像:

维度发现
组织名称Mysterious Elephant / APT-K-47(中文 "神秘象")
活跃时间至少从 2022 年 3 月起持续活跃
主攻区域南亚(巴基斯坦、孟加拉国、斯里兰卡、阿富汗、尼泊尔)
主要目标政府机构、外交部门
初始入侵鱼叉钓鱼邮件(Hajj 主题诱饵)、CVE-2017-11882、CVE-2023-38831
主要武器ORPCBackdoor、Asyncshell(v1-v4)、BabShell
加载器MemLoader HidenDesk、MemLoader Edge
窃密工具Uplo Exfiltrator、Stom Exfiltrator、ChromeStealer Exfiltrator
规避手段io_uring(注意这里是 Windows RPC,不是 io_uring)、隐藏桌面、进程数检测、DLL 劫持
关联组织BITTER、Origami Elephant、Confucius、SideWinder

这个 APT 组织最显著的特征是持续进化 —— 从 2022 年到 2025 年,他们的工具不断增加、版本不断更新。初期借用了其他南亚组织的现成工具,后来发展出自己完整的定制化工具链。对 WhatsApp 数据的专门关注也显示了他们对特定情报类型的明确需求