Results 1 to 1 of 1
  1. #1
    monkey521 is offline Member
    Join Date
    Jan 2016
    Posts
    6
    Rep Power
    0

    Default decrypt https tls/ssl traffic with java

    Hy there,
    I am looking for a way to decrypt my https traffic with java. I have looked around and this is a question that was already asked but I got only to a certain point and now I am stuck. Since I cannot contact the other people who asked similar questions and cannot find out if they found a solution I am posting my own question.

    My scenario is:
    I configured a system variable so that Firefox saves the ClientRandom and RSA keys to a txt file. With this txt file wireshark is able to decrypt a ssl/tls capture. I use jnetpcap library to capture traffic and analyse packages up to tcp segments. I am now looking for a possibility to access the ssl/tls info, meaning decrypt the traffic like wireshark does. From my understanding I cannot compute the MasterSecret because I only have the encrypted PreMaster in the Client Finished package. I would need the private exponent d to decrypt it, wouldn't I!? Further more it seems like I need more info than just the ClientRandom!? I also found this:
    http://www.java-forums.org/advanced-...tml#post410944
    what seems to be pretty close to my problem.

    Now I am wondering if there is a java library that maybe does what I need or if I have to implement it all myself by exploring every byte of the tcp-payload. I have looked shortly into bouncy castle because it was mentioned in another forum, but I couldn't find an answer there too. Maybe someone can just give me a hint where to look, maybe bouncy castle is the right place? or maybe JSSE? But I don't want to make a SocketConnection I just want to decrypt the packages, so I think these libraries are not what I am looking for.

    Thnx in advance for any help!

    P.S. found out I got the MasterSecret in that txt file (Firefox writes in), so now I need to find out a way to decrypt the data.
    Last edited by monkey521; 02-19-2016 at 03:29 PM.

Similar Threads

  1. how to decrypt emails and attachments in java
    By fynn in forum New To Java
    Replies: 7
    Last Post: 07-27-2014, 04:37 PM
  2. encrypt and decrypt in java
    By Ashwin94 in forum New To Java
    Replies: 7
    Last Post: 08-09-2013, 05:31 PM
  3. Generate pdf using Java Servlet in HTTPS(SSL)
    By tuxian in forum Advanced Java
    Replies: 1
    Last Post: 10-23-2012, 11:17 AM
  4. Traffic statistics in java
    By jerry jessie in forum New To Java
    Replies: 1
    Last Post: 01-25-2012, 06:36 AM
  5. HTTPS POST Using Java
    By drcman in forum Advanced Java
    Replies: 7
    Last Post: 02-13-2010, 03:19 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •