本文へスキップ
Skillpedia
分析とスプレッドシート35k · #7633

analyzing-mft-for-deleted-file-recovery

できること

このツールは、Windowsコンピュータで削除されたファイルを見つけるのに役立ちます。システムのファイル管理情報を調べて、削除されたファイルに関する情報を復元します。

使う場面

  • ✓誤って削除したファイルを復元する必要があるとき。
  • ✓セキュリティインシデントの調査で、どのファイルが削除されたかを確認したいとき。
  • ✓コンピュータ上でファイルがどのように使われていたかの時系列を再構築したいとき。

スキルのリンク

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-mft-for-deleted-file-recovery/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-mft-for-deleted-file-recovery/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“C:ドライブで削除されたファイルを検索してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールは、すべてのファイルの情報を保存しているディスク上の特別な領域であるMFTを分析します。ファイルが削除されても、MFTのファイル情報は残っていることがあり、それを使って復元できる場合があります。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Analyzing MFT for Deleted File Recovery

Overview

The NTFS Master File Table ($MFT) is the central metadata repository for every file and directory on an NTFS volume. Each file is represented by at least one 1024-byte MFT record containing attributes such as $STANDARD_INFORMATION (timestamps, permissions), $FILE_NAME (name, parent directory, timestamps), and $DATA (file content or cluster run pointers). When a file is deleted, its MFT record is marked as inactive (InUse flag cleared) but the metadata remains until the entry is reallocated by a new file. This persistence makes MFT analysis a primary technique for recovering deleted file evidence, reconstructing file system timelines, and detecting anti-forensic activity such as timestomping.

When to Use

  • When investigating security incidents that require analyzing mft for deleted file recovery
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Forensic disk image (E01, raw/dd, VMDK, or VHDX format)
  • MFTECmd (Eric Zimmerman) or analyzeMFT (Python-based)
  • FTK Imager, Arsenal Image Mounter, or similar for image mounting
  • Timeline Explorer or Excel for CSV analysis
  • Python 3.8+ for custom analysis scripts
  • Understanding of NTFS file system internals

MFT Structure and Record Layout

MFT Record Header

Each MFT record begins with the signature "FILE" (0x46494C45) and contains:

Offset Size Field
0x00 4 bytes Signature ("FILE")
0x04 2 bytes Offset to update sequence
0x06 2 bytes Size of update sequence
0x08 8 bytes $LogFile sequence number
0x10 2 bytes Sequence number
0x12 2 bytes Hard link count
0x14 2 bytes Offset to first attribute
0x16 2 bytes Flags (0x01 = InUse, 0x02 = Directory)
0x18 4 bytes Used size of MFT record
0x1C 4 bytes Allocated size of MFT record
0x20 8 bytes Base file record reference
0x28 2 bytes Next attribute ID

Key MFT Attributes

Type ID Name Description
0x10 $STANDARD_INFORMATION Timestamps, flags, owner ID, security ID
0x30 $FILE_NAME Filename, parent MFT reference, timestamps
0x40 $OBJECT_ID Unique GUID for the file
0x50 $SECURITY_DESCRIPTOR ACL permissions
0x60 $VOLUME_NAME Volume label (volume metadata files only)
0x80 $DATA File content (resident if <700 bytes) or cluster run list
0x90 $INDEX_ROOT B-tree index root for directories
0xA0 $INDEX_ALLOCATION B-tree index entries for large directories
0xB0 $BITMAP Allocation bitmap for index or MFT

Deleted File Recovery Techniques

Technique 1: MFT Record Analysis with MFTECmd

# Extract $MFT from forensic image using KAPE or FTK Imager
# Parse the $MFT with MFTECmd
MFTECmd.exe -f "C:\Evidence\$MFT" --csv C:\Output --csvf mft_full.csv

# Filter for deleted files (InUse = FALSE) in Timeline Explorer
# Look for entries where InUse column is False

Identifying Deleted Files in CSV Output:

  • InUse = False indicates a deleted or reallocated record
  • ParentPath shows original file location before deletion
  • FileSize shows the original size (may still be recoverable)
  • Timestamps in $STANDARD_INFORMATION and $FILE_NAME attributes persist

Technique 2: USN Journal ($UsnJrnl:$J) Analysis

The USN Journal records all changes to files on an NTFS volume, including creation, deletion, rename, and data modification events.

# Parse USN Journal with MFTECmd
MFTECmd.exe -f "C:\Evidence\$J" --csv C:\Output --csvf usn_journal.csv

# Key USN reason codes for deletion evidence:
# USN_REASON_FILE_DELETE     = 0x00000200
# USN_REASON_CLOSE           = 0x80000000
# USN_REASON_RENAME_OLD_NAME = 0x00001000
# USN_REASON_RENAME_NEW_NAME = 0x00002000

Technique 3: $LogFile Transaction Analysis

The $LogFile stores NTFS transaction records that can reveal file operations even after the USN Journal has been cycled.

# Parse $LogFile with LogFileParser
LogFileParser.exe -l "C:\Evidence\$LogFile" -o C:\Output

# Look for REDO and UNDO operations indicating file deletion:
# - DeallocateFileRecordSegment
# - DeleteAttribute
# - UpdateResidentValue (clearing InUse flag)

…

よくある質問

MFTとは何ですか?

MFT(Master File Table)は、NTFS(Windowsで最も一般的なファイルシステム)でフォーマットされたディスク上の、すべてのファイルやフォルダの総合索引のようなものです。各ファイルの名前、日付、サイズなどのメタデータが含まれています。

削除されたファイルはなぜ復元できるのですか?

ファイルを削除すると、Windowsは元の領域を空き領域としてマークするだけです。MFTのファイル情報とデータ本体は、その領域が新しいファイルに再利用されるまで完全には消去されません。このツールはその性質を利用しています。

使うのにコンピュータの専門家である必要がありますか?

ツールは高機能ですが、削除されたファイルを探すという基本的な使い方であれば、簡単なコマンドで行えることもあります。ただし、技術的な詳細を理解していると、より良い結果が得られやすくなります。

詳細

作者による元の説明

Analyze the NTFS Master File Table ($MFT) with MFTECmd, analyzeMFT, and X-Ways Forensics to recover metadata and content of deleted files by examining MFT record entries, $LogFile, $UsnJrnl, and MFT slack space. Use when recovering evidence of deleted files, reconstructing NTFS file-system timelines, or detecting anti-forensic timestomping during a Windows forensic examination.

repo: mukul975/Anthropic-Cybersecurity-Skills

人気

GitHubのスター
35k
ランキング
#7633
ライセンス
Apache-2.0
更新日
2026/8/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル