Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

session key file and pcapng format support #364

Open
sergey-safarov opened this issue Jun 13, 2021 · 5 comments
Open

session key file and pcapng format support #364

sergey-safarov opened this issue Jun 13, 2021 · 5 comments

Comments

@sergey-safarov
Copy link
Contributor

sergey-safarov commented Jun 13, 2021

I want to implement on Kamailio server-side logging of session encryption keys.
This will allow the embed key into PCAPNG file and a simple open file in Wireshark. Using editcap utility.
More info.

The new file will have PCAPNG format (description) (description source).

This will allow me easily debug TLS calls using Wireshark.

But on the remote server, I love to use sngpre.

Could you add support:

  1. to load decryption session keys like it does Wireshark;
  2. read pcapng format files with embedded session keys;
  3. write pcapng format files with embedded session keys.

Relevant info
feature ticket on Wireshark tracker
wiretap description used for reading writing pcapng files;
wiretap header files and lib API calls
feature commit message

@sergey-safarov
Copy link
Contributor Author

The same approach may be used for DTLS traffic decryption
dtls12-aes128ccm8-dsb.pcapng

@Kaian
Copy link
Member

Kaian commented Jun 16, 2021

Hi @sergey-safarov !!

Currently sngrep 1.x is just being updated only with bugfixes or small enhacements, so changes like this won't probably fit there.

There is a glib-2 branch that could be the base of sngrep 2.x release that could be enhanced to contain this features, but its development is quite slow as we have other projects in progress right now.

I will leave open this for future reference.

Thanks for all the information!

@sergey-safarov
Copy link
Contributor Author

Hi @Kaian
I prepared tls-with-keys.pcapng with two encrypted calls.

  1. with DTLS;
  2. without DTLS.

Think it will be helpful for testing.
tls-pcap.tar.gz

@sergey-safarov
Copy link
Contributor Author

Here is a webRTC traffic example with embedded TLS keys.
WebRTC-client.pcapng.gz

@sergey-safarov
Copy link
Contributor Author

Here is a tool that allow capture TLS traffic without encryption keys
site https://ecapture.cc/
movie https://www.youtube.com/watch?v=CoDIjEQCvvA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants