SSL Pinning and Bypasses

Null Meet Bangalore

21 November 2015

Slides

Abstract

This talk will focus on following items

Both implementation and Bypass will be covered in the session.

AI Generated Summary

AI Generated Content Disclaimer

Note: This summary is AI-generated and may contain inaccuracies, errors, or omissions. If you spot any issues, please contact the site owner for corrections. Errors or omissions are unintended.

This presentation covers SSL/TLS certificate pinning implementation and bypass techniques on both Android and iOS platforms. Anant Shrivastava explains why PKI is fundamentally broken, how SSL pinning adds a critical defense layer against man-in-the-middle attacks, demonstrates pinning implementations using libraries like OkHttp (Android) and SwiftHTTP/TrustKit (iOS), and then shows how to bypass these protections using Xposed Framework (JustTrustMe) on Android and SSL Kill Switch 2 on iOS.

Key Topics Covered

Actionable Takeaways

  1. Implement SSL certificate pinning in all mobile applications handling sensitive data — it adds a critical defense layer that prevents MITM interception without device rooting or jailbreaking.
  2. On Android, use OkHttp’s CertificatePinner or similar libraries to pin SHA1 hashes of the certificate chain, and plan for certificate rotation by including backup pins.
  3. On iOS, leverage TrustKit or SwiftHTTP for simplified pinning implementation, or implement directly via SecTrustEvaluate through NSURLConnectionDelegate for maximum control.
  4. When performing penetration tests on pinned Android apps, use Xposed Framework with the JustTrustMe module to bypass OkHttp and other common pinning implementations.
  5. For iOS penetration testing, use ssl-kill-switch2 (successor to ios-ssl-kill-switch) which hooks at the Secure Transport API level — the lowest-level TLS implementation on iOS — to bypass all higher-level pinning implementations.
  6. Understand that SSL pinning requires application updates whenever certificates change — design your pinning strategy to include backup pins and plan for certificate rotation to avoid breaking the application when certificates are renewed or replaced.

Social chatter