Communitygithub.com

使用 Autopsy 分析磁碟映像檔

對 raw (dd)、E01 或 AFF 格式的磁碟映像檔進行全面數位鑑識分析,使用 Autopsy 和 The Sleuth Kit 來復原已刪除檔案、檢查元資料和內嵌工件、進行關鍵字搜尋,並建立帶有圖像式報告的調查時間線。適用於需要結構化分析鑑識磁碟映像檔,或需要從證據中產出視覺化報告供利害關係人使用的情境。

使用 Autopsy 分析磁碟映像檔 是什麼?

這項技能提供了一套完整的數位鑑識工作流程,用於分析 raw (dd)、E01 或 AFF 格式的磁碟映像檔。它利用開源的 Autopsy 圖形化平台及其基礎命令列工具 The Sleuth Kit (TSK),引導使用者完成案例建立、映像檔匯入、啟用自動化取證模組(例如檔案類型識別、雜湊比對、關鍵字索引),以及後續的深入分析。此技能涵蓋了關鍵任務,包括復原已刪除的檔案、從檔案系統元資料(如 MFT)中提取證據、在未配置空間和檔案內容中進行關鍵字搜尋,以及建立事件時間線。最終輸出為結構化的 HTML 報告,其中彙整了取證結果、標記的證據以及時間線事件,使其對於向非技術性利害關係人呈現技術發現以及支援法律或調查程序都極具價值。支援 Windows 和 Linux 平台,並為常見的調查情境(如員工資料竊盜、惡意軟體感染和隱私權爭議)提供了實際範例。

相容平台~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 Runtime Environment (JRE) 8+
  • 足夠的磁碟空間存放 Autopsy 案例資料庫(映像檔大小的 2-3 倍)
  • 用於檔案識別的雜湊資料庫 (NSRL、已知惡意雜湊)

工作流程

步驟 1:安裝 Autopsy 並設定環境

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

# 從官方來源下載 Autopsy 4.x(圖形介面版本)
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

# 若要搭配使用 Sleuth Kit 命令列分析
sudo apt-get install sleuthkit

步驟 2:建立新案例並新增磁碟映像檔

