Dump the iOS Keychain and audit item accessibility classes and SecAccessControl (biometric/passcode gating) for weak protection. Tier 1. Use on a device-available engagement. Needs a jailbroken device (or resigned-gadget + objection).
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 Keychain Analysis?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-ios-keychain-analysis)
---
name: ios-keychain-analysis
description: Dump the iOS Keychain and audit item accessibility classes and SecAccessControl (biometric/passcode gating) for weak protection. Tier 1. Use on a device-available engagement. Needs a jailbroken device (or resigned-gadget + objection).
---
# iOS Keychain Analysis
Dump Keychain items and judge whether secrets are protected by the right accessibility class and access control. Weak accessibility means creds are extractable from a locked device or an iCloud/iTunes backup (MASVS-STORAGE).
## Trigger phrases
`ios keychain dump, ksecattraccessible, keychain accessibility, secaccesscontrol, keychain-dumper, thisdeviceonly, keychain analysis`
## Method
Use the app so items are stored, then:
1. **Dump:** objection `ios keychain dump` (and `--json` for parsing); `ios nsurlcredentialstorage dump` for URL creds; on a jailbroken device, **Keychain-Dumper** (`./keychain_dumper`) for the raw DB with attributes.
2. **Read accessibility per item** (least→most secure):
- `kSecAttrAccessibleAlways` / `...AlwaysThisDeviceOnly` — **deprecated/insecure**, readable while device locked → flag.
- `kSecAttrAccessibleAfterFirstUnlock(ThisDeviceOnly)` (AFU) — readable after first unlock, survives lock → relevant to forensic extraction; flag for sensitive secrets.
- `kSecAttrAccessibleWhenUnlocked(ThisDeviceOnly)` — default, readable only while unlocked.
- `kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly` — strongest; not synced/backed up, requires passcode.
3. **Flag missing `ThisDeviceOnly`** — item is included in encrypted backups / iCloud Keychain sync.
4. **Flag missing `SecAccessControl`** — high-value secrets (auth tokens, keys) not gated by biometric/passcode (`kSecAccessControlBiometryCurrentSet`/`...UserPresence`).
5. **Hook storage at write-time:** Frida on `SecItemAdd`/`SecItemUpdate` to capture the `kSecAttrAccessible` and `kSecAttrAccessGroup` the app actually requests.
## Modern / rare techniques
- **AFU + no access control** on a session token is the practical forensic-extraction case — call it out specifically.
- **`kSecAttrAccessGroup` breadth** → secrets shared to sibling apps/team → chain to `ios-appgroup-keychain-sharing-ipc`.
- **Keychain-bound vs event-bound biometrics** matters for `ios-biometric-localauth-bypass`: a secret released only by `SecAccessControl` can't be reached by flipping an `evaluatePolicy` boolean.
## Escalation / chaining
Extracted tokens/keys → `ios-network-backend-testing` / `cloud-pentest`; broad access groups → `ios-appgroup-keychain-sharing-ipc`; access-control gaps → `ios-biometric-localauth-bypass`.
## Backend & tooling
objection/frida/Keychain-Dumper over SSH (`iproxy 2222 22`) from Kali (WSL+Kali / Kali-SSH / HexStrike). **Requires a jailbroken device**; resigned+gadget allows objection keychain dump for the app's own items.
## Verification (background, before reporting)
Confirm the weak accessibility by reading the item while the device is locked (or reproduce via the write-time `SecItemAdd` hook) and verify the secret is live before marking CONFIRMED; redact values.
## Evidence
Capture the objection/Keychain-Dumper output showing the item, its accessibility class, access group, and absence of access control. Remediation: use `WhenUnlockedThisDeviceOnly` or `WhenPasscodeSetThisDeviceOnly`, add `SecAccessControl` biometric gating for high-value secrets, avoid `Always*`. MASVS: MASVS-STORAGE-1, MASVS-AUTH-2.