menu
close_24px

BLOG

8 Ways to Bypass SSL Pinning in iOS Applications

Discover practical techniques to bypass iOS SSL pinning. Learn 8 ways attackers exploit iOS apps. Read our comprehensive guide now to combat such attacks.
  • Posted on: Oct 14, 2021
  • By Vaishali Nagori
  • Read time 8 Mins Read
  • Last updated on: Nov 27, 2026

The first thing I need in an iOS assessment is visibility into the app's traffic. Yet most iOS apps today implement SSL pinning, so when I set up Burp Suite and open the app, I see only failed connections.

That silence is SSL pinning at work. Until I bypass it, I can't test the backend APIs for issues like broken authentication, IDOR, or insecure session handling, and those are the flaws that put your users' data at risk.

Here is the part most teams miss, though. Pinning slows a tester down, but it doesn't stop anyone who controls the device.

So in this post, I walk you through the eight methods I use to bypass SSL pinning in iOS apps during real assessments, so you can see exactly where your own app's pinning gives way.

Key takeaways

  • SSL pinning makes an iOS app trust only a pinned certificate, public key, or SHA-256 hash, so a proxy's certificate is rejected even when a custom CA is installed on the device.
  • Identify the framework first. Flutter, Xamarin, Cordova, React Native, and native apps keep their pinning logic in different places, so each one needs a different method.
  • On a jailbroken device, Objection's ios sslpinning disable command handles the common implementations, and a Frida script covers custom pinning and React Native apps.
  • You don't always need a jailbreak. Methods 2, 3, and 8 work without one, and so does Objection with the Frida Gadget patched into the IPA.
  • Pinning still matters. Pair it with jailbreak and Frida detection, App Attest and a secure backend, then test it regularly, because every method below is one an attacker can run too.


What is SSL pinning?

SSL pinning is a technique used to prevent man-in-the-middle (MITM) attacks. Developers embed a trusted certificate, public key or SHA-256 hash in the app, and the app checks the server's certificate against it at runtime.

If they don't match, the app drops the connection, even if a custom CA certificate is installed on the device. The OWASP MASVS makes this a control in its own right: MASVS-NETWORK-2 states that "the app performs identity pinning for all remote endpoints under the developer's control."

On iOS, pinning is usually implemented using:

  • NSPinnedDomains in Info.plist (native App Transport Security pinning, iOS 14+).
  • URLSessionDelegate with a custom urlSession(_:didReceive:completionHandler:) check.
  • Third-party libraries such as TrustKit, Alamofire's ServerTrustManager, or AFNetworking.
  • Cross-platform plugins for Flutter, React Native, Cordova, and Xamarin/.NET MAUI.

That's why SSL pinning is so important for apps that handle sensitive data.

Without it, anyone who can intercept traffic—for example, on a public Wi-Fi network—can read and modify API requests between the app and its server.

 

 

Identify the framework before you choose a bypass method

 

Before I choose a bypass method, I find out how the app was built. The framework decides how the app handles network traffic and where the pinning logic lives, which tells me which method is most likely to work.

So the first step is always the same. Unzip the IPA (decrypted, if it's from the App Store) and check the Frameworks folder:

unzip test.ipa

ls Payload/test.app/Frameworks

ios ssl pinning bypass

Requirements
  • One mobile device(Android/iOS) to share the internet via Bluetooth tethering.
  • Jailbroken/Non-Jailbroken iOS device
  • MacBook

Steps to capture traffic via hotspot method 

A. Share the internet connection via Bluetooth tethering  

Turn on mobile data = > turn on mobile Bluetooth => connect to the MacBook => turn on Bluetooth tethering from setting in mobile device

(Try to browse some data in MacBook to confirm that Bluetooth tethering is done properly)

B. Share internet connection from MacBook to iPhone

a) In MacBook navigate to System preferences => sharing => internet sharing =>  share your connection from => bluetooth PAN => To computer using => wifi 

Share internet connection from MacBook to iPhone

b) In your iPhone, navigate to Wifi => connect to the Macbook's wifi 

ssl certificate for iphone

(Try to browse some data on your iPhone to confirm that this is done properly)

C. Forward the iPhone traffic to the burp suite

Create the Pf.rules file with the following data

rdr pass on bridge100 inet proto tcp from any to any -> 127.0.0.1 port 8080

Run the below two command 

sudo pfctl -f pf.rules 

IOS bypass

sudo sysctl -w net.inet.ip.forwarding=1

sysctl -w net.inet.ip.forwarding=1

 

D. Turn on the invisible proxy option in the burp suite

Open burp suite => proxy => Options => edit => Request handling => turn on support invisible peroxy 

invisible proxy option

 

Request handling


E. Start browsing the application from the iPhone and observe that the traffic will be captured in the burp suite.

Related Blog: Everything You Need to Know about iOS Jailbreak Detection Bypass

 

