@port139 Blog

基本的にはデジタル・フォレンジックの技術について取り扱っていますが、記載内容には高確率で誤りが含まれる可能性があります。

SANS ポスター:Windows Artifact Analysis(14) WebCacheV01.dat

WebCacheV01.dat ファイルに対して RAW で KW 検索を実施すると、ESEDatabaseView から出力した CSV ファイルでは HEX 文字列?として出力されてくるデータがヒットしてきます。該当データ部分の詳細を確認する為、ESEデータベースの構造を少し確認しておきたいと思います。

ESEDBの内部フォーマットについては、libesedb プロジェクトが公開している下記資料を参考に読み進める事ができます。

Extensible Storage Engine (ESE) Database File (EDB) format.pdf
https://googledrive.com/host/0B3fBvzttpiiSN082cmxsbHB0anc/

WebCacheV01.dat のデータベースヘッダの情報から、このESEデータベースはページサイズが 32,768 byteである事が分かっています。
RAW の KW 検索によりヒットした位置がどのページ番号かを確認するため、KW ヒットしたオフセット位置 FO 62987303 をページサイズ 32768 で割り、1922 だと分かります。Page 8 に書いてありますが、ESEDB では Page number が ( page offset / page size ) - 1 と定義されていますので、Page 1921 という事になります。

Page 1921 の先頭位置は 1922 * 32768 = 62980096 となりますが、ここから 80バイトはページヘッダという事になります。

ページヘッダの構造も資料の Page 9 をベースにパースしていく事が可能ですが、esentutl コマンドを使うとパース結果を簡単に確認することができます。
下記は、esentutl /m /p1921 WebCacheV01.dat コマンドの出力結果となりますが、ページヘッダのパース結果、タグのパース結果からそれぞれのレコード開始・終了位置が分かりますので、KWヒットした位置がどのレコード範囲かを特定できます。

Extensible Storage Engine Utilities for Microsoft(R) Windows(R)
Version 6.1
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating FILE DUMP mode...
Database: WebCacheV01.dat
Page: 1921

EXPECTED checksum = 0x3FA5C05AF008CC8A:0x41F041F05C5191BF:0x00A2FF5D7599809F:0x7C5083AFA903C00A

checksum <0x02FB0000, 8>: 4586283292353416330 (0x3FA5C05AF008CC8A)
dbtimeDirtied <0x02FB0008, 8>: 17226253 (0x106DA0D)
pgnoPrev <0x02FB0010, 4>: 0 (0x0)
pgnoNext <0x02FB0014, 4>: 0 (0x0)
objidFDP <0x02FB0018, 4>: 74 (0x4A)
cbFree <0x02FB001C, 2>: 26415 (0x672F)
cbUncommittedFree <0x02FB001E, 2>: 7688 (0x1E08)
ibMicFree <0x02FB0020, 2>: 7213 (0x1C2D)
itagMicFree <0x02FB0022, 2>: 10 (0xA)
fFlags <0x02FB0024, 4>: 10243 (0x2803)
rgChecksum[0] <0x02FB0028, 8>: 4751370107472679359 (0x41F041F05C5191BF)
rgChecksum[1] <0x02FB0030, 8>: 45879723097161887 (0xA2FF5D7599809F)
rgChecksum[2] <0x02FB0038, 8>: 8957804449318027274 (0x7C5083AFA903C00A)
pgno <0x02FB0040, 4>: 1921 (0x781)
Leaf page
Root page
FDP page
Single Extent Space (ParentFDP: 1)
Primary page
New record format
New checksum format


TAG 0 cb:0x0010 ib:0x0000 offset:0x0050-0x0060 flags:0x0000 ( )
TAG 1 cb:0x04f3 ib:0x0bac offset:0x0bfc-0x10ef flags:0x0003 (vd )
TAG 2 cb:0x00fd ib:0x0010 offset:0x0060-0x015d flags:0x0003 (vd )
TAG 3 cb:0x04d1 ib:0x06db offset:0x072b-0x0bfc flags:0x0003 (vd )
TAG 4 cb:0x04a1 ib:0x178c offset:0x17dc-0x1c7d flags:0x0001 (v )
TAG 5 cb:0x00fd ib:0x168f offset:0x16df-0x17dc flags:0x0003 (vd )
TAG 6 cb:0x04f3 ib:0x119c offset:0x11ec-0x16df flags:0x0003 (vd )
TAG 7 cb:0x00fd ib:0x109f offset:0x10ef-0x11ec flags:0x0003 (vd )
TAG 8 cb:0x00fd ib:0x020a offset:0x025a-0x0357 flags:0x0003 (vd )
TAG 9 cb:0x00fd ib:0x010d offset:0x015d-0x025a flags:0x0003 (vd )

Nodes: 9
min, ave, max, total
Logical Key Sizes: 18, 18.0, 18, 162
Node Data Sizes: 233, 670.8, 1247, 6037
Unreclaimed Space: 255, 631.0, 1269, 5048 (nodes=8)

Operation completed successfully in 0.15 seconds.

 

 

Forensic analysis of the ESE database in Internet Explorer 10
http://hh.diva-portal.org/smash/get/diva2:635743/FULLTEXT02.pdf

Forensic data recovery from the Windows Search Database
http://eprints.whiterose.ac.uk/75046/1/Forensic_Data_Recovery_From_The_Windows_Search_Database_preprint_DIIN328.pdf

Windows 8 Forensics: Internet History Cache
http://cyberarms.wordpress.com/2012/08/21/windows-8-forensics-internet-cache-history/

The INDEX.DAT File Format
http://www.geoffchappell.com/studies/windows/ie/wininet/api/urlcache/indexdat.htm?tx=89