Back to skills
SKILL.md
Ios Pentesting
ASecurityiOS app testing: IPA decryption, Frida, storage, ATS, pinning
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added November 29, 2026
Works with
Security analysis
100/100Pro scans all 3 files and shows the line behind each finding
npx -y skills add blackfoxxx/kestrel --skill ios-pentesting --agent claude-codeAre you the author of Ios Pentesting?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/blackfoxxx-ios-pentesting)---
name: ios-pentesting
description: "iOS app testing: IPA decryption, Frida, storage, ATS, pinning"
metadata:
tags: "ios,ipa,frida,objection,mobile-security,ssl-pinning,keychain,mach-o,jailbreak"
category: mobile
mcps: autopen, pentest mcp, context1337
---
# iOS Application Penetration Testing Methodology
> **Phase flow**: Environment setup → IPA static analysis → Dynamic analysis (Frida) → Data storage security → Network communication security → Protection bypass
## Deep Reference
- IPA static analysis detailed commands, Mach-O binary analysis, plist audit → [references/ios-static-analysis.md](references/ios-static-analysis.md)
- Frida Hook scripts, Objection usage, Keychain extraction → [references/ios-frida-dynamic.md](references/ios-frida-dynamic.md)
---
## Phase 0: Environment Setup
### Device Requirements
| Environment | Recommendation |
|-------------|----------------|
| Jailbroken device | Checkra1n / Palera1n (iPhone X/A11 and earlier recommended); Dopamine (iOS 15–16.6.1 arm64e) |
| Jailbreak type | Full jailbreak preferred (persistent); rootless jailbreak has limitations |
| Essential Cydia/Sileo packages | OpenSSH, debugserver, Frida, Filza, Liberty Lite/Shadow |
| iOS version | Jailbreak coverage varies by version — check ios.cfw.guide |
### Core Toolchain
| Tool | Purpose |
|------|---------|
| Frida + frida-tools | Dynamic Hook / runtime analysis |
| Objection | Frida automation wrapper |
| class-dump / dsdump | Dump ObjC class headers from binary |
| otool / jtool2 | Mach-O binary analysis |
| plutil | plist parsing |
| r2 / Ghidra / IDA | Disassembly / reverse engineering |
| Burp Suite | Traffic interception |
| SSL Kill Switch 2 | System-level SSL pinning bypass Tweak |
| ipatool | Download IPA from App Store |
| bagbak | Decrypt installed apps on jailbroken device |
### IPA Acquisition
```bash
# Method 1: ipatool (Apple ID required)
ipatool search "target app"
ipatool download -b com.target.app
# Method 2: bagbak decrypt installed app (jailbroken device)
bagbak com.target.app
# Method 3: Extract from device via SSH
# Check /var/containers/Bundle/Application/<UUID>/Target.app/
# Method 4: frida-ios-dump
python dump.py com.target.app -o target.ipa
```
---
## Phase 1: IPA Static Analysis
### IPA Decompression and Structure
```bash
# IPA is a zip file
unzip target.ipa -d ipa_contents/
cd ipa_contents/Payload/Target.app/
# Directory structure
ls -la
# Main binary: same name as app
# Info.plist: configuration
# embedded.mobileprovision: provisioning profile
# _CodeSignature/: code signature
# Frameworks/: embedded frameworks
```
### Info.plist Audit
```bash
# View main plist
plutil -p Info.plist
# Key checks
plutil -p Info.plist | grep -E 'NSApp|Transport|ATS|Bluetooth|NSCam|NSMic|NSLocation|NSPhotoLibrary|NSFace'
```
| Key | Risk | Description |
|-----|------|-------------|
| `NSAppTransportSecurity.NSAllowsArbitraryLoads: true` | High | Allows HTTP plaintext |
| `NSFaceIDUsageDescription` | Note | Face ID required |
| `NSCameraUsageDescription` | Note | Camera usage |
| URL Schemes | Medium | External launch points, prone to injection |
### Mach-O Binary Security Analysis
```bash
# View all security protections
otool -hv Target
rabin2 -I Target
# Check PIE (Address Space Randomization)
otool -hv Target | grep -i pie
# Check Stack Canary
otool -I -v Target | grep -i stack_chk
# Check ARC
otool -I -v Target | grep -i objc_retain
# Dump ObjC class list
class-dump -H Target -o headers/
# Or use newer dsdump
dsdump --objc Target 2>/dev/null | head -100
```
### String and Credential Search
```bash
# Sensitive strings
strings Target | grep -iE 'password|secret|api_key|token|private|credential'
# URLs and IPs
strings Target | grep -E 'https?://|[0-9]{1,3}\.[0-9]{1,3}'
# Bundle IDs for third-party SDKs
strings Target | grep -E '\.app$|\.sdk$'
# Firebase configuration
strings Target | grep -i firebase
```
### Embedded Frameworks Analysis
```bash
ls Frameworks/
# Common third-party SDKs
# Check whether each framework has vulnerability history
# Focus on custom frameworks — often contain business logic
```
---
## Phase 2: Dynamic Analysis (Frida / Objection)
### Frida Basic Operations
```bash
# View running apps (via USB)
frida-ps -Uai
# Spawn mode injection (from app launch)
frida -U -f com.target.app
# Attach to running process
frida -U -n TargetApp -l hook.js
# Interactive mode
frida -U -n TargetApp
```
### Objection Common Operations
```bash
# Attach to app
objection --gadget com.target.app explore
# Common commands in Objection
ios info binary # binary security info
ios keychain dump # dump Keychain
ios cookies get # get cookies
ios pasteboard monitor # monitor pasteboard
ios bundles list_frameworks # list frameworks
ios hooking list classes # list ObjC classes
ios hooking list methods --class TargetClass # list methods
ios hooking watch class TargetClass # watch class method calls
ios hooking watch method "-[TargetClass method:]" --dump-backtrace --dump-args --dump-return
ios sslpinning disable # disable SSL pinning
android root disable # (iOS) disable jailbreak detection
```
### Runtime Class Enumeration
```bash
frida -U -n TargetApp -e "
ObjC.classes // all classes
ObjC.classes['TargetClass'].\$ownMethods // specific class methods
"
```
---
## Phase 3: Data Storage Security
### Keychain Data Extraction
```bash
# Objection
objection --gadget com.target.app explore -s "ios keychain dump"
# Frida script extract Keychain
frida -U -n TargetApp -l dump_keychain.js
# Keychain-Dumper (jailbroken device)
# Transfer binary to device
ssh root@device "chmod +x /tmp/keychain_dumper && /tmp/keychain_dumper"
```
### SQLite Database
```bash
# On device (Filza or adb-equivalent SSH)
find /var/mobile/Containers/Data/Application/<UUID>/ -name "*.sqlite" -o -name "*.db"
# PC-side analysis
scp root@device:/var/mobile/Containers/Data/Application/<UUID>/Documents/*.db ./
sqlite3 app.db ".tables"
sqlite3 app.db ".schema"
sqlite3 app.db "SELECT * FROM users;"
```
### NSUserDefaults / plist Files
```bash
# NSUserDefaults storage location
ls /var/mobile/Containers/Data/Application/<UUID>/Library/Preferences/
# View plist
plutil -p /var/.../Preferences/com.target.app.plist
```
### File System Security Audit
```bash
# Check data directory
ssh root@device
ls -la /var/mobile/Containers/Data/Application/<UUID>/
# Documents/: user data, backed up
# Library/: app config, caches
# tmp/: temp files, not backed up
# Check sensitive file permissions
find /var/mobile/Containers/Data/Application/<UUID>/ -name "*.pem" -o -name "*.p12" -o -name "*.key"
```
---
## Phase 4: Network Communication Security
### Traffic Capture Configuration
```
Traffic capture method?
├─ Install Burp CA to device (Settings → General → VPN & Device Management → install)
├─ Trust certificate (Settings → General → About → Certificate Trust Settings → enable full trust)
├─ Set WiFi proxy to Burp
└─ App still uses certificate pinning → Phase 5 bypass
```
### Certificate Pinning Detection
```bash
# Static detection
grep -r "pinnedCertificates\|TrustKit\|certificate\|publicKey" headers/
strings Target | grep -i "pinning\|sha256"
# Common pinning implementations
# 1. NSURLSession delegate didReceiveChallenge
# 2. AFNetworking security policy
# 3. TrustKit
# 4. Custom SecTrust operations
```
---
## Phase 5: Protection Bypass
### SSL Pinning Bypass
```
Pinning type?
├─ NSURLSession → Frida Hook URLSession:didReceiveChallenge
├─ AFNetworking → Frida Hook AFSecurityPolicy validateServerTrust
├─ TrustKit → Frida Hook TSKPinningValidator evaluateTrust
├─ Unity app → special handling, see ios-exploiting skill
└─ Unknown → Objection universal bypass
```
```bash
# SSL Kill Switch 2 (Cydia/Sileo tweak — most universal)
# install ssl-kill-switch2 from Cydia
# enable in Settings
# Objection
objection --gadget com.target.app explore -s "ios sslpinning disable"
# Frida + ssl-kill-switch script
frida -U -f com.target.app -l ssl_kill_switch.js
```
### Jailbreak Detection Bypass
```bash
# Common detection methods
# Check /Applications/Cydia.app existence
# Check /bin/bash existence
# Check cydia:// URL Scheme
# Check common jailbreak file paths
# dyld_shared_cache integrity check
# Bypass methods
# 1. Liberty Lite / Shadow (Cydia tweak)
# 2. Objection
objection --gadget com.target.app explore -s "ios jailbreak disable"
# 3. Frida Hook
frida -U -f com.target.app -l anti_jailbreak.js
```
### Biometric Authentication Bypass
```bash
# LocalAuthentication framework
frida -U -f com.target.app -e "
var LAContext = ObjC.classes.LAContext;
Interceptor.attach(LAContext['- evaluatePolicy:localizedReason:reply:'].implementation, {
onEnter: function(args) {
var block = new ObjC.Block(args[4]);
block.implementation = function(success, error) {
block.implementation(1, null); // force success
};
}
});
"
```
---
## Phase 6: URL Scheme / Deep Link Security
```bash
# Enumerate URL Schemes
plutil -p Info.plist | grep -A5 'CFBundleURLTypes'
# Test triggers
# Method 1: Safari address bar
# Method 2: MobileTerminal
uiopen "targetapp://action?param=value"
# Check points
# 1. Missing action authentication → unauthorized operation
# 2. Sensitive parameter (token/password) passed via URL Scheme
# 3. Open Redirect (redirectTo=http://attacker.com)
# 4. Missing source app validation
```
---
## References
- [OWASP Mobile Application Security](https://owasp.org/www-project-mobile-app-security/)
- [OWASP MASTG - iOS Testing Guide](https://mas.owasp.org/MASTG/iOS/)
- [HackTricks - iOS App Pentesting](https://book.hacktricks.wiki/mobile-pentesting/ios-pentesting/)
- [Frida iOS Docs](https://frida.re/docs/ios/)
Files in this skill
- SKILL.md
- references/ios-frida-dynamic.md
- references/ios-static-analysis.md
Attribution
Related skills
View all in security →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.