1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

rawイメージファイル形式のNTFSボリュームから任意のファイルをダンプする

Last updated at Posted at 2020-07-09

Overview

フォレンジックをする際には EventLog や $MFT など, rawイメージからファイルを抜き出す作業が必須です.

VirtualBox - 仮想マシンをrawイメージ形式にダンプする

FTK ImagerAutopsy などGUIソフトウェアは非常に高機能ですが作業の自動化が難しく, そのため, The Sleuth Kit などのCUIツールを用いる必要があります.

しかし, パスが判明している特定ディレクトリ内のファイルアドレスを調査して複数のファイルをダンプするためには, 複数のコマンドを使用する必要があり煩わしいと思い, The Sleuth Kitのwrapperであるntfsdumpを作成しました.

Usage

$ ntfsdump /path/to/dump/target --output-path ./out ./path/to/your/imagefile.raw

Example

ターゲットディレクトリは $MFT のようなファイル名でも,
/Windows/System32/winevt/Logs のようなディレクトリ名でも動作します.

ディレクトリ名が指定された場合にはそのディレクトリパス配下のファイルを再帰的にdumpします.

$ ntfsdump /Windows/System32/winevt/Logs -o ./dump ./path/to/your/imagefile.raw

ダンプした .evtx, $MFT, .pf ファイルを調査する際には

https://github.com/sumeshi/evtx2es
https://github.com/sumeshi/mft2es
https://github.com/sumeshi/prefetch2es

を使っていただけると嬉しいです.
また, なかなか改修に手が回らないこともあり, IssueやPRなどいただけると助かります.

Required Dependencies

このソフトウェアの動作にはSleuthKitのインストールが必要です.

$ brew install sleuthkit

Installation

$ pip install ntfsdump

TBA

  • findのようにファイル名からパスを探索するためのコマンドも作成予定です.

2020.07.11追記
別コマンドとして追加しました

$ pip install ntfsfind

検索するときには正規表現で検索します
下記は .evtx 形式のファイルを検索するコマンドです.

$ ntfsfind '.*\.evtx' /path/to/your/imagefile.raw

手元で試した検索速度は60MBのMFTで1秒前後でした.

速くはないですが, パスをど忘れしたときに使う程度なら必要十分です.
pickleなどでキャッシュすれば多少早くなりますが, ゴミファイルを増やしたくないのでとりあえずはこのまま.

ガッツリ何度も中身を検索したいときには mft2es でElasticsearchにぶん投げてKibanaから検索かけるほうが手っ取り早いです.

2020.07.26追記
パイプで渡せるようにしました

$ ntfsfind '.*\.evtx' /path/to/your/imagefile.raw | ntfsdump /path/to/your/imagefile.raw
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?