Log2timeline.py(Plaso)によるタイムラインの作成(8)
WinEvtxParser(Parses Windows XML EventLog (EVTX) files)を試してみましたが、出力形 L2tcsv では読みにくいと感じています。そこで、今回は psort で加工する方法について確認してみます。
まず、log2timelineのアウトプットモジュールについては、(--info)コマンドで確認でき、出力可能なモジュールは psort も基本的には同じです。
******************************** Output Modules ********************************
Dynamic : Dynamic selection of fields for a separated value
output format.
L2tcsv : The CSV format used by log2timeline, with 17 fixed
fields.
Pstorage : Dumps event objects to a plaso storage file.
Raw : Prints out a "raw" interpretation of the
EventObject protobuf.
Rawpy : Prints out a "raw" interpretation of the
EventObject.
Sql4n6 : Saves the data in a SQLite database, used by the
tool 4n6Time.
まず、Windows 7のイベントログファイル(EVTX)を RAW 形式で出力します。
root@siftworkstation:/cases# log2timeline.py --parsers WinEvtx --output Raw --logfile out.log -d evtxtimeline.raw ./EVTX/
次に、どういったフィールドにどの様な値が収納されているのかを RAW ファイルを開いて確認してみます。出力段階では、これらのフィールドから必要な項目に絞って並べる事で整理する事ができそうです。
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
[Timestamp]:
2009-07-14T04:56:45.074339+00:00
[Message Strings]:
Short: [0x00001b7c] Strings: [u'Microsoft Software Shadow Copy Provider', u'stopped'...
Long: [7036 / 0x00001b7c] Record Number: 1 Event Level: 4 Source Name: Service Control Manager Computer Name: 37L4247D28-05 Strings: [u'Microsoft Software Shadow Copy Provider', u'stopped', u'730077007000720076002F0031000000']
Source Short: EVT
Source Long: WinEVTX
[Pathspec]:
type: OS
file_path: "./EVTX/System.evtx"
path_prepend: ""
[Reserved attributes]:
{data_type} windows:evtx:record
{display_name} ./EVTX/System.evtx
{filename} ./EVTX/System.evtx
{inode} 16777218
{offset} 0
{parser} WinEvtxParser
{store_index} -1
{store_number} 1
{timestamp} 1247547405074339
{timestamp_desc} Content Modification Time
[Additional attributes]:
{computer_name} 37L4247D28-05
{event_identifier} 7036
{event_level} 4
{record_number} 1
{recovered} False
{source_name} Service Control Manager
{strings} [u'Microsoft Software Shadow Copy Provider', u'stopped', u'730077007000720076002F0031000000']
{xml_string} <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager"/>
<EventID Qualifiers="16384">7036</EventID>
<Version>0</Version>
<Level>4</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2009-07-14T04:56:45.074339000Z"/>
<EventRecordID>1</EventRecordID>
<Correlation/>
<Execution ProcessID="488" ThreadID="592"/>
<Channel>System</Channel>
<Computer>37L4247D28-05</Computer>
<Security/>
</System>
<EventData>
<Data Name="param1">Microsoft Software Shadow Copy Provider</Data>
<Data Name="param2">stopped</Data>
<Binary>730077007000720076002F0031000000</Binary>
</EventData>
</Event>
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
うーん、どうも期待した内容から外れている気がしてきました。