Communitygithub.com

使用 Autopsy 分析磁盘镜像

对 raw (dd)、E01 或 AFF 格式的磁盘镜像进行全面的法证分析,利用 Autopsy 和 The Sleuth Kit 恢复已删除文件、检查元数据及嵌入工件、执行关键词搜索,并构建附带可视化报告的调查时间线。

使用 Autopsy 分析磁盘镜像 是什么?

该技能提供了一个端到端的法证分析工作流程,用于处理 raw (dd)、E01 或 AFF 格式的磁盘镜像。它结合了 Autopsy 的图形界面和 The Sleuth Kit 的命令行工具,支持 Autopsy 4.x(Windows 或 Linux)环境。主要步骤包括创建案例并添加镜像、启用摄取模块(例如最近活动、哈希查找、关键词搜索和文件类型识别),以及使用 `fls` 和 `icat` 等命令行工具恢复已删除文件。该技能还指导如何构建调查时间线(通过 `mactime`),执行关键词搜索(使用正则表达式或 `srch_strings`),并使用哈希集(如 NSRL)进行文件去重或标记。最终输出包含一个汇总分析结果的结构化报告,包括已标记证据、时间线事件和已恢复文件,使其适用于员工数据窃取、恶意软件取证或知识产权纠纷等常见调查场景。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-disk-image-with-autopsy

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

使用 Autopsy 分析磁盘镜像 是做什么的?

何时使用

  • 当您拥有法证磁盘镜像并需要对其内容进行结构化分析时
  • 在需要文件恢复、关键词搜索和时间线分析的调查过程中
  • 当非技术人员需要从法证证据中获得可视化报告时
  • 用于检查文件系统元数据、已删除文件和嵌入工件
  • 当从多个磁盘镜像构建综合案例时

先决条件

  • 安装 Autopsy 4.x (Windows) 或 Autopsy 4.x 与 The Sleuth Kit (Linux)
  • raw (dd)、E01 (EnCase) 或 AFF 格式的法证磁盘镜像
  • 至少 8GB RAM(处理大型镜像建议 16GB)
  • 用于 Autopsy 的 Java 运行时环境 (JRE) 8+
  • 足够的磁盘空间用于 Autopsy 案例数据库(镜像大小的 2-3 倍)
  • 用于文件识别的哈希数据库(NSRL、已知恶意哈希)

工作流程

步骤 1:安装 Autopsy 并配置环境

# 在 Linux 上,安装 Sleuth Kit 和 Autopsy
sudo apt-get install autopsy sleuthkit

# 从官方源下载 Autopsy 4.x (GUI 版本)
wget https://github.com/sleuthkit/autopsy/releases/download/autopsy-4.21.0/autopsy-4.21.0.zip
unzip autopsy-4.21.0.zip -d /opt/autopsy

# 在 Windows 上,从 sleuthkit.org 运行 MSI 安装程序
# 启动 Autopsy
/opt/autopsy/bin/autopsy --nosplash

# 配合 Autopsy 安装 Sleuth Kit 命令行分析工具
sudo apt-get install sleuthkit

步骤 2:创建新案例并添加磁盘镜像

1. 启动 Autopsy > "新建案例"
2. 输入案例名称: "CASE-2024-001-Workstation"
3. 设置基础目录: /cases/case-2024-001/autopsy/
4. 输入案例编号、检验员姓名
5. 点击 "添加数据源"
6. 选择 "磁盘镜像或虚拟机文件"
7. 浏览至: /cases/case-2024-001/images/evidence.dd
8. 选择原始系统的时区
9. 配置摄取模块(参见步骤 3)
# 或者,先使用 Sleuth Kit CLI 验证镜像
img_stat /cases/case-2024-001/images/evidence.dd

# 列出镜像中的分区
mmls /cases/case-2024-001/images/evidence.dd

# 输出示例:
# DOS Partition Table
# Offset Sector: 0
# Units are in 512-byte sectors
#      Slot    Start        End          Length       Description
#      00:  -----   0000000000   0000002047   0000002048   Primary Table (#0)
#      01:  00:00   0000002048   0001026047   0001024000   NTFS (0x07)
#      02:  00:01   0001026048   0976771071   0975745024   NTFS (0x07)

