smartworldarafath/rea_skill

rea-mobile-app-recovery

Complete Android (APK/AAB/DEX/JNI/Flutter/React Native/Unity) and iOS (IPA/Mach-O/Swift/ObjC) reverse engineering, full project reconstruction, and OWASP MASVS / PTKD 5-Pillar mobile vulnerability scanner using REA MCP, JADX, Apktool, Blutter, hermes-dec, G…

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/smartworldarafath/rea_skill --skill rea-mobile-app-recovery

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

REA Mobile App Recovery & 5-Pillar Vulnerability Scanner (Android & iOS)

Scope & Authorization

Covers all first-party mobile application reverse engineering, lost source code reconstruction, and automated security vulnerability scanning for Android (.apk, .aab, .dex, .so) and iOS (.ipa, Mach-O) applications.


1. The 5-Pillar Mobile Vulnerability Scanner Checklist (PTKD & OWASP MASVS)

Whenever the user asks to scan, audit, or check weakpoints in their mobile app (or asks what vulnerabilities to look for), systematically inspect and report on these 5 pillars with exact file/line evidence and remediation code:

Pillar 1: In the Manifest (AndroidManifest.xml / Info.plist)

  • Exported Components (`android:exported="true"`): Flag any Activity, Service, BroadcastReceiver, or ContentProvider with android:exported="true" (or implicit intent-filters) that lacks strict permission guards—which lets third-party apps launch private screens, steal data via ContentProviders, or trigger background actions.
  • Deep Link & Intent Hijacking: Audit <data android:scheme="..." /> handlers for unvalidated URI parameters and intent redirection.
  • Build & Backup Flags: Flag android:debuggable="true" and android:allowBackup="true" in production manifests.

Pillar 2: In Local Storage (/data/data/<package_name>/ & External Storage)

  • Plaintext SharedPreferences & SQLite: Flag storing passwords, JWT/OAuth tokens, session cookies, or PII in unencrypted shared_prefs/*.xml or plaintext SQLite .db files (recommend migrating to EncryptedSharedPreferences / JetPack DataStore with Tink / SQLCipher / Android Keystore / iOS Keychain).
  • External Storage (SD Card / Public Folders): Flag any use of getExternalStorageDirectory(), getExternalFilesDir(), or MODE_WORLD_READABLE / MODE_WORLD_WRITEABLE where any other app on the device can read or modify sensitive app files.

Pillar 3: Inside Decompiled Code (Java / Kotlin / Swift / Dart / JS)

  • Hardcoded Secrets: Scan all decompiled classes, BuildConfig.java, res/values/strings.xml, and native .so rodata for hardcoded API keys, AWS credentials (AKIA...), Firebase/Supabase service keys, payment keys, or static AES encryption keys/IVs.
  • Active Debug Logs (`logcat` Leaks): Flag active Log.d(), Log.v(), Log.i(), System.out.println(), or printStackTrace() statements that leak sensitive tokens, payloads, or user credentials into the phone's public system logs (adb logcat).
  • Weak Cryptography: Flag AES/ECB, static IVs, MD5/SHA1 password hashing, and java.util.Random (must use AES/GCM/NoPadding and SecureRandom).

Pillar 4: In Network Settings & Traffic

  • HTTP Cleartext Traffic: Flag http:// endpoints, android:usesCleartextTraffic="true", or permissive res/xml/network_security_config.xml (and iOS NSAllowsArbitraryLoads), which allow attackers on public Wi-Fi to intercept traffic.
  • Missing SSL/TLS Certificate Pinning: Check whether network_security_config.xml (<pin-set>), OkHttp CertificatePinner, or TrustKit is configured, and flag custom X509TrustManager or HostnameVerifier implementations that blindly accept all certificates (ALLOW_ALL_HOSTNAME_VERIFIER).

Pillar 5: In WebViews (In-App Browsers)

  • Unrestricted JavaScript & File Access: Flag webView.getSettings().setJavaScriptEnabled(true) when combined with untrusted URLs, addJavascriptInterface() (RCE risk), setAllowFileAccess(true), setAllowFileAccessFromFileURLs(true), or setAllowUniversalAccessFromFileURLs(true), which allow malicious web content to execute code inside the app and exfiltrate local private files.

2. Complete 10-Stage Android & iOS Reverse Engineering Toolchain

Stage 1: Basic Environment & Prerequisites

  • Java Development Kit (JDK 11/17+): Powers jadx, apktool, and apksigner.
  • Android SDK Platform-Tools (`adb`): Connects to devices/emulators (list_adb_devices, pull_adb_package, read_adb_logcat, inspect_adb_package).
  • Python 3: Runs Frida, Objection, and custom binary/crypto scripts.
  • Test Device / Emulator: Rooted physical device (Magisk) or Android Studio AVD / Genymotion.

Stage 2: Unpacking & Resource Extraction

  • Apktool (`inspect_apktool_client`, `decode_android_resources`): Decodes AndroidManifest.xml, res/, assets/, and Smali disassembly.
  • 7-Zip / Unzip: Extracts raw classes*.dex, lib/<abi>/*.so, and assets/.
  • `aapt` / `aapt2`: Rapidly inspects package metadata, permissions, and resource configurations.

Stage 3: Source Code Decompilation (DEX to Java/Kotlin)

  • JADX (GUI & CLI) & REA MCP (`inspect_android_package`, `search_android_classes`, `inspect_android_class`, `inspect_android_method`, `trace_android_references`): Decompiles classes*.dex directly into structured Java/Kotlin source code with cross-reference navigation.
  • `dex2jar (d2j)` + `CFR` / `Procyon` / `JD-GUI` / `Bytecode Viewer`: Secondary decompilation pipeline for complex bytecode constructs.

Stage 4: Cross-Platform Framework Tools (Flutter, React Native, Unity)

  • Flutter (`identify_flutter_build`, `inspect_dart_aot`, `Blutter`, `reFlutter`): Parses libapp.so (Dart AOT snapshot) and libflutter.so to recover Dart packages, class structures, functions, and offsets.
  • React Native (`hermes-dec`, `hbctool`): Disassembles and decompiles React Native Hermes bytecode (assets/index.android.bundle).
  • Unity (`Il2CppDumper`, `AssetStudio`): Recovers C# class, method, and field definitions from libil2cpp.so + global-metadata.dat and extracts 3D/2D game assets.
  • `uber-apk-signer`: Aligns (zipalign) and re-signs repackaged APKs for testing.

Stage 5: Native Library Analysis (C/C++ .so & iOS Mach-O)

  • REA MCP (`open_binary`, `list_procedures`, `procedure_pseudo_code`, `batch_decompile`, `xrefs`, `inspect_macho`, `get_objc_classes`, `analyze_swift_types`, `demangle_swift`): Disassembles and decompiles ARM64/ARMv7/x86_64 native binaries.
  • Ghidra / IDA Pro / Binary Ninja / Rizin (Cutter): Deep control-flow and JNI_OnLoad / Java_* / RegisterNatives inspection.
  • `strings` / `readelf` / `objdump` / `nm`: Extracts native strings, ELF headers, and imported/exported symbol tables.

Stage 6: Protection, Obfuscation & Packer Detection

  • `APKiD`: Identifies compilers, obfuscators (R8/ProGuard, DexGuard), and commercial packers (SecNeo, Bangcle, Tencent Legu, Jiagu).
  • `Simplify` / `de4js`: Deobfuscates virtualized Smali/JS logic and string encryption routines.
  • `Frida-DEXDump`: Dumps decrypted .dex payloads directly from runtime memory on packed applications.

Stage 7: Network & API Traffic Analysis

  • Burp Suite / OWASP ZAP / HTTP Toolkit / `mitmproxy` / Reqable: Intercepts and analyzes HTTP/HTTPS, REST, GraphQL, and WebSocket API traffic.
  • Wireshark & REA MCP (`inspect_pcap_capture`, `inspect_packet_fields`): Inspects raw TCP/UDP, DNS, TLS handshakes, and custom binary protocols.

Stage 8: Dynamic Analysis & Runtime Instrumentation

  • Frida & REA MCP (`list_frida_devices`, `start_frida_session`, `instrument_with_frida`, `observe_native_calls`): Hooks Java/Kotlin methods and native C/C++ functions at runtime to inspect arguments, return values, cryptographic keys, and certificate pinning posture.
  • Objection: Runtime exploration of memory, Android Keystore / iOS Keychain, file systems, and activities without custom scripts.
  • LSPosed / Xposed Framework: On-device method hooking.

Stage 9: Local Storage, Databases & Cryptography Inspection

  • SQLite (`inspect_sqlite_database`, `sqlite3`, DB Browser for SQLite): Inspects /data/data/<package_name>/databases/*.db.
  • SharedPreferences & Plists (`inspect_plist`, `inspect_keyed_archive`): Audits shared_prefs/*.xml and iOS NSUserDefaults / NSKeyedArchiver files.
  • KeyStore Explorer / `keytool` / `apksigner`: Verifies APK signing certificates and v1/v2/v3/v4 signature schemes.

Stage 10: Automated Security Scanners

  • MobSF (Mobile Security Framework), PTKD, Quark-Engine, APKHunt, QARK, AndroBugs, Guardsquare AppSweep: Automated static and dynamic vulnerability scanning mapped against OWASP Mobile Top 10 and OWASP MASVS.

3. Standard 5-Step Mobile Analysis & Recovery Workflow Checklist

Execute these 5 steps automatically on every mobile task:

  1. Fingerprint: Run APKiD / inspect_android_package / identify_flutter_build to identify the tech stack (Kotlin/Java, Flutter, React Native, Unity, Swift/ObjC) and any obfuscation/packing.
  2. Decode Manifest & Resources: Run Apktool / decode_android_resources to audit AndroidManifest.xml (permissions, android:exported="true", deep links, network_security_config.xml) and res/values/strings.xml.
  3. Decompile Code: Use JADX / REA MCP search_android_classes & inspect_android_class to recover full source code, API endpoints, models, and cryptographic logic.
  4. Analyze Native & Framework Code: Use Ghidra / REA MCP open_binary for .so libraries or framework-specific tools (Blutter/inspect_dart_aot, hermes-dec, Il2CppDumper).
  5. Dynamic Audit & Full Project Reconstruction: Run dynamic checks with Frida / adb if a device is connected, and reconstruct a 100% complete, zero-skeleton Android Studio / Xcode project or security remediation report.
来自同一仓库

更多 Skills

全部 Skills
smartworldarafath
社区

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

1小时安装量
2
GitHub Stars
5
最近更新
11月8日
smartworldarafath
社区

agent-reach

Read-only access to internet platforms (Twitter/X, Reddit, YouTube subtitles, GitHub, LinkedIn, Bilibili, web). Use when the agent needs to search, read web links, retrieve social discussions, CVE/vulnerability intel, or when standard web search/fetch is blocked or insufficient.

1小时安装量
2
GitHub Stars
5
最近更新
11月8日
smartworldarafath
社区

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

1小时安装量
2
GitHub Stars
5
最近更新
11月8日
smartworldarafath
社区

anti-ai-slop-writing

Produces human-sounding text that avoids detectable AI writing patterns. Activates on any writing task — tweets, emails, articles, bios, captions, reports, copy, messages, LinkedIn posts, cover letters, README files, or any content where the output must not read as AI-generated. Enforces banned vocabulary, structural variety, punctuation discipline, accuracy rules, and voice calibration. Use when the user says "write," "draft," "rewrite," "make this sound human," "anti-slop," "not AI," or any va

1小时安装量
2
GitHub Stars
5
最近更新
11月8日