Amarisoft

How to decrypt Wireshark ESP packets and extract SIP messages

 

When IPsec is used , SIP messages get encrypted and becomes unreadable as soon as UE switches on IPsec ports. only ESP encrypted traces are displayed

This looks like this :

 

Dump IPsec parameters from Amarisoft IMS log

Before to configure your wireshark, you need first to change the log verbosity at ims side to dump IMS keys used :

In ims.cfg > log_options: > add "ims.key=1"

The following information will be extracted :

You will also find required information (SPI , Encryption and Authentication algorithm) in the REGISTER or 401 Unauthorized : Security-Server: ipsec-3gpp;prot=esp;mod=trans;spi-c=1860862608;spi-s=1860862609;port-c=58928;port-s=60200;alg=hmac-md5-96;ealg=des-ede3-cbcOnce you have these information, you can configure your wireshark

 

Wireshark setting

Click on OK .

As a result, you should see now the SIP message decrypted like this :