2. SSL pinning bypass via replacing hard-coded certificate

Some applications use a hardcoded certificate to implement SSL pinning in iOS applications. The application will check whether the certificate matches and only send the traffic to the server.

So, we'll replace the hardcoded certificate in the iOS application with our burp suite certificate and reinstall the app, and we'll be able to bypass the pinning.

Let's see how to replace the hardcoded certificate.

A. Unzip the IPA file with the following command.

unzip test.IPA

android ssl pinning bypass

B. Go to the binary

cd /Payload/test.app

cd Payload test.app


C. Search for hardcoded certificate via the following command

find . | grep .cer

hardcoded certificate

Note * certificates can be of different types also, like .pem, .cert, etc. 

D. Replace all the hardcoded certificates with your burp suite certificate

cp ~/Path_of_Your_burp_certificate  ./Full_Path_Of_Hardcoded_Certificateburp suite certificate

E. Recompile the application and install the application via Cydia Impactor

  • Compress the Payload folder with a .zip file extension.
  • Rename the above-compressed zip file to .IPA file extension.
  • Now install the application via Cydia Impactor (it will resign and install the application on the iPhone)

F. Start browsing the application from the iPhone and observe that the traffic will be captured in the burp suite.

 

3. SSL pinning bypass via replacing hard-coded Sha 256 hash 

Some applications use a hardcoded certificate hash to implement SSL pinning in the iOS application. Most applications built in Cordova use this technique to implement SSL pinning. 
So, we can replace the hardcoded certificate hash value in the iOS application with our burp suite certificate hash and reinstall the application.
Let's see how to replace the hardcoded certificate's hash value.

A. Unzip the IPA file with the following command.

unzip test.IPA

B. Go to the following location and look for the hardcoded hash; it might also be at a different location. In my case, it was there 

cd /Payload/test.app/www/pinning/pinning.json

burp ios certificate

C. Generate your burp suite certificate hash via the following command 

openssl x509 -inform DER -in cacert.cer -out cacert.crt

openssl x509

openssl x509 -in cacert.crt -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64

openssl enc -base64

D. Replace our hash value with the application hash using any editor.

E. Recompile the application and install the application via Cydia impactor

  • Compress the Payload folder with a .zip file extension.
  • Rename the above-compressed zip file to .IPA file extension.
  • Now install the application via Cydia Impactor (it will resign and install the application on the iPhone)

F. Start browsing the application from the iPhone and observe that the traffic will be captured in the burp suite.

 

4) SSL Pinning Bypass via SSL Kill Switch2 

A. Installing SSL Kill Switch 

  • Download the SSLKillSwitch deb file:
    (https://github.com/nabla-c0d3/ssl-kill-switch2/releases) 
  • Copy the deb file to your iPhone via the following command and enter the default password "alpine."

    scp /Path_Of_Downloaded_deb_file root@your_iphon_ip:/private (Folder where you want to copy the package)

  • Download Debian Package and Cydia SubstratePreferenceLoader
    Download this from Cydia. Hopefully, it has already been installed
  • Take an ssh connection and enter the default password "alpine."

    ssh root@iphone_ip

  • Enter the following command to install the SSL Kill Debian package or install it from filza

    dpkg -i ssl.deb 

B. Go to settings & look for the SSL Kill Switch application.

 

SSL kill switch

C. Click on Disable SSL Certificate, and SSL pinning of all the applications will be bypassed. 

SSL kill switch 2

 

D. Start browsing the application from the iPhone and observe that the traffic will be captured in the burp suite.

 

5. Bypassing SSL pinning via MITM 

Some application traffic can not be captured directly via the burp suite. In such cases, MITM comes into the picture. Instead of capturing the traffic via the burp suite, we can use MITM to capture traffic and then send it to the burp suite using MITM. 

You can also use MITM with the objection, Frida script, etc. It works many times, in one of my projects I tried a lot to bypass SSL pinning but nothing worked. Then, in the end, with one Frida script and MITM, I captured the traffic. 

i) Install mitmproxy via the following command on MacBook

brew install mitmproxy

ii) Download the MITM certificate in the iPhone
a) Connect the iPhone and Macbook via USB and Enter the below command
mitmproxy

mitmproxy

 

b) Enter the below command in the iPhone browser 
Mitm.it (Download the iOS certificate)

Download the iOS certificate

 

iii) Install the MITM certificate on the iPhone

In iPhone navigate to Setting  => Install Profile => Setting =>  Trust certificates => Certificate Trust Settings => Enable mitmproxy

iv) Enter the below command to start the mitmproxy in the Browser.

mitmweb  (mitm get open in the browser automatically) 

mitmweb

v) Setup MITMProxy for forwarding traffic from the MITM to the burp suite.
a) Enter the below command

mitmweb

b) Go to the option. Click on "Edit Options" and on "set this configuration"set this configuration

