| name | ipsw |
| description | Apple firmware and binary reverse engineering with the ipsw CLI tool. Use when analyzing iOS/macOS binaries, disassembling functions in dyld_shared_cache, dumping Objective-C headers from private frameworks, downloading IPSWs or kernelcaches, extracting entitlements, analyzing Mach-O files, or researching Apple security. Triggers on requests involving Apple RE, iOS internals, kernel analysis, KEXT extraction, or vulnerability research on Apple platforms. |
| disable-model-invocation | true |
IPSW - Apple Reverse Engineering Toolkit
The ipsw CLI tool provides comprehensive capabilities for Apple firmware and binary analysis: downloading firmware, extracting components, disassembling code, dumping ObjC headers, and analyzing entitlements.
Installation: brew install blacktop/tap/ipsw
Quick Reference
| Task | Command |
|---|
| Disassemble DSC function | ipsw dyld disass <DSC> --symbol <SYM> |
| Dump ObjC headers | ipsw class-dump <DSC> <DYLIB> --headers -o ./headers/ |
| Download IPSW | ipsw download ipsw --device <ID> --latest |
| Extract kernel | ipsw extract --kernel <IPSW> |
| Get entitlements | ipsw macho info --ent <BINARY> |
| List KEXTs | ipsw kernel kexts <KERNELCACHE> |
| Symbol lookup | ipsw dyld symaddr <DSC> <SYMBOL> |
Core Workflows
1. Analyze System dyld_shared_cache
DSC="/System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e"
ipsw dyld info --dylibs $DSC
ipsw dyld symaddr $DSC _objc_msgSend
ipsw dyld disass $DSC --symbol _NSLog --image Foundation
ipsw class-dump $DSC Security --class SecKey
See references/dyld.md for complete DSC commands.
2. Dump Private Framework Headers
ipsw class-dump $DSC SpringBoardServices --headers --output ./headers/
ipsw class-dump $DSC UIKit --class 'UIApplication.*' --headers -o ./headers/
ipsw class-dump $DSC Security --re
See references/class-dump.md for filtering and output options.
3. Download and Extract Firmware
ipsw download ipsw --device iPhone16,1 --latest --kernel
ipsw extract --dyld --dyld-arch arm64e iPhone16,1_18.0_Restore.ipsw
ipsw extract --kernel --remote https://cdn.apple.com/path/to/ipsw
See references/download.md for download options and device identifiers.
4. Kernel & KEXT Analysis
ipsw kernel kexts kernelcache.release.iPhone16,1
ipsw kernel extract kernelcache sandbox --output ./kexts/
ipsw kernel syscall kernelcache
ipsw kernel kexts --diff kernelcache_17.0 kernelcache_17.1
See references/kernel.md for KEXT extraction and kernel analysis.
5. Mach-O Binary Analysis
ipsw macho info /path/to/binary
ipsw macho disass /path/to/binary --symbol _main
ipsw macho info --ent /path/to/binary
ipsw macho info --sig /path/to/binary
See references/macho.md for complete Mach-O commands.
6. Entitlements Research
ipsw macho info --ent /path/to/binary
ipsw ent --sqlite ent.db --ipsw *.ipsw
ipsw ent --sqlite ent.db --key platform-application
ipsw ent --sqlite ent.db --key "com.apple.private.security.no-sandbox"
See references/entitlements.md for database queries and common entitlements.
Common Research Scenarios
Find Attack Surface in Framework
ipsw class-dump $DSC TargetFramework --headers -o ./headers/
ipsw class-dump $DSC TargetFramework --class '.*Handler.*'
ipsw dyld disass $DSC --symbol '-[TargetClass handleInput:]' --image TargetFramework
Analyze Security Daemon
ipsw macho info --ent /usr/libexec/securityd
ipsw class-dump /usr/libexec/securityd
ipsw macho info --objc /usr/libexec/securityd | grep -i service
Track Changes Between iOS Versions
ipsw download ipsw --device iPhone16,1 --version 17.0 --kernel --dyld
ipsw download ipsw --device iPhone16,1 --version 17.1 --kernel --dyld
ipsw kernel kexts --diff kernelcache_17.0 kernelcache_17.1
ipsw class-dump dsc_17.0 UIKit --class UIApplication > v17.0.h
ipsw class-dump dsc_17.1 UIKit --class UIApplication > v17.1.h
diff v17.0.h v17.1.h
Find Binaries with Specific Capability
ipsw ent --sqlite ent.db --ipsw iOS18.ipsw
ipsw ent --sqlite ent.db --key "com.apple.private.tcc.manager"
ipsw ent --sqlite ent.db --key "com.apple.developer.kernel"
Reference Files
Tips
- Symbol caching: First DSC symbol lookup creates
.a2s cache - subsequent lookups are 10x faster
- Use --image flag: Specifying dylib dramatically speeds up DSC operations
- Remote extraction: Extract kernel/DSC from URL without full IPSW download
- JSON output: Most commands support
--json for scripting
- Device IDs: Use
ipsw device-list to find device identifiers