Created
February 10, 2017 16:29
-
-
Save brb/3e634b268193ada4fe20d9743de6b96e to your computer and use it in GitHub Desktop.
Decrypt AES-GCM ESP (VXLAN) packets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eu | |
HOST=$1 | |
PCAP=$2 | |
AWK_CMD='{print "\"IPv4\",\"" $2 "\",\"" substr($4, 1, length($4)-1) "\",\"" $8 "\",\"AES-GCM [RFC4106]\",\"" $19 "\",\"ANY 128 bit authentication [no checking]\",\"\""}' | |
ssh $HOST "sudo ip -o xfrm state" | awk "$AWK_CMD" >> $HOME/.config/wireshark/esp_sa | |
tshark -o esp.enable_encryption_decode:TRUE -d udp.port==6784,vxlan -nr $PCAP esp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment