I am capturing traffic using:
tcpdump -i <interface> -nn -s0 -w ike2.pcap
Then I am reading the captured file using:
tcpdump -vvv -l -r ike2.pcap
While reading, the first packet is getting displayed as:
07:22:33.320142 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], length: 296) 10.0.0.1.isakmp > 10.0.0.2.isakmp: [udp sum ok] isakmp 2.0 msgid cookie ->: phase 1 I #34[]:
(#33)
(#34)
(#40)
(#41)
(#41)
I need to get the details of this packet. In this ISAKMP IKEv2 packet, I am interested to extract the values of 'Encryption Algorithm' and 'Integrity Algorithm' (i.e 'ENCR_3DES' and 'AUTH_HMAC_MD5_96')
I can view the values if I inspect the packet in wireshark. But, I have to do this from a shell script, so I cannot use wireshark. I need to get these values from tcpdump read command itself.
I am assuming there might be some way to print the encryption and integrity algorithms used from tcpdump read command. Could you please help to figure this out.
Captured packet: