@port139 Blog

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

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

Log2timeline(Plaso)と Ver0.66 には、PCAPファイルをパースする PcapParser(Parses PCAP files)、pcap が提供されています。

これまでに試したパーサはいずれもディスク上に存在しているデータがパース対象になっていましたが、これらはネットワーク上を流れているパケットが対象になります。この為、パケットキャプチャしたデータが必要になります。

具体的にどの様なデータをパースの対象にしているか詳しい説明がありませんので、Plaso の pcap.py に書かれているコメントから拾ってみたいと思います。 

00033 # Parse DNS packets and return a string with relevant details.

00034 # 

00035 #   Args:

00036 #     dns_packet_data: DNS packet data.

00037 # 

00038 #   Returns:

00039 #     Formatted DNS details.

00040 #   

 

00089 # Parse the netBIOS stream details.

00090 # 

00091 #   Args:

00092 #     netbios_packet: NetBIOS packet.

00093 # 

00094 #   Returns:

00095 #      Formatted netBIOS details.

 

00114 # Check the tcp flags for a packet for future use.

00115 # 

00116 #   Args:

00117 #     flag: Flag value from TCP packet.

00118 # 

00119 #   Returns:

00120 #     String with printable flags for specific packet.

 

00146 # Parse the type information for the icmp packets.

00147 # 

00148 #   Args:

00149 #     packet: ICMP packet data.

00150 # 

00151 #   Returns:

00152 #     Formatted ICMP details.

 

00340   # Checks for some special types of packets.

00341   # 

00342   #     This method checks for some special packets and assembles usable data

00343   #     currently works for: DNS (udp 53), http, netbios (udp 137), ICMP.

00344   # 

00345   #     Returns:

00346   #       A tuple consisting of a basic desctiption of the stream

00347   #       (i.e. HTTP Request) and the prettyfied string for the protocols.

 

 実際にWireSharkで取得したパケットデータ(pcap)を Plaso でパースしてみた結果が下記になります。キャプチャデータとしては、Webブラウザでアクセスし、Wireshark上でHTTPのみにパケットをフィルタしたデータになります。Protocol: BAD Type: other などになっていて HTTP の通信だとは分からない気がしますが、この結果で正しいのでしょうか?(念のためRAWでも出力して結果を確認してみましたが代わり映えしないですね)

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

04/20/2014,00:50:17,UTC,....,PCAP,Packet Capture File (pcap),Start Time,-,-,Type: other Start Packet ID: 1,Source IP: 192.168.11.105 Destination IP: 103.4.201.12 Protocol: BAD Type: other Size: 66 Stream Data: First Packet ID: 1 Last Packet ID: 1 Packet Count: 1,2,/cases/pcap/http1.pcap,31981570,-,PcapParser,

04/20/2014,00:50:17,UTC,....,PCAP,Packet Capture File (pcap),End Time,-,-,Type: other Start Packet ID: 1,Source IP: 192.168.11.105 Destination IP: 103.4.201.12 Protocol: BAD Type: other Size: 66 Stream Data: First Packet ID: 1 Last Packet ID: 1 Packet Count: 1,2,/cases/pcap/http1.pcap,31981570,-,PcapParser,