# Using mitmdump with hooked ssl session

**URL:** https://discourse.mitmproxy.org/t/using-mitmdump-with-hooked-ssl-session/75
**Category:** help
**Created:** [July 10, 2016, 5:01pm UTC](https://discourse.mitmproxy.org/t/using-mitmdump-with-hooked-ssl-session/75 "2016-07-10T17:01:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pavel-lazar](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@pavel-lazar](https://discourse.mitmproxy.org/u/pavel-lazar)
#### Post date: [July 10, 2016, 5:01pm UTC](https://discourse.mitmproxy.org/t/using-mitmdump-with-hooked-ssl-session/75/1 "2016-07-10T17:01:54Z")

</div>

Hi,  
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?  
Thanks,

---

<div class="post-metadata">

### Author: ![mhils](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mhils/32/7_2.png) [@mhils](https://discourse.mitmproxy.org/u/mhils)
#### Post date: [July 11, 2016, 2:50am UTC](https://discourse.mitmproxy.org/t/using-mitmdump-with-hooked-ssl-session/75/2 "2016-07-11T02:50:35Z")

</div>

Hi @pavel-lazar,

I think there are two ways you can go for: First, use something like [https://github.com/iSECPartners/Android-SSL-TrustKiller](https://github.com/iSECPartners/Android-SSL-TrustKiller) 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 netlib.http.http1.read primitives for this. Here’s an example where we are doing something similar: [https://github.com/jbremer/httpreplay/blob/master/httpreplay/main.py#L49](https://github.com/jbremer/httpreplay/blob/master/httpreplay/main.py#L49)

---

<div class="post-metadata">

### Author: ![pavel-lazar](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@pavel-lazar](https://discourse.mitmproxy.org/u/pavel-lazar)
#### Post date: [July 11, 2016, 3:27am UTC](https://discourse.mitmproxy.org/t/using-mitmdump-with-hooked-ssl-session/75/3 "2016-07-11T03:27:46Z")

</div>

Hi,  
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.
