Comprehensive iOS app security audit skill for AI agents. Performs static analysis, dynamic instrumentation, source-to-sink tracing, and generates CVSS 4.0 reports.
This skill transforms an AI agent into an iOS security auditor capable of:
- Decompiling and analyzing IPAs β Mach-O analysis, dsdump, class-dump, IPA extraction
- Detecting vulnerabilities β 20 pattern categories / 97 grep blocks, OWASP Mobile Top 10 aligned
- Testing URL schemes and IPC β Custom URL scheme injection, universal link abuse, XPC, App Groups
- Tracing data flows β Source-to-sink methodology with confidence levels
- Bypassing protections β SSL pinning, jailbreak detection, RASP, native checks, encryption
- Modifying IPAs β Binary patching, resource editing, re-signing, re-packaging
- Unity IL2CPP on Simulator β Complete workflow for running Unity 2021+ IL2CPP apps on iOS Simulator (Metal heap fix, dylib embedding, no device needed)
- Generating reports β CVSS 4.0 scoring, MASTG mapping, professional templates
# For Claude Code / OpenCode agents
cd ~/.agents/skills/
git clone https://github.com/DragonJAR/iOS-Pentesting-Skill ios-app-security-audit
# For other agents, place in your skills directory# Clone to any location
git clone https://github.com/DragonJAR/iOS-Pentesting-Skill.git
# Add to your agent's skill path configurationThe skill works on macOS and Linux. macOS is recommended for full functionality; Linux has alternatives for most tools (~90% compatibility).
| Tool | Version | Purpose |
|---|---|---|
| Frida | see tool-versions.md | Dynamic instrumentation β frida-server on device must match the host frida core version exactly |
| Objection | 1.12.4+ | Mobile exploration (maintenance mode) |
| dsdump | 0.13+ | Swift class dump |
| class-dump | - | Objective-C class dump (optional) |
| plutil | system (macOS) / plistutil (Linux) | plist manipulation |
| codesign | system (macOS) / ldid (Linux) | Code signing |
| security | system (macOS) | Keychain access |
| lipo | system (macOS) / llvm-lipo (Linux) | Fat binary manipulation |
| otool | system (macOS) / llvm-objdump (Linux) | Mach-O analysis |
| Python | 3.10+ | Script execution |
Platform Support Matrix: See tool-installation-ios.md for complete macOS/Linux alternatives.
Run the preflight check to verify all dependencies:
./scripts/preflight-check.shOr use the Python version for cross-platform compatibility:
python3 scripts/preflight_check.pyPowerShell variant for Windows environments:
./scripts/preflight-check.ps1Get your environment ready for iOS auditing with these steps:
./scripts/preflight-check.shmacOS:
# Install Python and core tools
brew install [email protected] git wget jq tree ripgrep ipatool libimobiledevice ideviceinstaller
# Install Frida, Objection, dsdump
pip3 install frida-tools objection dsdump swift-demangleLinux (Debian/Ubuntu):
# System packages
sudo apt update
sudo apt install python3 python3-pip python3-dev clang git wget jq tree ripgrep build-essential libimobiledevice-utils ideviceinstaller
# Python packages
pip3 install frida-tools objection dsdump swift-demangleOr use the automated setup script:
./scripts/setup-environment.sh./scripts/preflight-check.shFor dynamic analysis on a jailbroken device, see references/frida-server-ios-install.md
Now you're ready to audit IPAs! See Usage Examples below.
User prompt:
Audit this IPA: /path/to/app.ipa
Agent response:
I'll analyze the IPA for security vulnerabilities.
[Phase 0] Extracting IPA and detecting framework...
[Phase 1] Analyzing Info.plist and entitlements...
[Phase 2] Running targeted security patterns...
[Phase 3] Tracing data flows...
[Phase 5] Generating findings report...
Found 3 issues:
1. [HIGH] Insecure URL Scheme Handling (M8: Security Misconfiguration)
2. [MEDIUM] Hardcoded API Key in Info.plist (M1: Improper Credential Usage)
3. [LOW] Debug Logging Enabled (M8: Security Misconfiguration)
User prompt:
The app has SSL pinning. Bypass it with Frida and intercept traffic.
Agent response:
I'll use the SSL pinning bypass script to intercept HTTPS traffic.
[1] Identifying SSL pinning implementation...
Found: NSURLSession with custom certificate validation
[2] Loading Frida script: ssl-pinning-bypass-ios.js
[3] Hooking NSURLSessionDelegate methods
[4] SSL pinning bypassed. Traffic now decrypted.
Intercepted request:
POST /api/login
{"email": "[email protected]", "password": "secret123"}
User prompt:
Analyze this React Native iOS app for hardcoded secrets in the JavaScript bundle.
Agent response:
[Phase 0] Detected React Native framework (libReactNative.a found)
[Phase 0] Extracting JavaScript bundle from Payload/YourApp.app/index.ios.bundle
[Phase 2] Scanning for secrets in JavaScript bundle...
Found 2 hardcoded secrets:
- API_KEY = "sk_live_abc123..." at index.ios.bundle:4521 (M1: Improper Credential Usage)
- AWS_SECRET = "wJalrXUtnFEMI/K7MDENG..." at index.ios.bundle:8912 (M1: Improper Credential Usage)
User prompt:
Disable jailbreak detection in this IPA and repackage it.
Agent response:
[1] Extracting IPA...
[2] Locating jailbreak detection code...
Found: JailbreakDetector.checkJailbreak() in YourApp
[3] Patching binary to return false...
NOP-ing comparison instruction
[4] Re-signing with code signing...
[5] Re-packaging IPA...
[6] Verifying signature...
Modified IPA ready: app_patched.ipa
SHA-256: abc123def456...
User prompt:
Analyze this Flutter iOS app. I need to intercept HTTPS traffic.
Agent response:
[Phase 0] Detected Flutter framework (Flutter.framework found)
[Phase 0] Flutter uses BoringSSL natively - ObjC/Swift SSL hooks won't work
[Phase 0] Using Blutter to extract Dart code: python3 blutter.py Frameworks/App.framework/App
[Phase 4] Loading Frida script: flutter-ios-hook.js (BoringSSL targets)
[Phase 4] Hooking SSL_CTX_set_custom_verify() for certificate bypass
[Phase 4] Hooking SSL_read/SSL_write() for traffic interception
Flutter traffic now intercepted and decrypted.
User prompt:
I have a Unity IL2CPP game IPA. I need to run it on the iOS Simulator for testing β no physical device available.
Agent response:
[Phase 0] Detected Unity 2021.3.56f2 IL2CPP (arm64)
[Phase 0] Converting for simulator with SimForge...
[SimForge] Patched LC_BUILD_VERSION for simulator ABI
[SimForge] Ad-hoc signed bundle
[Launch] App crashes: MTLHeap MTLReportFailure β Metal driver incompatibility
[Fix] Compiling metalheapfix.dylib (MTLSimDevice heap swizzle)
[Fix] Injecting via SIMCTL_CHILD_DYLD_INSERT_LIBRARIES
[Launch] App running on iOS 18.6 simulator!
Optional: Embedding dylib permanently with LC_LOAD_DYLIB...
[Patch] Added @executable_path/Frameworks/metalheapfix.dylib to main binary
[Sign] Re-signed bundle
[Launch] App launches by tapping the icon β no env vars needed
Tested with: Idle Planet Miner v3.0.8 (Unity 2021.3.56f2 IL2CPP arm64) on iOS 18.6 simulator
| Capability | Description |
|---|---|
| IPA Extraction | Unzip IPA, access Payload/YourApp.app/ |
| Mach-O Analysis | otool, lipo, nm for binary structure |
| Framework Detection | React Native, Flutter, Cordova, Xamarin, Native |
| Obfuscation Analysis | Swift obfuscation, LLVM, custom patterns |
| Info.plist Analysis | Security checks for URL schemes, entitlements, permissions (47-key checklist) |
| URL Scheme / IPC Abuse | Custom schemes, universal links, XPC, App Groups, pasteboard |
| Secrets Detection | API keys, passwords, tokens in code and plists |
| Data Flow Tracing | Source-to-sink methodology with confidence levels |
| Supply Chain (SBOM) | CycloneDX/SPDX generation, dependency CVE + license scan, third-party SDK review |
| Enterprise / MDM | Configuration profiles, managed app config, enterprise cert trust testing |
| Capability | Description |
|---|---|
| Frida Scripts | 73 scripts for hooking, bypass, interception, and native triage |
| SSL Pinning Bypass | NSURLSession, AFNetworking, Alamofire, TrustKit, BoringSSL (SSL Kill Switch), React Native, Flutter |
| Jailbreak Detection Bypass | 22 jailbreak indicators, native hooks (fopen, access, stat), native jailbreak probe |
| RASP Bypass | Debugger detection, anti-frida, simulator detection |
| Crypto Interception | Monitor SecKey, SecKeyDecrypt, CommonCrypto operations |
| Biometric Bypass | LAContext, biometric prompt, fallback to PIN |
| Keychain Inspection | List entries, extract metadata, check accessibility |
| Network Interception | URLSession, AFNetworking, Alamofire, WebSocket monitoring |
| Native Hooking | Objective-C runtime, Swift bridging, by-offset hooks |
| Capability | Description |
|---|---|
| Binary Patching | otool, jtool2, hex editor for direct binary modification |
| Resource Editing | Modify Info.plist, embedded plists, strings |
| ATS Bypass | Override NSAppTransportSecurity, enable cleartext traffic |
| Re-signing | codesign with provisioning profile, entitlements |
| Re-packaging | Rebuild IPA, maintain structure |
| Capability | Description |
|---|---|
| CVSS 4.0 Scoring | FIRST.org compliant severity ratings |
| OWASP MASTG Mapping | Test IDs and MASVS categories |
| Professional Templates | Executive summary, findings, remediation |
iOS-Pentesting-Skill/
βββ SKILL.md # Skill definition (Phases 0-5)
βββ requirements.txt # Python dependencies of scripts/
βββ ruff.toml # Declared lint rule set
βββ references/ # 94 reference documents
β βββ Start here
β β βββ ios-pentesting-decision-tree.md # Which check to run for which finding
β β βββ troubleshooting-ios.md # Common failures and fixes
β β βββ getting-started-ios.md # 15-minute orientation guide
β βββ Phase 0 (extraction & framework)
β β βββ environment-setup-ios.md # macOS toolchain install
β β βββ tool-installation-ios.md # Per-tool install + troubleshooting
β β βββ static-analysis-patterns-ios.md # Grep patterns by category
β β βββ macho-binary-analysis.md # Mach-O structure & flags
β β βββ framework-detection-ios.md # RN/Flutter/Cordova/Xamarin/Unity
β β βββ ipa-extraction-guide.md # IPA structure & decryption
β β βββ advanced-tools-ios.md # Corellium, Hopper, Ghidra, lldb
β β βββ bitcode-analysis.md # Bitcode-enabled binaries
β β βββ mobsf-integration-guide.md # Optional MobSF setup
β β βββ libimobiledevice-guide.md # libimobiledevice toolchain
β β βββ linux-ios-analysis-workarounds.md # Linux without macOS
β β βββ tool-versions.md # Tool version requirements (source of truth)
β βββ Phase 1 (attack surface)
β β βββ info-plist-checklist.md # Info.plist key checklist (47 keys)
β β βββ entitlements-security-guide.md
β β βββ ios-version-security-changes.md # iOS 15 β 18
β β βββ app-extensions-security.md # WidgetKit / Share / Keyboard
β β βββ url-scheme-security-guide.md # Scheme hijacking, OAuth callback, parameter injection
β β βββ universal-links-guide.md # apple-app-site-association
β β βββ ats-configuration-guide.md # NSAppTransportSecurity
β β βββ privacy-manifest-ios.md # PrivacyInfo.xcprivacy (iOS 17+)
β β βββ app-groups-security.md # Shared container abuse
β β βββ cloudkit-security-ios.md # CloudKit / iCloud sync
β β βββ insecure-deserialization-ios.md # NSKeyedUnarchiver / deserialization
β β βββ passkeys-security-ios.md # Passkeys / WebAuthn (iOS 16+)
β β βββ swift-concurrency-security.md # async/await, actors, data races
β βββ Phase 2 (storage & crypto)
β β βββ commoncrypto-analysis.md
β β βββ keychain-security-guide.md
β β βββ userdefaults-security.md
β β βββ coredata-security.md
β β βββ pasteboard-security.md
β β βββ data-protection-api-guide.md
β β βββ objc-security-patterns.md # swizzling, KVO, nil dispatch
β β βββ swift-security-patterns.md # type safety, generics
β β βββ memory-analysis-ios.md # In-memory secret scanning
β β βββ side-channel-analysis-ios.md # Timing / cache side channels
β βββ Phase 3 (data flow)
β β βββ deep-link-exploitation-ios.md
β β βββ xpc-services-security.md
β β βββ ipc-xpc-guide.md
β β βββ webview-security-ios.md
β β βββ notification-security.md
β β βββ phishing-attacks-ios.md # Phishing via deep links / OAuth
β β βββ deep-link-security-checklist.md # Deep link security checklist, testing and remediation
β βββ Phase 4 (dynamic / Frida)
β β βββ jailbreak-setup-guide.md
β β βββ frida-server-ios-install.md
β β βββ frida-ios-guide.md
β β βββ objection-ios-guide.md
β β βββ ssl-pinning-bypass-ios.md
β β βββ dynamic-analysis-setup-ios.md
β β βββ debugger-detection-bypass.md
β β βββ runtime-integrity-bypass.md
β β βββ secure-enclave-testing.md
β β βββ icloud-private-relay-testing.md
β β βββ frida-scripts-index.md # Canonical bundled script catalog
β β βββ frida-dynamic-analysis-ios.md # Frida dynamic analysis on device
β β βββ frida-ios-simulator-workflow.md # Frida on iOS Simulator
β β βββ jailbreak-detection-bypass-ios.md # Jailbreak detection bypass
β β βββ rasp-guide-ios.md # RASP detection and bypass
β β βββ rasp-patterns-ios.md # RASP patterns and mitigations
β β βββ rasp-framework-stub-guide.md # Stubbing RASP frameworks
β β βββ simforge-emulation-flow.md # Canonical 10-step SimForge flow
β β βββ simforge-ios-testing.md # SimForge simulator testing
β β βββ simforge-crash-triage.md # Parsing .ips crash reports
β β βββ simforge-compatibility.md # SimForge compatibility matrix
β β βββ simforge-scripts-index.md # SimForge script usage index
β β βββ simforge-legacy-loadcmd-cleanup.md # Legacy LC command cleanup
β β βββ simulator-mitm-setup.md # MITM setup on the simulator
β βββ Phase 5 (reporting)
β β βββ cvss-scoring-ios.md # CVSS 4.0 methodology
β β βββ cvss-examples-ios.md # 10 worked examples
β β βββ reporting-templates-ios.md
β β βββ owasp-mastg-ios-checklist.md
β β βββ ios-privacy-testing.md
β β βββ runtime-hardening-checks-ios.md # 12 frequently-missed checks
β βββ Mod (repackaging)
β β βββ repackaging-ios-guide.md
β β βββ obfuscation-detection-ios.md
β βββ Framework deep-dives
β β βββ react-native-ios-security.md
β β βββ flutter-ios-security.md
β β βββ cordova-ios-security.md
β β βββ xamarin-ios-security.md
β β βββ unity-ios-security.md
β β βββ swiftui-security-deep-dive.md
β β βββ core-ml-security.md
β β βββ core-ml-security-expanded.md
β βββ Tools / CI / SC / Ent
β β βββ automation-scripts-ios.md
β β βββ ci-cd-integration-ios.md
β β βββ github-actions-ios-security.md
β β βββ fastlane-security.md
β β βββ sbom-supply-chain-guide.md
β β βββ third-party-sdk-analysis.md
β β βββ enterprise-app-testing.md
β β βββ mdm-security-testing.md
β β βββ configuration-profile-abuse.md
βββ assets/frida-scripts/ # 73 Frida scripts
β βββ ssl-pinning-bypass-ios.js # SSL pinning bypass (STABLE)
β βββ jailbreak-detection-bypass.js # Jailbreak detection bypass (STABLE)
β βββ biometric-bypass-ios.js # LAContext bypass (STABLE)
β βββ objc-method-tracer.js # Generic ObjC/Swift tracer (STABLE)
β βββ network-interceptor-ios.js # NSURLSession capture (STABLE)
β βββ crypto-hook-ios.js # CommonCrypto hooks
β βββ keychain-dumper.js # Keychain extraction
β βββ url-scheme-monitor.js # openURL / Universal Links
β βββ pasteboard-monitor.js # UIPasteboard read/write
β βββ file-protection-enumerator.js # NSFileProtection audit
β βββ data-protection-check.js # File-level protection
β βββ sdk-tracer.js # Third-party SDK behavior
β βββ mdm-bypass.js # MDM restriction bypass
β βββ enterprise-cert-bypass.js # Enterprise cert trust bypass
β βββ react-native-ios-hook.js # RCTBridge module hooks
β βββ flutter-ios-hook.js # FlutterMethodChannel hooks
β βββ flutter-ssl-pinning-ios.js # Flutter pinning bypass
β βββ tls-keylogger-ios.js # BoringSSL TLS key extraction (no MITM)
β βββ rasp-bypass-ios.js # RASP bypass (IOSSecuritySuite/FreeRASP/JailMonkey)
β βββ anti-debugging-bypass-ios.js # ptrace/sysctl/getppid anti-debug bypass
β βββ ... (53 more)
βββ assets/dylibs/ # Compiled interposer dylibs
β βββ metalheapfix.m # Unity IL2CPP Metal heap crash fix (source)
β βββ README.md # Build & usage instructions
βββ scripts/ # Utility, validation & reporting
β βββ preflight-check.sh # Bash dependency verification
β βββ preflight_check.py # Cross-platform dependency verification
β βββ preflight-check.ps1 # PowerShell dependency verification
β βββ auto-audit-static-ios.sh # Static audit driver (Phases 0-3)
β βββ generate-report.py # HTML / Markdown report generator
β βββ test-findings.json # Sample report input
β βββ sbom_generator.py # CycloneDX / SPDX SBOM from IPA
β βββ dependency_scanner.py # OSV.dev CVE + license scan
β βββ _scripts_path.py # Internal sys.path helper (do not run)
β βββ check_docs_consistency.py # Docs / code / tooling consistency gate
β βββ selftest.py # Functional self-test (no device, no network)
β βββ frida_harness.js # Load every Frida script under a mocked API
β βββ simforge_binaries.py # Internal Mach-O binary inventory (do not run)
β βββ setup_mobsf.py # Optional MobSF installer
β βββ mobsf_config.py # MobSF URL + API key config
β βββ mobsf_detect.py # Auto-detect running MobSF
β βββ mobsf_upload.py # Upload IPA + wait for scan
β βββ mobsf_export.py # Export findings (json / html)
β βββ mobsf_client.py # MobSF REST API client
β βββ mobsf_findings_correlator.py # Merge manual + MobSF findings
β βββ install-mobsf-docker.sh
β βββ install-mobsf-local.sh
β βββ run-mobsf-local.sh
β βββ simforge_preflight.py # SimForge: simulator compatibility preflight
β βββ simforge_apply.py # SimForge: patch IPA for the iOS Simulator
β βββ simforge_install_launch.sh # SimForge: install + launch on booted simulator
β βββ simforge_triage.py # SimForge: triage simulator launch crashes
β βββ simforge_iterate.sh # SimForge: iterate patch β install β launch
β βββ simforge_cleanup.py # SimForge: strip incompatible load commands
β βββ binpatch_util.py # Shared length-preserving Mach-O string patcher
β βββ patch_is_simulator.py # Disable 'isSimulator' detection string
β βββ patch_jailbreak_strings.py # Neutralize jailbreak-detection strings
β βββ patch_nudetect.py # Disable NuDetect SDK references
β βββ patch_termination_calls.py # Neutralize termination error strings
β βββ quick-static-analysis.sh # Fast static triage driver
β βββ screenshot-extractor.sh # Capture app screenshots (device / simulator)
β βββ unity_sim_metalfix.sh # Unity IL2CPP Metal heap fix (compile + inject)
β βββ setup-environment.sh # Automated environment setup
For the canonical Frida script catalog (each script's hook targets, maturity level, and example invocation), see
references/frida-scripts-index.mdβ the SKILL.md References Index has a condensed table that maps every script to its workflow phase.
The skill activates when the user says:
- "audit this IPA"
- "analyze iOS app"
- "iOS pentest"
- "app security"
- "decompile IPA"
- "iOS vulnerability assessment"
- "reverse engineer iOS"
- "modify IPA"
- "bypass SSL pinning"
- "bypass jailbreak detection"
- "URL scheme abuse"
- Platform requirements β macOS recommended for full functionality; Linux has ~90% compatibility with alternatives (see tool-installation-ios.md)
- Dynamic analysis requires a jailbroken device β Frida needs full access (unless using simulator on macOS or Corellium). Unity IL2CPP apps can run on simulator with the Metal heap fix workaround.
- Encrypted binaries β App Store binaries are encrypted; need to decrypt with Clutch or frida-ios-dump
- Frida version matching β frida-server on device must match frida-tools on host exactly
- Flutter uses BoringSSL natively β ObjC/Swift SSL hooks don't work, need native hooks
- Unity IL2CPP on older simulators β The Metal heap swizzle is tested on iOS 18.6; older runtimes (17.x) may have different MTLSimDriver behavior
This skill is aligned with:
- OWASP MASTG β Mobile Application Security Testing Guide (iOS section)
- OWASP MASVS β Mobile Application Security Verification Standard
- OWASP Mobile Top 10 2024 β Top 10 mobile risks
- CVSS 4.0 β Common Vulnerability Scoring System
| ID | Category |
|---|---|
| M1 | Improper Credential Usage |
| M2 | Inadequate Supply Chain Security |
| M3 | Insecure Authentication/Authorization |
| M4 | Insufficient Input/Output Validation |
| M5 | Insecure Communication |
| M6 | Inadequate Privacy Controls |
| M7 | Insufficient Binary Protections |
| M8 | Security Misconfiguration |
| M9 | Insecure Data Storage |
| M10 | Insufficient Cryptography |
Depending on your situation, choose the right guide:
| Your Situation | Read This |
|---|---|
| New to iOS pentesting | getting-started-ios.md - 15-minute guide |
| Setting up a new Mac | environment-setup-ios.md - Complete 14-section setup |
| Missing a specific tool | tool-installation-ios.md - Per-tool guide |
| Need tool version reference | tool-versions.md - Single source of truth |
| Ready to audit IPAs | SKILL.md - Full 6-phase methodology |
| Want to master Frida | frida-ios-guide.md + frida-scripts-index.md |
| Testing in Simulator | simforge-ios-testing.md - No jailbreak needed |
Contributions are welcome! Please see the references/ directory for areas that need expansion.
Apache License 2.0 β See LICENSE for details.
DragonJAR SAS β https://www.DragonJAR.org
Experts in IT security services, proactive validation, and offensive security.