1. 啟動 Autopsy > "New Case"
2. 輸入案例名稱:"CASE-2024-001-Workstation"
3. 設定基底目錄:/cases/case-2024-001/autopsy/
4. 輸入案例編號、檢查者姓名
5. 點擊 "Add Data Source"
6. 選擇 "Disk Image or VM File"
7. 瀏覽至:/cases/case-2024-001/images/evidence.dd
8. 選擇原始系統的時區
9. 設定 Ingest 模組(請參閱步驟 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:設定並執行 Ingest 模組

啟用下列 Autopsy Ingest 模組:
- Recent Activity:提取瀏覽器歷史紀錄、下載記錄、Cookie、書籤
- Hash Lookup:將檔案與 NSRL 和已知惡意雜湊集合進行比對
- File Type Identification:根據檔案簽章(而非副檔名)識別檔案類型
- Keyword Search:為全文搜尋建立內容索引
- Email Parser:從 PST、MBOX、EML 檔案中提取電子郵件
- Extension Mismatch Detector:找出副檔名與實際類型不符的檔案
- Exif Parser:從影像中提取元資料(GPS、相機資訊、時間戳記)
- Encryption Detection:識別加密檔案和容器
- Interesting Files Identifier:標記符合自訂規則集的檔案
- Embedded File Extractor:從 ZIP、Office 文件、PDF 中提取內嵌檔案
- Picture Analyzer:使用 PhotoDNA 或雜湊比對對影像進行分類
- Data Source Integrity:在擷取過程中驗證映像檔的雜湊值
# 設定用於過濾已知良好檔案的 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:
# Tools > Options > Hash Sets > Import > 選擇 NSRLFile.txt
# 標記為 "Known"(用以濾除已知良好檔案)

步驟 4:分析檔案系統並復原已刪除的檔案

# 在 Autopsy GUI 中:瀏覽樹狀結構
# - Data Sources > 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. Keyword Search 面板 > "Ad Hoc Keyword Search"
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. 檢視結果 > 在項目上按右鍵 > "Add Tag"
6. 建立標籤:"Evidence-Critical"、"Evidence-Supporting"、"Requires-Review"
7. 為已標記的項目新增註解,記錄其關聯性
# 使用 Sleuth Kit 進行命令列關鍵字搜尋
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. 時間線檢視器:Tools > Timeline
2. 選擇感興趣的日期範圍(事件視窗)
3. 依事件類型篩選:檔案建立、修改、存取、網頁活動
4. 放大檢視可疑的時間區段
5. 將時間線事件匯出為 CSV 以供外部分析

產出報告:
1. Generate Report > HTML Report
2. 選擇要包含的已標記項目和資料來源
3. 設定報告區段:檔案列表、關鍵字命中、時間線
4. 匯出至 /cases/case-2024-001/reports/
# 使用 Sleuth Kit 的 mactime 建立命令列時間線
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

關鍵概念

概念說明
Ingest Modules自動化的分析外掛程式,可在匯入資料來源時進行處理
MFT (Master File Table)NTFS 元資料結構,記錄所有檔案項目和屬性
File carving使用檔案簽章從未配置空間中復原檔案
Hash filtering使用 NSRL 或自訂雜湊集合來排除已知良好檔案或標記已知惡意檔案
Timeline analysis按時間順序重建檔案系統和使用者活動事件
Deleted file recovery復原目錄項目已被移除但資料仍存在的檔案
Keyword indexing從所有檔案內容(包括 Slack Space)建立全文搜尋索引
Artifact extraction自動解析瀏覽器、電子郵件、登錄檔和作業系統特定的工件

工具與系統

工具用途
Autopsy開源的圖形化鑑識平台,用於磁碟映像檔分析
The Sleuth Kit (TSK)Autopsy 底層的命令列鑑識工具組
fls列出磁碟映像檔中的檔案和目錄,包括已刪除項目
icat根據 inode 編號從磁碟映像檔中提取檔案內容
mactime從 TSK bodyfile 格式產生時間線
mmls顯示磁碟映像檔的分割區佈局
NSRLNIST 的雜湊資料庫,用於識別已知的軟體檔案
sigfind在磁區層級搜尋檔案簽章

常見情境

情境 1:員工資料竊盜調查 匯入員工工作站映像檔,執行所有 ingest 模組,搜尋公司機密檔案名稱和關鍵字,檢查 Recent Activity 中的 USB 連接紀錄,檢查雲端儲存用戶端工件,檢視已刪除檔案中是否有資料暫存的證據,為法律團隊產出 HTML 報告。

情境 2:惡意軟體感染鑑識 匯入受感染系統映像檔,啟用 Extension Mismatch 和 Encryption Detection 模組,檢查 prefetch 目錄以尋找執行證據,搜尋已知的惡意軟體雜湊,圍繞感染時間點建立時間線,提取可疑的可執行檔以供後續在沙箱中分析。

情境 3:兒童剝削內容 (CSAM) 調查 啟用 PhotoDNA 和 Project VIC 雜湊集來匯入映像檔,執行 Picture Analyzer 模組,將所有影像檔與已知惡意資料庫進行雜湊比對,依嚴重程度標記和分類相符項目,產出具監管鏈記錄的執法機關報告。

情境 4:智慧財產權糾紛 將多位員工的磁碟映像檔作為不同資料來源匯入同一個案例,針對專有名詞和專案名稱進行關鍵字搜尋,比較各來源之間的檔案雜湊,建立顯示檔案存取和傳輸模式的時間線,匯出證據供法律審查。

輸出格式

Autopsy 案例分析摘要:
  案例:           CASE-2024-001-Workstation
  映像檔:          evidence.dd (500GB NTFS)
  分割區:          2 (系統保留 + 主要)
  檔案總數:        245,832
  已刪除檔案數:    12,456 (可復原:8,234)

  Ingest 結果:
    雜湊比對 (已知惡意):  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,

相關技能