Read the information that my computer sends via ssl connection

I would like to read the information that the java application in firefox sends to the site via an ssl connection.

I use WireShark, and I believe that if I can somehow say that I ask you to comment on which encryption key firefox uses, then wirehark will be able to decrypt ssl messages.

Then I will definitely receive information about what this site receives about my computer.

We apologize if the question is vague ... any pointers to where to start looking for clues will be appreciated.

+4
source share
3 answers

Not related to programming.

However, for this you will need a certificate for the site to which your application connects, both to the public and private key parts - therefore, if this is not the site you own, you will not be able to do this. If you control the host website, simply follow the instructions on the wirehark wiki page.

+2
source

Assuming you're not trying to do this programmatically, but instead just want to view the headers during debugging, you can use Charles:

http://www.charlesproxy.com/

Here is information on how to configure it to decrypt SSL traffic:

http://www.charlesproxy.com/documentation/using-charles/ssl-proxying/

+1
source

A Java application will encrypt all information using a public (SSL) server certificate (at least as far as you are concerned). For all practical purposes, the only way to decrypt it later is to know the secret key of the server, which you apparently lack, and therefore you cannot decrypt it.

To answer your comment about whether to use the computerโ€™s private key:

If this is a โ€œnormalโ€ SSL connection, the client (java application) will contact the server and get its public key, confirm it is correct (signed by a trusted CA), and then use it to negotiate a symmetric key, which is used for encryption.

Public / private keys work in such a way that everything encrypted with one key can only be decrypted with another, that is, everything that a Java application encrypts using the serverโ€™s public key can only be decrypted using the private key โ€” which never leaves the server.

SSL / TLS supports client certificates in which a Java application can have its own key pair and use its private key to sign the content in order to authenticate itself. However, even if the Java application does this (doubtfully), it does not help, because the data will still be encrypted, so only the server can decrypt it.

Background reading: http://en.wikipedia.org/wiki/Transport_Layer_Security and http://en.wikipedia.org/wiki/Public-key_cryptography

0
source

Source: https://habr.com/ru/post/1299239/


All Articles