# 列出分区中的文件(偏移量 2048 扇区)
fls -o 2048 /cases/case-2024-001/images/evidence.dd

步骤 3:配置并运行摄取模块

启用以下 Autopsy 摄取模块:
- 最近活动: 提取浏览器历史记录、下载、Cookie、书签
- 哈希查找: 将文件与 NSRL 和已知恶意哈希集进行比较
- 文件类型识别: 根据签名而非扩展名识别文件
- 关键词搜索: 索引内容以支持全文搜索
- 邮件解析器: 从 PST、MBOX、EML 文件中提取电子邮件
- 扩展名不匹配检测器: 查找扩展名错误的文件
- Exif 解析器: 从图像中提取元数据(GPS、相机、时间戳)
- 加密检测: 识别加密文件和容器
- 感兴趣文件识别器: 标记匹配自定义规则集的文件
- 嵌入式文件提取器: 从 ZIP、Office 文档、PDF 中提取文件
- 图片分析器: 使用 PhotoDNA 或哈希匹配对图像进行分类
- 数据源完整性: 在摄取过程中验证镜像哈希
# 配置 NSRL 哈希集以过滤已知良性文件
# 从 https://www.nist.gov/itl/ssd/software-quality-group/national-software-reference-library-nsrl 下载 NSRL
wget https://s3.amazonaws.com/rds.nsrl.nist.gov/RDS/current/rds_modernm.zip
unzip rds_modernm.zip -d /opt/autopsy/hashsets/

# 导入到 Autopsy:
# 工具 > 选项 > 哈希集 > 导入 > 选择 NSRLFile.txt
# 标记为 "已识别" (以过滤掉已知良性文件)

步骤 4:分析文件系统并恢复已删除文件

# 在 Autopsy GUI 中:导航树形结构
# - 数据源 > evidence.dd > vol2 (NTFS)
# - 检查目录树,注意已删除文件(标记为 X)

# 使用 Sleuth Kit CLI 进行目标恢复
# 列出已删除文件
fls -rd -o 2048 /cases/case-2024-001/images/evidence.dd

# 按 inode 恢复特定已删除文件
icat -o 2048 /cases/case-2024-001/images/evidence.dd 14523 > /cases/case-2024-001/recovered/deleted_document.docx

# 从目录中提取所有文件
tsk_recover -o 2048 -d /Users/suspect/Documents \
   /cases/case-2024-001/images/evidence.dd \
   /cases/case-2024-001/recovered/documents/

# 获取文件详细元数据
istat -o 2048 /cases/case-2024-001/images/evidence.dd 14523
# 显示: 创建、修改、访问、MFT 更改时间戳、大小、数据块

步骤 5:执行关键词搜索并标记证据

在 Autopsy 中:
1. 关键词搜索面板 > "临时关键词搜索"
2. 搜索词: 信用卡模式、SSN 正则表达式、电子邮件地址
3. 信用卡的示例正则表达式: \b(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14})\b
4. SSN 的示例正则表达式: \b\d{3}-\d{2}-\d{4}\b
5. 查看结果 > 右键单击项目 > "添加标签"
6. 创建标签: "证据-关键", "证据-辅助", "需要-复核"
7. 为已标记项目添加注释,记录其相关性
# 使用 Sleuth Kit 进行 CLI 关键词搜索
srch_strings -a -o 2048 /cases/case-2024-001/images/evidence.dd | \
   grep -iE '(password|secret|confidential)' > /cases/case-2024-001/keyword_hits.txt

# 搜索特定文件签名
sigfind -o 2048 /cases/case-2024-001/images/evidence.dd 25504446
# 25504446 = %PDF 文件头签名

步骤 6:构建时间线并生成报告

在 Autopsy 中:
1. 时间线查看器: 工具 > 时间线
2. 选择感兴趣的日期范围(事件窗口)
3. 按事件类型过滤: 文件创建、修改、访问、网络活动
4. 放大可疑时间段
5. 将时间线事件导出为 CSV 以供外部分析

生成报告:
1. 生成报告 > HTML 报告
2. 选择要包含的已标记项目和的数据源
3. 配置报告章节: 文件列表、关键词命中、时间线
4. 导出到 /cases/case-2024-001/reports/
# 使用 Sleuth Kit 的 mactime 进行 CLI 时间线分析
fls -r -m "/" -o 2048 /cases/case-2024-001/images/evidence.dd > /cases/case-2024-001/bodyfile.txt

# 从 bodyfile 生成时间线
mactime -b /cases/case-2024-001/bodyfile.txt -d > /cases/case-2024-001/timeline.csv

# 将时间线过滤到特定日期范围
mactime -b /cases/case-2024-001/bodyfile.txt \
   -d 2024-01-15..2024-01-20 > /cases/case-2024-001/incident_timeline.csv

关键概念

概念描述
摄取模块在导入时自动处理数据源的自动化分析插件
MFT(主文件表)记录所有文件条目和属性的 NTFS 元数据结构
文件雕刻使用文件签名从未分配空间中恢复文件
哈希过滤使用 NSRL 或自定义哈希集排除已知良性文件或标记已知恶意文件
时间线分析按时间顺序重建文件系统和用户活动事件
已删除文件恢复恢复目录条目已删除但数据仍然存在的文件
关键词索引从所有文件内容(包括 Slack 空间)构建的全文搜索索引
工件提取自动解析浏览器、电子邮件、注册表以及操作系统特定的工件

工具与系统

工具用途
Autopsy用于磁盘镜像分析的开源 GUI 法证平台
The Sleuth Kit (TSK)支持 Autopsy 的命令行法证工具包
fls列出磁盘镜像中的文件和目录,包括已删除条目
icat按 inode 号从磁盘镜像中提取文件内容
mactime从 TSK bodyfile 格式生成时间线
mmls显示磁盘镜像的分区布局
NSRL用于识别已知软件文件的 NIST 哈希数据库
sigfind在扇区级别搜索文件签名

常见场景

场景 1:员工数据窃取调查 导入员工工作站镜像,运行所有摄取模块,搜索公司机密文件名和关键词,检查“最近活动”中的 USB 连接痕迹,查找云存储客户端工件,审查已删除文件中是否存在数据准备阶段的证据,为法务团队生成 HTML 报告。

场景 2:恶意软件感染取证 添加受感染系统镜像,启用“扩展名不匹配”和“加密检测”模块,检查 prefetch 目录中的执行证据,搜索已知恶意软件哈希,围绕感染窗口构建时间线,提取可疑可执行文件以供进一步在沙箱中分析。

场景 3:儿童性虐待材料 (CSAM) 调查 启用 PhotoDNA 和 Project VIC 哈希集后导入镜像,运行“图片分析器”模块,对所有图像文件与已知恶意数据库进行哈希比对,按严重程度标记和分类匹配项,生成附带监管链文档的执法报告。

场景 4:知识产权纠纷 在同一个案例中导入多个员工磁盘镜像作为独立数据源,对专有术语和项目名称执行关键词搜索,比较不同源之间的文件哈希值,构建显示文件访问和传输模式的时间线,导出证据以供法律审查。

输出格式

Autopsy 案例分析摘要:
  案例:           CASE-2024-001-Workstation
  镜像:           evidence.dd (500GB NTFS)
  分区:           2 (系统保留 + 主分区)
  文件总数:       245,832
  已删除文件:     12,456 (可恢复: 8,234)

  摄取结果:
    哈希匹配 (已知恶意):  3 个文件
    扩展名不匹配:         17 个文件
    关键词命中:           234 处,分布于 45 个文件
    加密文件:             检测到 5 个容器
    提取的 EXIF 数据:     1,245 张图片包含元数据

  已标记证据:
    关键:       12 项
    辅助:       34 项
    复核:       67 项

  时间线事件:   1,234,567 条记录(过滤到事件窗口: 892)
  报告:         /cases/case-2024-001/reports/autopsy_report.html

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

analyzing-docker-container-forensics

Investigate compromised Docker containers by analyzing images, layers,

相关技能