Using fiddler causes some of the applications to stop working correctly on my windows machine. I want to use wireshark to decrypt all ssl traffic between my tomcat and a remote server. All traffic is https.
I was able to set environment variable SSLKEYLOGFILE and decrypt all SSL traffic generated by the browser. But that does not work for service to service calls. Having access to the private key of tomcat does not help anymore because of something called forward secrecy (I don't know much about that). From what i read having access to the session key is the easiest way to decrypt in wireshark.
So my problem can be solved if someone can answer any one of the following questions.
1>Is there a way to get tomcat 8 to spit out session keys to a file so that wireshark can use it to decrypt SSL traffic. I am using java 8.
2>Is there a tool that does not redirect traffic thru a proxy, but is able to decrypt SSL traffic out of my machine?
You can decrypt forwarded SSL traffic by uploading the private key and server certificate associated with that traffic. The certificate and key are uploaded over an HTTPS connection from a web browser to the ExtraHop system. After upload, private keys are encrypted and stored on the ExtraHop system.
SSL Decryption, also referred to as SSL Visibility, is the process of decrypting traffic at scale and routing it to various inspection tools which identify threats inbound to applications, as well as outbound from users to the internet.
You can extract the keys needed by Wireshark from any Java application using the extract-ssl-secrets tool.
CATALINA_OPTS="${CATALINA_OPTS} -javaagent:<absolute path to>/extract-ssl-secrets-1.0.0.jar=/tmp/secrets.log"
to CATALINA_BASE/bin/setenv.sh
(create it if missing)wireshark -o ssl.keylog_file:/tmp/secrets.log
See troubleshooting section if it doesn't work right out of the box.
You can do this if you have:
Steps:
ECDHE
or DHE
cipher suites are available. Examples of acceptable cipher suites are SSL_RSA_WITH_3DES_EDE_CBC_SHA
or TLS_RSA_WITH_AES_128_CBC_SHA256
.The reason you have to limit the cipher suites is because these days, TLS will use an ephemeral key exchange algorithm (DHE
!). This is what makes Perfect Forward Secrecy (PFS) work. You have to break the PFS so that the compromised RSA key (you have "compromised" it by listening-in with Wireshark) can be used to sniff the conversation.
The good news is that you don't have to mess-around with tricking the client or server to drop the ephemeral key somewhere like you did with your web browser. The bad news is that you have had to expose your server key to another host (your workstation where Wireshark is running) and you had to degrade your conversation's security. But this is only for testing, right? ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With