tcpdump 出力フィルタリング (PCAP)

tcpdump 出力フィルタリング (PCAP)

以下は私のPCAPファイルの出力です。

20:02:52.306161 192.162.70.150.58078 > 192.179.91.61.1194: P 635362993:635363048(55) ack 2046024708 win 4373 <nop,nop,timestamp 52993632 1059054949> (DF)
20:02:52.532863 192.179.91.61.1194 > 192.162.70.150.58078: . ack 55 win 32038 <nop,nop,timestamp 1059062357 52993632> (DF)
20:02:53.157004 802.1d unknown version
20:02:54.759542 arp who-has 192.168.70.34 tell 192.168.70.1
20:02:55.156980 802.1d unknown version
20:02:55.759507 arp who-has 192.168.70.6 tell 192.168.70.1
20:02:55.759540 arp who-has 192.168.70.105 tell 192.168.70.1
20:02:56.148167 192.179.91.61.1194 > 192.168.70.150.58078: P 1:56(55) ack 55 win 32038 <nop,nop,timestamp 1059065972 52993632> (DF)
20:02:56.148258 192.168.70.150.58078 > 192.179.91.61.1194: . ack 56 win 4373 <nop,nop,timestamp 52994592 1059065972> (DF)

次のパターンでコンテンツをフィルタリングする方法はありますか?

Timestamp | source IP | source Port | destination IP | destination port | protocol | packet size

利用可能なコマンド:tcpdump、、、、、、tcpslicetcpstattcpproftcpparse

ベストアンサー1

コマンドラインからtcpdumpを分析するには、tcpparse次のコマンドを使用できます。たとえば、

# tcpparse tcpdump_file.pcap

6 192.135.33.41 132 > 192.168.20.119 1544 74
6 192.168.20.119 57604 > 192.135.33.41 1194 66
6 192.168.20.119 57604 > 192.135.33.41 1194 110
6 192.135.33.41 1194 > 192.168.20.119 57604 66
6 192.135.33.41 1194 > 192.168.20.119 57604 122
6 192.168.20.119 57604 > 192.135.33.41 1194 66
6 192.168.20.119 57604 > 192.135.33.41 1194 118

熱説明:-

  1. 規約
  2. 送信元IPアドレス
  3. ソースポート
  4. 宛先IPアドレス
  5. 宛先ポート
  6. パケットサイズ。

同じようにtcpdump -r使用できます。

おすすめ記事