NetBare-Android icon indicating copy to clipboard operation
NetBare-Android copied to clipboard

Some application do not work when NetBare is running

Open azavada opened this issue 6 years ago • 3 comments

Android: 7.1.2 NetBare: the latest (commit a42f9e4)

Noticed that many applications (PlayStore, Twitter, Facebook, Reddit, Slack) on Android phone do not work properly or doesn't work at all when NetBare is running. My assumption is that this is due to certificate pinning. Sometimes I see errors in log: Handshake failed and Connection reset by peer

Do you have any idea why this is happening? Not sure what additional information I may provide to help resolve this. Anyway I am opened to help with this issues.

azavada avatar Mar 29 '19 12:03 azavada

There are two possible reasons.

  1. From Android Nougat(7.0), Google changed the network security policy. Self-signed Certificate Authorities (CA) are not trusted by system. Some solutions here, https://github.com/MegatronKing/HttpCanary/tree/master/docs/v1/en-US#2-android-70optional

  2. Some apps may do cert pinning, you can use Xposed module to disable cert pinning, please see this one, https://github.com/Fuzion24/JustTrustMe

MegatronKing avatar Mar 29 '19 12:03 MegatronKing

@MegatronKing I notice that Charles Proxy on iOS can identify when pinned certificates are required and transparently proxies those requests instead of trying to MITM them.

Do you have suggestions on a mechanism for identifying when pinned certificates are required? I'd try to get that built and create a pull requests here for NetBare. Thanks!

MrChrisRodriguez avatar Mar 29 '19 15:03 MrChrisRodriguez

@MrChrisRodriguez Maybe should sniff SSL packets before routing them to SSLCodecInterceptor, I think add some logic in HttpSniffInterceptor is a good choice. If you can create a PR, it is welcome!

MegatronKing avatar Mar 29 '19 15:03 MegatronKing