Android SSL/TLS Pinning
by - Thursday, January 1, 1970 at 12:00 AM
Hello every body, 
this is protection method for using SSL/TLS in Android as far as know :

TrustManager
[align=justify]TrustManager is a component responsible for deciding whether the Android app should accept credentials submitted by the peer or not
This mechanism is sourced from the javax.net.ssl package and you can use it to implement Android Certificate Pinning.
[/align]

OkHttp and CertificatePinner
OkHttp by Square is a very popular HTTP client library for Java and Android.
The library is used by one of the most popular tools for handling REST communication in Android - Retrofit.
OkHttp provides a mechanism that makes implementing Certificate Pinning easy, as it only requires creating an instance of CertificatePinner using a dedicated builder with its corresponding fingerprints.
The fingerprints need to be hard-coded into the Android app, of course. Then, you need to build an OkHttpClient instance with the CertificatePinner.


Network Security Configuration
The Android platform provides a new, easy tool to handle network configuration - Network Security Configuration (NSC). 
It has been available since Android 7.0. With NSC, you can declare secure communication methods, including Android Certificate Pinning, using XML files. 
To enable the configuration, you need to bind a configuration file with the Manifest. To bind it, use the networkSecurityConfig attribute in the application tag.

what the most secure certificate pinning ?

For Implement

https://breached.to/Thread-Android-SSL-TLS-Pinning-Source-Code-Implement

Thank's
Reply
let me check what you already have...


...given your overview. I would first go for the android builtin ways. I would assume them to be as safe as possible since android-provided.
Reply
Thank
Reply
THank's :)
Reply
niceeeeeeee


thanksssssssss
Reply
nice share bro
Reply
mto brigado
Reply
want to learn bro...
Reply
SSL/TLS pinning should only one part of your security, its mainly there to prevent stuff like a rogue VPN or root certificate from gathering your data but with something like Frida you can bypass it and see what is being sent.

Edit to answer the actual question: I believe some library's like OkHttp use trust manager as part of their code but I don't have much experience with android app development so could be wrong, you should also consider what platform you want your app to support i.e. if you go with NSC (Android 7+) will your app only be on Android 7+ or will you have it fullback to something like Trust manager/ OkHttp for backwards compatibility.
Reply
@datadumper...good point..backwards compatibility could be important depending on your app
Reply


 Users viewing this thread: Android SSL/TLS Pinning: No users currently viewing.