Using mitmdump with hooked ssl session

I am investigating an android app that uses cert pinning and therefore cannot use mitmproxy to intercept the traffic. I have used frida to hook the SSL_read/write/new functions and there I am receiving the HTTP traffic within my python script. I would like to create a flow dump of the traffic and uses mitmdump capabilities and parsing methods. I am finding it difficult to hook the read/write buffers into a Flow. It seems that it is tightly coupled with a TCP/SSL connection. Can you advice me how can I easily create a flowdump that will be accepted by mitmdump?

Hi @pavel-lazar,

I think there are two ways you can go for: First, use something like to disable cert pinning and use mitmproxy regularly. Second, if you want to create mitmproxy dump files from plain connection logs, you can use the primitives for this. Here’s an example where we are doing something similar:

Thanks for the response. Since I prefer not to rely on the exact way an app is doing the cert pinning in java (which ssl-trust-killer relies on) and I think SSL_read/write hooks are more general I will try the second approach.