Uses Volatility 3 to analyze RAM dumps for malware execution, process injection, network connections, and credential theft evidence. For incident response, DFIR, and memory forensics investigations.
npx claudepluginhub killvxk/cybersecurity-skills-zhThis skill uses the workspace's default tool permissions.
- 活跃事件期间端点已被遏制且必须保全易失性证据
Uses Volatility 3 to analyze RAM dumps, extracting running processes, network connections, loaded modules, and detecting hidden processes or malware in incident response.
Analyzes RAM dumps using Volatility 3 to detect malware execution, process injection, network connections, and credential theft during incident response.
Conducts memory forensics with Volatility 3: acquires RAM dumps from Windows/Linux, analyzes processes, DLLs, malware, injections, networks, and credentials for incident response.
Share bugs, ideas, or general feedback.
不适用于分析磁盘镜像或文件系统产物;此类任务请使用磁盘取证工具(Autopsy、FTK)。
使用取证可靠的方法从目标系统采集 RAM:
Windows(WinPmem):
winpmem_mini_x64.exe output.raw
Windows(Magnet RAM Capture):
MagnetRAMCapture.exe
# 基于图形界面,选择输出路径,生成 .raw 文件
Windows(DumpIt):
DumpIt.exe
# 自动在当前目录创建内存转储
Linux(AVML - Acquire Volatile Memory for Linux):
./avml output.lime
记录采集元数据:
采集记录:
━━━━━━━━━━━━━━━━━
目标主机: WKSTN-042
RAM 大小: 16 GB
转储文件: WKSTN-042_20251115_1445.raw
转储大小: 16,843,612,160 字节
SHA-256: a4b3c2d1e5f6...
采集工具: WinPmem 4.0
采集人: [分析员姓名]
时间戳: 2025-11-15T14:45:00Z
Volatility 3 自动识别操作系统,但需验证:
# 获取系统信息
vol -f WKSTN-042_20251115_1445.raw windows.info
# 输出包含:
# OS: Windows 10 22H2(Build 19045.3693)
# Kernel Base: 0xf8066c200000
# DTB: 0x1aa000
# Symbols: ntkrnlmp.pdb
检查进程树以发现可疑活动:
# 列出所有运行中的进程
vol -f memory.raw windows.pslist
# 显示进程树(父子关系)
vol -f memory.raw windows.pstree
# 扫描隐藏/未链接的进程(Rootkit 检测)
vol -f memory.raw windows.psscan
# 比较 pslist 与 psscan 以找出隐藏进程
# psscan 中有但 pslist 中没有的进程可能被 Rootkit 隐藏
进程分析中的关键失陷指标:
-k 参数或父进程错误的 svchost.exe(应为 services.exe)csrss.exe 或 lsass.exescvhost.exe、lssas.exe)outlook.exe、winword.exe 或 excel.exe 生成的异常进程lsass.exe、smss.exe)提取活跃和最近关闭的网络连接:
# 列出所有网络连接
vol -f memory.raw windows.netscan
# 关注输出字段:
# Offset Proto LocalAddr LocalPort ForeignAddr ForeignPort State PID Owner
# 0xe10... TCPv4 10.1.5.42 49721 185.220.101.42 443 ESTAB 3847 update.exe
将可疑连接与进程树交叉引用以识别 C2 通信。注意:
svchost.exe 或系统进程与外部 IP 的连接使用 malfind 识别注入代码和内存驻留恶意软件:
# 检测进程中的注入代码
vol -f memory.raw windows.malfind
# 输出显示:
# PID Process Start End Tag Protection Hexdump/Disassembly
# 3847 explorer.exe 0x2a10000 0x2a14000 VadS PAGE_EXECUTE_READWRITE
# MZ header detected - injected PE
# 转储可疑进程内存
vol -f memory.raw windows.memmap --pid 3847 --dump
# 列出可疑进程加载的 DLL
vol -f memory.raw windows.dlllist --pid 3847
# 用 YARA 规则扫描内存
vol -f memory.raw windows.yarascan --yara-file malware_rules.yar
从内存中恢复敏感数据:
# 从内存转储注册表配置单元(用于密码哈希提取)
vol -f memory.raw windows.registry.hivelist
vol -f memory.raw windows.hashdump
# 提取命令行历史
vol -f memory.raw windows.cmdline
# 列出句柄(文件、注册表键、互斥量)
vol -f memory.raw windows.handles --pid 3847
# 提取剪贴板内容
vol -f memory.raw windows.clipboard
# 从内存转储缓存的文件
vol -f memory.raw windows.dumpfiles --pid 3847
将调查结果汇编成结构化分析报告,记录从内存中提取的所有证据:
| 术语 | 定义 |
|---|---|
| 易失性证据(Volatile Evidence) | 仅存在于 RAM 中、系统断电后即丢失的数据;包括运行中的进程、网络连接、加密密钥 |
| 进程注入(Process Injection) | 恶意软件将代码插入合法进程内存空间以规避检测的技术(malfind 可检测此行为) |
| EPROCESS | 代表进程的 Windows 内核数据结构;psscan 即使在进程从活跃进程列表中取消链接后仍会搜索这些结构 |
| VAD(Virtual Address Descriptor,虚拟地址描述符) | 跟踪分配给进程的内存区域的 Windows 内核结构;malfind 检查 VAD 中可执行但非文件支持的区域 |
| 符号表(Symbol Tables) | Volatility 3 用于解析内存的特定操作系统数据结构;根据检测到的操作系统版本自动下载 |
| PAGE_EXECUTE_READWRITE | 表示区域可读、可写和可执行的内存保护标志;注入恶意代码的常见指标 |
| 内存驻留恶意软件(Memory-Resident Malware) | 完全在 RAM 中运行而不向磁盘写入持久文件的恶意软件,使其对传统基于磁盘的杀毒软件不可见 |
背景:EDR 检测到可疑的命名管道活动但无法识别来源。从可疑端点采集内存转储进行分析。
处理方法:
windows.pstree 识别进程层次结构并发现异常的父子关系windows.malfind 检测注入代码区域,特别是在 svchost.exe 或 rundll32.exe 中windows.netscan 识别 C2 连接并与注入进程 PID 关联windows.cmdline 识别已执行的后渗透命令常见陷阱:
内存取证分析报告
==================================
事件: INC-2025-1547
证据文件: WKSTN-042_20251115_1445.raw
SHA-256: a4b3c2d1e5f6...
已识别操作系统:Windows 10 22H2(Build 19045)
分析工具: Volatility 3.2.0
进程异常
PID 进程名 父进程 异常
3847 update.exe powershell Temp 目录中的可疑可执行文件
5102 svchost.exe explorer 错误的父进程(应为 services.exe)
--- [隐藏] --- 在 psscan 中存在但 pslist 中不存在
注入代码
PID 进程名 地址范围 保护 发现
5102 svchost.exe 0x00A10000-0x00A14 PAGE_EXECUTE_READWRITE MZ 头(PE 注入)
网络连接
PID 进程名 本地 远程 状态
3847 update.exe 10.1.5.42:49721 185.220.101.42:443 ESTABLISHED
5102 svchost.exe 10.1.5.42:51003 91.215.85.17:8443 ESTABLISHED
YARA 匹配
规则: CobaltStrike_Beacon_x64
匹配 PID: 5102(svchost.exe)
偏移量: 0x00A10240
提取的 IOC
哈希: [转储的注入代码的 SHA-256]
C2 IP: 185.220.101.42, 91.215.85.17
C2 域名: [从 Beacon 配置提取]
互斥量: Global\MSCTF.Shared.MUTEX.ZRQ