/ios-pentesting-tricks
iOS pentesting playbook. Use when testing iOS applications for keychain extraction, URL scheme hijacking, Universal Links exploitation, runtime manipulation, binary protection analysis, data storage issues, and transport security bypass during authorized mobile security
$ npx -y skills add yaklang/hack-skills --skill ios-pentesting-tricks --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/ios-pentesting-tricks
Context preview
The summary Claude sees to decide when to auto-load this skill.
iOS pentesting playbook. Use when testing iOS applications for keychain extraction, URL scheme hijacking, Universal Links exploitation, runtime manipulation, binary protection analysis, data storage issues, and transport security bypass during authorized mobile security
SKILL.md
ios-pentesting-tricks.SKILL.mdname: ios-pentesting-tricks
description: >-
iOS pentesting playbook. Use when testing iOS applications for keychain extraction, URL scheme hijacking, Universal Links exploitation, runtime manipulation, binary protection analysis, data storage issues, and transport security bypass during authorized mobile security assessments.
SKILL: iOS Pentesting Tricks — Expert Attack Playbook
> **AI LOAD INSTRUCTION**: Expert iOS application security testing techniques. Covers jailbreak vs non-jailbreak methodology, keychain extraction, URL scheme/Universal Links abuse, Frida/Objection runtime hooks, binary protection checks, and data storage analysis. Base models miss protection class nuances and AASA misconfiguration patterns.
0. RELATED ROUTING
Before going deep, consider loading:
- [mobile-ssl-pinning-bypass](../mobile-ssl-pinning-bypass/SKILL.md) for in-depth SSL pinning bypass (SecTrust hooks, SSL Kill Switch, framework-specific techniques)
- [android-pentesting-tricks](../android-pentesting-tricks/SKILL.md) when also testing the Android version of the same app
- [api-sec](../api-sec/SKILL.md) for backend API security testing once traffic is intercepted
Advanced Reference
Also load [IOS_RUNTIME_TRICKS.md](./IOS_RUNTIME_TRICKS.md) when you need:
- Frida recipes for iOS-specific hooks (ObjC class enumeration, method swizzling)
- Objection command reference for iOS
- Runtime hooking patterns and bypass templates
---
1. JAILBREAK VS NON-JAILBREAK TESTING
| Capability | Jailbroken | Non-Jailbroken | |---|---|---| | SSL pinning bypass | Frida, SSL Kill Switch 2, Objection | Network debugging proxy, MITM profiles (limited) | | Keychain access | keychain-dumper, Frida dump | Only via backup extraction (limited) | | Filesystem inspection | Full access to app sandbox | Only via `ideviceinstaller` + backup | | Runtime manipulation | Frida, Cycript, LLDB attach | Frida on sideloaded apps (re-signed) | | Binary analysis | Class-dump, Hopper on-device | Decrypt IPA on Mac, analyze offline | | Method hooking | Full Frida/Cycript capability | Limited (needs re-signed app + Frida gadget) |
Non-Jailbreak Testing Setup
# Extract IPA from device
ideviceinstaller -l # List installed apps
ios-deploy --id <UDID> --download --bundle_id com.target.app
# Or use frida-ios-dump for decrypted IPA (jailbroken)
python dump.py com.target.app
# Sideload with Frida gadget (non-jailbreak runtime hooking)
# 1. Extract IPA, 2. Insert FridaGadget.dylib into Frameworks/
# 3. Re-sign with valid profile, 4. Install via ios-deploy
---
2. KEYCHAIN EXTRACTION
2.1 Keychain Protection Classes
| Protection Class | Availability | Use Case | Risk Level | |---|---|---|---| | `kSecAttrAccessibleWhenUnlocked` | Only when device unlocked | Passwords, tokens | Medium | | `kSecAttrAccessibleAfterFirstUnlock` | After first unlock until reboot | Background tokens | High (persists across locks) | | `kSecAttrAccessibleAlways` | Always (deprecated iOS 12+) | Legacy apps | Critical | | `kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly` | Passcode set + unlocked | High-value secrets | Low |
2.2 Extraction Methods
# Jailbroken: keychain-dumper
/path/to/keychain-dumper -a # Dump all accessible items
/path/to/keychain-dumper -g password # Generic passwords only
/path/to/keychain-dumper -i # Internet passwords
# Frida / Objection
objection -g com.target.app explore
> ios keychain dump
> ios keychain dump --json # JSON output for parsing
# Frida script for keychain enumeration
frida -U -f com.target.app -l keychain_dump.js
2.3 What to Look For
| Item Type | Keychain Class | Typical Content | |---|---|---| | `kSecClassGenericPassword` | `genp` | App tokens, API keys, user credentials | | `kSecClassInternetPassword` | `inet` | HTTP auth credentials, OAuth tokens | | `kSecClassCertificate` | `cert` | Client certificates | | `kSecClassIdentity` | `idnt` | Cert + private key pair | | `kSecClassKey` | `keys` | Encryption keys |
---
3. URL SCHEME HIJACKING
3.1 Custom URL Scheme Discovery
# From IPA/app bundle — check Info.plist
plutil -p /path/to/Payload/Target.app/Info.plist | grep -A 10 CFBundleURLTypes
# Example output:
# "CFBundleURLSchemes" => ["targetapp", "fb123456789"]
3.2 Hijacking Attack
Scenario: Target app registers "targetapp://" for OAuth callback
1. Attacker app also registers "targetapp://" URL scheme
2. User initiates OAuth login in target app
3. OAuth provider redirects to targetapp://callback?code=AUTH_CODE
4. iOS may open attacker's app instead (non-deterministic scheme resolution)
5. Attacker captures OAuth authorization code
| Attack Vector | Technique | Impact | |---|---|---| | OAuth callback interception | Register same scheme | Steal authorization codes | | Deep link hijacking | Register same scheme | Phishing, data interception | | Payment callback interception | Register payment scheme | Transaction manipulation |
3.3 URL Scheme vs Universal Links Security
| Feature | Custom URL Scheme | Universal Links | |---|---|---| | Registration | Any app can claim any scheme | Requires AASA file on domain | | Uniqueness | Not guaranteed (multiple apps) | One app per domain path | | Validation | None | Cryptographic (AASA signed) | | Recommended for | Non-sensitive navigation | OAuth callbacks, sensitive actions | | Hijackable | Yes (duplicate registration) | Only via AASA misconfiguration |
---
4. UNIVERSAL LINKS EXPLOITATION
4.1 AASA (Apple-App-Site-Association) Misconfiguration
# Fetch AASA file
curl -s "https://target.com/.well-known/apple-app-site-association" | jq .
curl -s "https://target.com/apple-app-site-association" | jq .
# Check for wildcard patterns (overly broad)
# Bad: "paths": ["*"] ← captures ALL URLs
# Bad: "paths": ["/NOT *"] ← poorly written exclusion
| Misconfiguration | Risk | Exploitation | |---|---|---| |
Read more
name: ios-pentesting-tricks description: >- iOS pentesting playbook. Use when testing iOS applications for keychain extraction, URL scheme hijacking, Universal Links exploitation, runtime manipulation, binary protection analysis, data storage issues, and transport security bypass during authorized mobile security assessments.
SKILL: iOS Pentesting Tricks — Expert Attack Playbook
> **AI LOAD INSTRUCTION**: Expert iOS application security testing techniques. Covers jailbreak vs non-jailbreak methodology, keychain extraction, URL scheme/Universal Links abuse, Frida/Objection runtime hooks, binary protection checks, and data storage analysis. Base models miss protection class nuances and AASA misconfiguration patterns.
0. RELATED ROUTING
Before going deep, consider loading:
- [mobile-ssl-pinning-bypass](../mobile-ssl-pinning-bypass/SKILL.md) for in-depth SSL pinning bypass (SecTrust hooks, SSL Kill Switch, framework-specific techniques)
- [android-pentesting-tricks](../android-pentesting-tricks/SKILL.md) when also testing the Android version of the same app
- [api-sec](../api-sec/SKILL.md) for backend API security testing once traffic is intercepted
Advanced Reference
Also load [IOS_RUNTIME_TRICKS.md](./IOS_RUNTIME_TRICKS.md) when you need:
- Frida recipes for iOS-specific hooks (ObjC class enumeration, method swizzling)
- Objection command reference for iOS
- Runtime hooking patterns and bypass templates
---
1. JAILBREAK VS NON-JAILBREAK TESTING
| Capability | Jailbroken | Non-Jailbroken | |---|---|---| | SSL pinning bypass | Frida, SSL Kill Switch 2, Objection | Network debugging proxy, MITM profiles (limited) | | Keychain access | keychain-dumper, Frida dump | Only via backup extraction (limited) | | Filesystem inspection | Full access to app sandbox | Only via `ideviceinstaller` + backup | | Runtime manipulation | Frida, Cycript, LLDB attach | Frida on sideloaded apps (re-signed) | | Binary analysis | Class-dump, Hopper on-device | Decrypt IPA on Mac, analyze offline | | Method hooking | Full Frida/Cycript capability | Limited (needs re-signed app + Frida gadget) |
Non-Jailbreak Testing Setup
# Extract IPA from device ideviceinstaller -l # List installed apps ios-deploy --id <UDID> --download --bundle_id com.target.app # Or use frida-ios-dump for decrypted IPA (jailbroken) python dump.py com.target.app # Sideload with Frida gadget (non-jailbreak runtime hooking) # 1. Extract IPA, 2. Insert FridaGadget.dylib into Frameworks/ # 3. Re-sign with valid profile, 4. Install via ios-deploy
---
2. KEYCHAIN EXTRACTION
2.1 Keychain Protection Classes
| Protection Class | Availability | Use Case | Risk Level | |---|---|---|---| | `kSecAttrAccessibleWhenUnlocked` | Only when device unlocked | Passwords, tokens | Medium | | `kSecAttrAccessibleAfterFirstUnlock` | After first unlock until reboot | Background tokens | High (persists across locks) | | `kSecAttrAccessibleAlways` | Always (deprecated iOS 12+) | Legacy apps | Critical | | `kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly` | Passcode set + unlocked | High-value secrets | Low |
2.2 Extraction Methods
# Jailbroken: keychain-dumper /path/to/keychain-dumper -a # Dump all accessible items /path/to/keychain-dumper -g password # Generic passwords only /path/to/keychain-dumper -i # Internet passwords # Frida / Objection objection -g com.target.app explore > ios keychain dump > ios keychain dump --json # JSON output for parsing # Frida script for keychain enumeration frida -U -f com.target.app -l keychain_dump.js
2.3 What to Look For
| Item Type | Keychain Class | Typical Content | |---|---|---| | `kSecClassGenericPassword` | `genp` | App tokens, API keys, user credentials | | `kSecClassInternetPassword` | `inet` | HTTP auth credentials, OAuth tokens | | `kSecClassCertificate` | `cert` | Client certificates | | `kSecClassIdentity` | `idnt` | Cert + private key pair | | `kSecClassKey` | `keys` | Encryption keys |
---
3. URL SCHEME HIJACKING
3.1 Custom URL Scheme Discovery
# From IPA/app bundle — check Info.plist plutil -p /path/to/Payload/Target.app/Info.plist | grep -A 10 CFBundleURLTypes # Example output: # "CFBundleURLSchemes" => ["targetapp", "fb123456789"]
3.2 Hijacking Attack
Scenario: Target app registers "targetapp://" for OAuth callback 1. Attacker app also registers "targetapp://" URL scheme 2. User initiates OAuth login in target app 3. OAuth provider redirects to targetapp://callback?code=AUTH_CODE 4. iOS may open attacker's app instead (non-deterministic scheme resolution) 5. Attacker captures OAuth authorization code
| Attack Vector | Technique | Impact | |---|---|---| | OAuth callback interception | Register same scheme | Steal authorization codes | | Deep link hijacking | Register same scheme | Phishing, data interception | | Payment callback interception | Register payment scheme | Transaction manipulation |
3.3 URL Scheme vs Universal Links Security
| Feature | Custom URL Scheme | Universal Links | |---|---|---| | Registration | Any app can claim any scheme | Requires AASA file on domain | | Uniqueness | Not guaranteed (multiple apps) | One app per domain path | | Validation | None | Cryptographic (AASA signed) | | Recommended for | Non-sensitive navigation | OAuth callbacks, sensitive actions | | Hijackable | Yes (duplicate registration) | Only via AASA misconfiguration |
---
4. UNIVERSAL LINKS EXPLOITATION
4.1 AASA (Apple-App-Site-Association) Misconfiguration
# Fetch AASA file curl -s "https://target.com/.well-known/apple-app-site-association" | jq . curl -s "https://target.com/apple-app-site-association" | jq . # Check for wildcard patterns (overly broad) # Bad: "paths": ["*"] ← captures ALL URLs # Bad: "paths": ["/NOT *"] ← poorly written exclusion
| Misconfiguration | Risk | Exploitation | |---|---|---| |
Master Entry → Category Entries → Deep Topic Skills One master entry, six category entries, and 101 deep topic skills across 14 security domains.
Repo: yaklang/hack-skills
Other skills on hack-skills.
- /401-403-bypass-techniques
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP method tampering, header injection, protocol downgrade, and automated bypass tools.
Open skill - /active-directory-acl-abuse
Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS reading, GPO abuse, and BloodHound-guided attack paths.
Open skill - /active-directory-certificate-services
AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to enrollment, CA officer abuse, and certificate-based persistence.
Open skill - /active-directory-kerberos-attacks
Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting, golden/silver/diamond tickets, delegation abuse, or pass-the-ticket attacks.
Open skill - /ai-ml-security
AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples, model poisoning, model stealing, data privacy attacks (membership inference, model inversion), and autonomous agent security risks.
Open skill - /android-pentesting-tricks
Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent redirection, root detection bypass, tapjacking, and backup extraction during authorized mobile security assessments.
Open skill

