@port139 Blog

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

Log2timeline.py(Plaso)によるタイムラインの作成(24)

Log2timeline(Plaso)にはWindows FireWallのログファイルをパースする WinFirewallParser(Parses the Windows Firewall Log file)が、Ver 0.66 には xpfirewall(Parse the content of a XP Firewall log)が提供されています。

 

まずPlasoの WinFirewallParser を使い、Windows 7のログをパースしてみたいと思います。Windows 7ではFireWallのログが C:\Windows\System32\LogFiles\Firewall フォルダ配下に pfirewall.log または pfirewall.log.old などの名前で保存されています。

root@siftworkstation:/cases# log2timeline.py --parsers WinFirewall --output L2tcsv --logfile out.log -d Firewall_timeline.txt /cases/FireWall/

出力結果は下記になります。

date,time,timezone,MACB,source,sourcetype,type,user,host,short,desc,version,filename,inode,notes,format,extra

04/20/2014,11:46:45,UTC,M...,LOG,Windows Firewall Log,Content Modification Time,-,-,ALLOW [UDP] 192.168.11.105 : 137 > 192.168.11.9 : 137,ALLOW [ UDP SEND ] From: 192.168.11.105 :137 > 192.168.11.9 :137 Size (bytes): 0,2,/cases/FireWall/pfirewall.log,29097986,-,WinFirewallParser,

元のWindows FireWallのログファイルにおける該当ログレコードは下記です。Plasoの出力では少し見やすく整形されていますね。

2014-04-20 11:46:45 ALLOW UDP 192.168.11.105 192.168.11.9 137 137 0 - - - - - - - SEND

 

次に同じログファイルを、Ver 0.66 の xpfirewall でパースしてみます。

root@siftworkstation:/cases# log2timeline -f xpfirewall -r -o csv -z UTC -log out1.log -w firewalltimeline066.txt /cases/FireWall/

残念ながら出力結果はゼロでした、ログファイルを確認すると無効な形式として判断しているようです。名前の通り Windows XPの形式を入力しないといけないようですね。

Start processing file/dir [/cases/FireWall/pfirewall.log] ...

Starting to parse using input modules(s): [xpfirewall] 

Loading output module: csv

File /cases/FireWall/pfirewall.log not VALID (Log2t::input::xpfirewall): There should be 16 words per line, instead there are -1