ios-analysis
Skill37 starsChanged 3 months agoMITView on GitHub
Load when analyzing an iOS IPA or .app bundle, covering Mach-O and entitlements inspection, Info.plist and App Transport Security review, URL scheme enumeration, Keychain protection classes, WebView bridges, and embedded framework checks.
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- android-analysisSkill
- binary-reversingSkill
- mobile-huntingSkill
- mobile-reconSkill
- mobile-vuln-classesSkill
- report-writingSkill
- sdk-analysisSkill
- triage-validationSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Rule: Always analyze the arm64 slice.
- Very specific: line 89
Look for ProvisionsAllDevices (enterprise) vs ProvisionedDevices (dev/ad-hoc) vs neither (App Store).
- Very specific: line 133
Assessment: Check if the scheme is used for OAuth callbacks (oauth, auth, callback, login in scheme name or path).
- Distinctive: line 162
Search for these symbols:
- Distinctive: line 187
No content blocker support
- Distinctive: line 201
Check the URL scheme handler code for URL validation.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
iOS Analysis: Platform-Specific Techniques
This skill defines iOS-specific analysis techniques for MobHunt hunter agents. It is loaded by /hunt-ios and /recon commands and used by iOS hunter agent instances.
Binary Format: Mach-O
iOS executables and frameworks use the Mach-O format. Key analysis points:
FAT (Universal) Binaries
Modern App Store binaries are typically arm64-only, but some include multiple architectures:
# Check architecture
lipo -info <binary>
# Extract arm64 slice for analysis
lipo <binary> -thin arm64 -output <binary>_arm64Rule: Always analyze the arm64 slice. Ignore x86_64 (Simulator) slices; they may have different code paths and debug features.
Mach-O Headers and Load Commands
# View load commands (linked frameworks, RPATHs, encryption info)
otool -l <binary>
# Key load commands:
# LC_ENCRYPTION_INFO_64: cryptid field (0 = decrypted, 1 = encrypted)
# LC_LOAD_DYLIB: linked frameworks
# LC_RPATH: runtime search paths
# LC_CODE_SIGNATURE: code signature infoSymbol Analysis
# List all symbols
nm -gU <binary>
# Objective-C class list
otool -o <binary> | grep "name 0x"
# Swift symbols (mangled)
nm <binary> | grep "_$s"
# Imported symbols (external dependencies)
nm -u <binary>Entitlements Analysis
Entitlements are the ground truth for iOS app capabilities. Extract with:
codesign -d --entitlements :- <app_bundle>Dangerous Entitlements
| Entitlement | Risk | Finding? |
get-task-allow | Allows debugging, code injection | YES if production build |
com.apple.private.* | Private API access | YES, Apple-only entitlements in a third-party app |
com.apple.security.cs.disable-library-validation | Load unsigned dylibs | YES |
com.apple.security.cs.allow-dyld-environment-variables | DYLD injection | YES |
keychain-access-groups | Cross-app Keychain sharing | Check what groups |
com.apple.developer.associated-domains | Universal links | Check AASA config |
aps-environment | Push notifications | Informational |
TestFlight vs Production Detection
TestFlight builds have get-task-allow = true and beta-reports-active = true. This is normal for TestFlight; only flag if the build is a production App Store release.
Check embedded.mobileprovision:
security cms -D -i embedded.mobileprovisionLook for ProvisionsAllDevices (enterprise) vs ProvisionedDevices (dev/ad-hoc) vs neither (App Store).
Info.plist Security Analysis
App Transport Security (ATS)
<!-- WORST: All HTTP allowed -->
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<!-- BAD: Specific domain exceptions -->
<key>NSExceptionDomains</key>
<dict>
<key>api.example.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>Assessment: ATS bypass alone is informational. Only a finding when chained with evidence that sensitive data (tokens, credentials, PII) is sent over the excepted HTTP connection.
URL Schemes
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>myapp</string>
<string>myapp-auth</string>
</array>
</dict>
</array>Assessment: Check if the scheme is used for OAuth callbacks (oauth, auth, callback, login in scheme name or path). URL scheme hijacking is standalone-reportable if the scheme carries sensitive data.
Queried URL Schemes
<key>LSApplicationQueriesSchemes</key>These reveal which apps the target communicates with, which is useful for understanding the data flow.
Keychain Analysis
Protection Classes (Weakest to Strongest)
| Class | Risk | When Accessible |
kSecAttrAccessibleAlways | CRITICAL | Always, even locked. Deprecated but still used. |
kSecAttrAccessibleAlwaysThisDeviceOnly | HIGH | Always, but not in backups |
kSecAttrAccessibleAfterFirstUnlock | MEDIUM | After first unlock until reboot. Available in background. |
kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly | MEDIUM | Same, not in backups |
kSecAttrAccessibleWhenUnlocked | LOW | Only when device unlocked |
kSecAttrAccessibleWhenUnlockedThisDeviceOnly | SAFE | Unlocked + not in backups |
kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly | SAFEST | Requires passcode set |
Finding: kSecAttrAccessibleAlways or kSecAttrAccessibleAfterFirstUnlock for authentication tokens, passwords, or encryption keys. Must demonstrate the extraction path (backup, locked device access).
Keychain API Patterns in Binary
Search for these symbols:
SecItemAdd: storing itemsSecItemCopyMatching: retrieving itemsSecItemUpdate: modifying itemskSecClass: item class (generic password, internet password, certificate, key)kSecAttrAccessible: protection class assignment
WebView Analysis
WKWebView (Modern)
| Pattern | Risk |
WKScriptMessageHandler | JS → Native bridge. What functions are exposed? |
evaluateJavaScript: | Native → JS execution. What data is passed? |
loadRequest: / loadHTMLString: | What URLs are loaded? User-controlled? |
navigationAction.request.URL | URL validation in navigation delegate? |
WKWebViewConfiguration.preferences.javaScriptEnabled | JS enabled? (default: YES) |
UIWebView (Deprecated, Still Found)
UIWebView is inherently less secure:
stringByEvaluatingJavaScriptFromString:has no completion handler and runs synchronously- No content blocker support
- JSContext bridge can expose all ObjC objects
Finding: UIWebView usage in production is itself a finding (Apple deprecated it and rejects new submissions).
Attack Pattern: Deep Link → WebView
1. App registers myapp:// URL scheme
2. URL scheme handler: myapp://webview?url=<URL>
3. Handler loads <URL> in WKWebView
4. If WebView has JS bridge → attacker controls native function callsCheck the URL scheme handler code for URL validation. If it loads arbitrary URLs in a WebView with native bridges, this is HIGH/CRITICAL.
Framework & SDK Analysis
Framework Location
Embedded frameworks live in AppName.app/Frameworks/:
Frameworks/
FirebaseCore.framework/
Alamofire.framework/
CustomSDK.framework/Version Extraction
SDK versions are typically in:
Info.plistinside the framework bundle (CFBundleShortVersionString)- Binary strings (search for version patterns like
\d+\.\d+\.\d+) - Framework header comments
Debug Frameworks (Auto-Flag)
| Framework | Purpose | Finding? |
FLEX.framework | Runtime debugging | YES, exposes all runtime internals |
Flipper.framework | Facebook debug tool | YES, network/layout/prefs inspection |
Reveal.framework | UI debugging | YES, full view hierarchy access |
CocoaDebug.framework | Network logging | YES, logs all network traffic |
Data Storage Locations
| Location | Protection | Risk Assessment |
NSUserDefaults | None (plist in Library/Preferences/) | HIGH if tokens/credentials stored |
| Keychain | Per-item protection class | Depends on protection class |
| Core Data (SQLite) | File protection | MEDIUM if unencrypted with PII |
Documents/ | File protection (backed up) | MEDIUM, accessible in backups |
Library/Caches/ | File protection (not backed up) | LOW; cache, less sensitive |
tmp/ | File protection (cleared on reboot) | LOW, ephemeral |
File Protection Levels
NSFileProtectionComplete best: locked device means no access
NSFileProtectionCompleteUnlessOpen good: can write while locked
NSFileProtectionCompleteUntilFirstUserAuthentication default: accessible after unlock
NSFileProtectionNone worst: always accessibleCrypto Analysis Patterns
Secure Patterns (Not Findings)
SecKeyCreateEncryptedData/SecKeyCreateDecryptedData: Apple CryptoKitCC_SHA256: SHA-256 hashingCCCryptwithkCCAlgorithmAES128+kCCModeCBCorkCCModeGCM: AES with a secure modeSecRandomCopyBytes: secure random
Insecure Patterns (Potential Findings)
| Pattern | Issue |
CC_MD5 | MD5 for security-critical operations |
kCCAlgorithmDES / kCCAlgorithm3DES | Weak ciphers |
kCCModeECB | ECB mode preserves patterns |
kCCOptionECBMode | Same issue, ECB mode |
Hardcoded key or iv bytes near crypto calls | Hardcoded key material |
Assessment: Weak crypto is only a finding if used for security-critical operations (authentication, token encryption, sensitive data protection). MD5 for cache checksums is not a finding.
Tool Reference
| Tool | Primary Use | Key Flags |
otool | Mach-O inspection, load commands, symbols | -l (loads), -L (libs), -o (ObjC) |
codesign | Entitlements, signature verification | -d --entitlements :- |
plutil | Plist parsing and conversion | -p (print), -convert xml1 |
nm | Symbol table listing | -gU (global defined), -u (undefined) |
lipo | FAT binary manipulation | -info, -thin arm64 |
strings | String extraction from binary | -a (all sections) |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

