Hello, I work with wireshark a lot and I need to decode a LOT of traces that have ESP. It takes a long time to manually enter in all the information necessary in the GUI to decode each different trace, so I am trying to figure out a way to pass the ESP decryption parameters as command line arguments to tshark or wireshark. Or even be able to edit a file like esp_sa where I can just append the necessary keys with a script then open with wireshark. This hasn't worked however, so I am hoping to find someone who knows how to do this. Any help is appreciated! Thanks, Jon asked 11 Jul '13, 14:41 Lemurshark |
One Answer:
I just did a quick test, and the following works on my system. Step #1: Create a file esp_sa in the application data directory of the User. Simply create SA entries in the GUI and then use the created file as a template. Edit -> Preferences -> Protocols -> ESP -> ESP SAs. Sample File (for the capture file I posted in this question - scroll down to the ESP part):
Step #2: run tshark with the following option (additionally to your other options): -o esp.enable_encryption_decode:TRUE. This is not necessary, if you set the same option in the GUI (will be written into the preferences file).
did you get an error message? If no, what exactly did not work? This is what I get (frame #12/#13 are the decrypted ESP frames).
Regards answered 11 Jul ‘13, 16:41 Kurt Knochner ♦ edited 11 Jul ‘13, 16:45 |
Thanks Kurt. I tried appending the lines to esp_sa again and it worked. I don’t know what was wrong the first time that it didn’t decode the ESP, but it’s working now! This really helps as I’ve just written a script to decrypt the traces, and it’s much faster than entering them by hand.