# revkit [![日本語](https://img.shields.io/badge/lang-日本語-blue)](docs/README.ja.md) A reverse-engineering toolkit for iOS and Android applications. - **iOS Tweak Development** — Build and deploy Substrate tweaks via Theos/Orion (arm64, rootless) - **Frida Hooks** — Runtime analysis and dynamic instrumentation for iOS / Android apps - **mitmproxy** — Programmable HTTPS traffic capture and protocol decoding - **Binary Analysis** — Static analysis of APK / IPA binaries with Ghidra, radare2, jadx, ipsw ## Repository Structure ``` . ├── packages/ │ ├── frida/ # Frida hook scripts (TypeScript → JS) │ │ └── src/ │ │ ├── ios/ # iOS hooks (ObjC/C++) │ │ ├── android/ # Android hooks (Java/JNI) │ │ └── common/ # Shared utilities │ ├── mitmproxy/ # mitmproxy addons │ └── tweak/ # iOS Tweaks (Theos/Orion) │ ├── tools/ # Python utilities │ ├── run.py # Frida hook runner │ ├── transformers/ # Log transformers (Frida → unified format) │ └── ... │ ├── handlers/ # Objection handlers (CommonCrypto, Security, etc.) ├── docs/ # Analysis results & specifications ├── assets/ # IPA/APK binaries (.gitignore) ├── raws/ # Raw Frida capture logs (.gitignore) └── logs/ # Transformed logs (.gitignore) ``` ## Development Environment Everything is pre-configured in a DevContainer. Run `Rebuild Container` to get all tools ready. ### Runtimes | Tool | Purpose | |------|---------| | Python 3.12 (uv) | Utilities, log transformation, analysis scripts | | Node.js 25.x | Frida script build (frida-compile) | | Bun | Chrome extension build | | Frida 17.x | Dynamic instrumentation | | mitmproxy | Programmable HTTPS proxy | ### Reverse Engineering Tools | Tool | Purpose | |------|---------| | radare2 | ARM64 disassembly & binary analysis | | Ghidra (headless) | Pseudocode generation & function analysis | | jadx | Android APK → Java decompilation | | apktool | Android APK resource extraction & smali | | ipsw | iOS Mach-O analysis, ObjC/Swift class dump | | lief (Python) | Mach-O/ELF binary parser | | capstone (Python) | ARM64 disassembler | | unicorn (Python) | CPU emulation | | pywidevine (Python) | Widevine DRM analysis | ### iOS Tweak Development | Tool | Purpose | |------|---------| | Theos | Tweak build system | | Orion | Swift tweak framework | | Swift 5.8 (cross-compile) | Cross-compilation for iOS | | iOS SDK 15.6 / 16.5 | Build targets | ## macOS Host Setup The DevContainer runs inside Docker Desktop's Linux VM and cannot communicate with iOS devices directly. Use iproxy over USB to avoid issues with Wi-Fi IP changes or network instability. ### 1. Install iproxy (macOS) ```bash brew install libimobiledevice ``` ### 2. Start iproxy (macOS) With the iPhone connected via USB: ```bash iproxy 2222 22 & iproxy 27042 27042 & ``` - `2222 → 22`: SSH - `27042 → 27042`: Frida ### Connection Diagram | Purpose | Direction | Route | |---------|-----------|-------| | **SSH** | Container → Device | `ssh iPhone` → `host.docker.internal:2222` → iproxy (USB) → device:22 | | **Frida** | Container → Device | `frida -H host.docker.internal` → iproxy (USB) → device:27042 | | **mitmproxy** | Device → Container | Set device Wi-Fi proxy to macOS LAN IP:9080 | ## Usage ### Frida Hooks ```bash # iOS (spawn via objection) uv run python tools/run.py packages/frida/