c) Search for mode and add the following line there 

upstream: http://127.0.0.1:8888

 

bypass ssl

d) Search for ssl_insecure and enable it

 

        ssl_insecure

 

e) Set upstream proxy in burp suite.

Set the IP address and port no in the burp suite that you have set for the upstream in mode option.

f) Start browsing the application from the iPhone and observe that the traffic will be captured in the burp suite.

 

6) SSL Pinning Bypass via Objection

a) Install Frida Server:

From iPhone open Cydia => Source => Edit => Add => https://build.frida.re => search =>frida =>Install

By default the Frida server is running up on the iPhone, you don't need to start a Frida server every time. 

b) Install objection in MacBook

sudo pip3 install objection

Note* While using objection make sure the application is opened in the device, otherwise objection wouldn't work.

c) Enter the below command to connect the application to the objection and explore the application.

objection --gadget package_name explore

bypass ssl pinning jailbreak

 

d) Run the below command to bypass SSL pinning

ios sslpinning disable

 

ios sslpinning disable

 

e) Start browsing the application from the iPhone and observe that the traffic will be captured in the burp suite.

 

7) SSL Pinning bypass via Frida

i) Enter the below command to bypass SSL pinning

frida -U -f package_name -l ssl.js --no-pause

U => To use a connected USB device as a target 

F =>  To indicates the package name

L =>  To load the script

ssl.js =>

(Download the script from Codeshare according to your iOS version)

--no-pause => To force Frida to "not to pause" app execution after injecting the script. 

ii) Start browsing the application from the iPhone and observe that the traffic will be captured in the burp suite.

 

8) SSL Pinning Bypass via Info.Plist modification

Some applications define the pinning rules in the Info.Plist file and set the boolean value. We can modify these boolean values from true to false and bypass the SSL pinning. 

i) Go to the binary of the IPA file and open Info.plist file.

ii) Data is present and key-value pair and now search for the keywords like <key>TSKEnforcePinning</key>,<key>NSRequiresCertificateTransparency</key> etc. 

iii) Change the value of these from true to false and reinstall the application. 

iv) Start browsing the application from the iPhone and observe that the traffic will be captured in the burp suite.

 

Conclusion 

The amount of private and sensitive information handled by mobile apps these days makes them a lucrative target of threat actors. In the case of iOS applications, attackers would generally begin by bypassing the SSL/TLS protection layer and gaining more information about the apps' functionality and structure. That is why in-depth penetration testing becomes a must, and knowing the several techniques used by attackers to bypass SSL pinning can be a very proactive start in this direction. 

Based on the insights gained, you can always add additional security measures to your app and stay ahead of attackers. 

 

FAQs

1. Are there any risks associated with bypassing SSL pinning in mobile apps?

Yes, bypassing SSL pinning in mobile apps can expose apps to considerable risks. Some of them are:

  1. Man-in-the-Middle (MITM) attacks: SSL pinning prevents attackers from intercepting and manipulating data exchanged between the app and server. This can expose sensitive information like login credentials, payment details, or personal data.
  2. Data breaches: Hackers can decrypt and steal data by bypassing SSL pinning, which weakens encryption. This may result in major breaches and financial or legal consequences.
  3. Unauthorized API access: Hackers can intercept API requests, modify them, or inject malicious code, potentially gaining unauthorized access to back-end systems.
  4. Loss of user trust: If users' sensitive data is compromised, it can severely damage the app and company's reputation, resulting in loss of trust and user abandonment.

2. Can SSL pinning be bypassed without rooting or jailbreaking a device?

Yes, SSL pinning can be bypassed on non-rooted devices, but it's tricky. Attackers often use dynamic instrumentation tools (e.g., Frida or Xposed) to manipulate the app's behavior at runtime and bypass. These tools can intercept SSL certificates and bypass pinning checks without modifying the device.

3. What tools or frameworks commonly bypass SSL pinning in iOS apps?

Frida is one of the most popular tools. It allows attackers to inject scripts and bypass SSL pinning checks without modifying the app’s code. Another widely used tool is Objection, which is built on Frida. It makes it easier to automate SSL pinning bypass with minimal effort.

SSL Kill Switch is a framework designed to disable SSL pinning in iOS apps by patching security functions.

4. Are there any best practices for developers to enhance the security of mobile apps against SSL pinning bypass attacks?

Follow the below best practices to enhance mobile app security against SSL pinning bypass attacks.

First, implement strong obfuscation techniques to make it harder for attackers to reverse-engineer the app’s code. Use certificate transparency and public key pinning instead of hardcoding certificates, ensuring real-time validation. Regularly rotate certificates and keys to reduce the risk of misuse.

Then, integrate runtime security tools that detect debugging or tampering attempts. Finally, security audits and penetration testing should be conducted to identify and address vulnerabilities before attackers can exploit them.