Review iOS cryptography for weak hashes/RNG, ECB/static-IV, hardcoded keys and keys stored insecurely by hooking CCCrypt and inspecting the binary. Tier 1. Use after decryption / with instrumentation. Static on the bundle; hooking needs a device.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Ios Crypto?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-ios-crypto)
---
name: ios-crypto
description: Review iOS cryptography for weak hashes/RNG, ECB/static-IV, hardcoded keys and keys stored insecurely by hooking CCCrypt and inspecting the binary. Tier 1. Use after decryption / with instrumentation. Static on the bundle; hooking needs a device.
---
# iOS Cryptography Review
Find broken crypto: weak primitives, misuse (ECB, static IV, key reuse), and key management failures (hardcoded or stored in NSUserDefaults/plist). Weak crypto undermines storage and transport protections (MASVS-CRYPTO).
## Trigger phrases
`ios crypto review, cccrypt hook, weak hash ios, ecb mode ios, hardcoded key ios, static iv, cc_md5, insecure random ios`
## Method
Decrypt first (`ios-ipa-acquisition-decrypt`), then:
1. **Weak primitives (static):** `otool -Iv App | grep -wE "_CC_MD5|_CC_SHA1"` (broken hashes), `grep -wE "_rand|_srand|_random|_arc4random_uniform"` (check RNG suitability — security contexts need `SecRandomCopyBytes`).
2. **Hardcoded keys/material:** `strings App | grep -iE "BEGIN (RSA|EC|PRIVATE) KEY|-----|key=|secret|iv="`; Hopper/Ghidra for base64/hex key constants and key-derivation code.
3. **Hook CCCrypt (dynamic):** `frida-trace -U -i "CCCrypt"` or a custom script to dump `op` (encrypt/decrypt), `alg`, `options` (flag `kCCOptionECBMode`), `key`, `keyLength`, `iv`, and plaintext — reveals ECB, static/zero IV, hardcoded keys, and lets you capture plaintext.
4. **Key storage check:** confirm keys/secrets aren't in NSUserDefaults/plist/Realm (→ `ios-insecure-storage`) and that Keychain items use proper access control (→ `ios-keychain-analysis`).
5. **Custom/rolled crypto:** flag any home-grown cipher, XOR "obfuscation", or constant-salt KDF found in disassembly.
## Modern / rare techniques
- **ECB fingerprint:** identical plaintext blocks → identical ciphertext blocks; confirm via the `CCCrypt` `options` dump or by encrypting repetitive input through the hooked function.
- **Static/zero IV with CBC** captured from the hook = practical plaintext/replay risk.
- **Key derived from device-constant (UDID/bundle id)** = effectively hardcoded — note it.
## Escalation / chaining
Recovered keys decrypt local DBs/tokens (→ `ios-insecure-storage`) or backend payloads (→ `ios-network-backend-testing`); hardcoded cloud keys → `cloud-pentest`; weak transport crypto overlaps `tls-attacks`.
## Backend & tooling
`otool`/`strings`/Ghidra/Hopper + frida from Kali (WSL+Kali / Kali-SSH / HexStrike). Static review needs only the decrypted bundle; `CCCrypt` hooking needs a jailbroken or resigned+gadget device.
## Verification (background, before reporting)
Confirm misuse concretely — reproduce the ECB pattern or capture the same hardcoded key/IV across two runs via the hook, and demonstrate it decrypts real data — before marking CONFIRMED; redact key material.
## Evidence
Capture the weak symbol/`CCCrypt` dump (alg/mode/key/IV, redacted), the hardcoded-key location, and proof it decrypts protected data. Remediation: use SHA-256+/HMAC, AES-GCM (no ECB), random per-message IVs, `SecRandomCopyBytes`, and store keys in the Keychain/Secure Enclave — never hardcoded. MASVS: MASVS-CRYPTO-1/2.