見出し画像

【EVE-NG】EVE-NG上の通信をWireSharkでパケットキャプチャする

はじめに

EVE-NG上の通信をWireSharkでパケットキャプチャをしたいです。

使用環境と確認日

ハイパーバイザ:hyper-v
EVE-NG:eve-ce-prod-5.0.1-24-esxi-ws-full.iso

確認日:2024/5/3

方針

結論から言うと、WireSharekのsshdumpツールを使用して遠隔からキャプチャする

※NW機器の仮想IF名(vunlx_x_x)は下の画像のように左下に出てきます。


キャプチャ手順

EVE-NG側の確認の確認

仮想マシンにログインして「tcpdump --v」を実行し、インストールされていることを確認

root@eve-ng:~# tcpdump --version
tcpdump version 4.9.3
libpcap version 1.9.1 (with TPACKET_V3)
OpenSSL 1.1.1f  31 Mar 2020

※もしなかったらapt-getなどでインストールが必要。EVE-NGはdebianベースなので恐らくapt-getでインストール可能。

Windows側の確認

キャプチャ対象に「SSH remote capture」があることを確認。

※WireSharkをNext連打でインストールするとsshdumpは入らないので、これが無ければアップデートや再インストールを実施。(下記画像のようにチェックを入れる)

キャプチャ

WireSharkの「SSH remote session」の歯車を左クリック

すると設定画面が出るので設定を入れていく。

ServerタブにはEVE-NGのIPアドレスを設定する。

AuthenticationタブにはLinuxログイン時のuser/passを設定。

Captureタブにはリモートインタフェース名(原因調査の項で調べた”vunl0_3_1”など)を設定

キャプチャできた

余談 tcpdumpでキャプチャ

eve-ngのCLIでIFを調べると、仮想IFが沢山定義されていることが分かり、vunl0_x_xは仮想IF名であることが分かる。

root@eve-ng:~# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:15:5d:0b:96:03  txqueuelen 1000  (Ethernet)
        RX packets 11748  bytes 2643724 (2.6 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6522  bytes 4548337 (4.5 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

(略)

vunl0_3_0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        ether 12:a7:7d:a9:da:11  txqueuelen 1000  (Ethernet)
        RX packets 4300  bytes 323667 (323.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 985  bytes 337845 (337.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vunl0_3_1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        ether 72:87:14:23:31:4d  txqueuelen 1000  (Ethernet)
        RX packets 4002  bytes 563916 (563.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1973  bytes 175747 (175.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

なので、eve-ngのCLIでtcpdumpを取得すればキャプチャできる。

root@eve-ng:~# tcpdump -i vunl0_3_1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vunl0_3_1, link-type EN10MB (Ethernet), capture size 262144 bytes
05:13:04.603422 CDPv2, ttl: 180s, Device-ID 'WAN-A-L2-001', length 449
05:13:06.224494 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:06.668262 IP 172.17.222.17 > 224.0.0.10: EIGRP Hello, length: 40
05:13:07.599383 Loopback, skipCount 0, Reply, receipt number 0, data (40 octets)
05:13:08.225060 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:09.681765 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 50:00:00:01:00:00 (oui Unknown), length 303
05:13:10.232033 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:11.523811 IP 172.17.222.17 > 224.0.0.10: EIGRP Hello, length: 40
05:13:12.237410 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:12.860641 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 50:00:00:01:00:00 (oui Unknown), length 303
05:13:14.205234 CDPv2, ttl: 180s, Device-ID 'LOC-M-WR-001', length 381
05:13:14.238139 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:16.240225 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:16.362797 IP 172.17.222.17 > 224.0.0.10: EIGRP Hello, length: 40
05:13:16.860046 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 50:00:00:01:00:00 (oui Unknown), length 303
05:13:17.603096 Loopback, skipCount 0, Reply, receipt number 0, data (40 octets)
05:13:18.243632 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:20.245953 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:20.766207 IP 172.17.222.17 > 224.0.0.10: EIGRP Hello, length: 40
05:13:22.253993 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:24.256559 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:25.198860 IP 172.17.222.17 > 224.0.0.10: EIGRP Hello, length: 40
05:13:26.269502 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:27.611441 Loopback, skipCount 0, Reply, receipt number 0, data (40 octets)
05:13:27.691036 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 50:00:00:01:00:00 (oui Unknown), length 303
05:13:28.274007 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:29.973028 IP 172.17.222.17 > 224.0.0.10: EIGRP Hello, length: 40
05:13:30.276328 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:30.870501 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 50:00:00:01:00:00 (oui Unknown), length 303
05:13:32.279485 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:34.282217 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:34.422298 IP 172.17.222.17 > 224.0.0.10: EIGRP Hello, length: 40
05:13:34.871033 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 50:00:00:01:00:00 (oui Unknown), length 303
05:13:36.286079 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43
05:13:37.613705 Loopback, skipCount 0, Reply, receipt number 0, data (40 octets)
05:13:38.290588 STP 802.1d, Config, Flags [none], bridge-id 800a.50:00:00:03:00:00.8002, length 43

参考


この記事が気に入ったらサポートをしてみませんか?