← 返回首頁

Android反向工程技能,單指令反編譯APK並提取HTTP API

Vivek | Cybersecurity
Vivek | Cybersecurity
@VivekIntel
464🔁 71
𝕏 (Twitter)🔥
AI 中文摘要Claude 生成

Android反向工程技能,單指令反編譯APK並提取HTTP API。

這款名為「android-reverse-engineering-skill」的Claude Code技能,能反編譯Android APK/XAPK/JAR/AAR檔案,並提取應用程式使用的HTTP API,包括Retrofit端點、OkHttp呼叫、硬編碼URL及認證模式,無需原始程式碼即可記錄與重現。專為pentest、惡意軟體分析及API偵察設計,強調僅限授權使用。

核心功能

  • 反編譯檔案:使用jadx搭配Fernflower/Vineflower引擎,反編譯APK、XAPK、JAR及AAR檔案,支持單引擎或並排比較。
  • 提取並記錄API:識別Retrofit端點、OkHttp呼叫、硬編碼URL、認證標頭及token。
  • 追蹤呼叫流程:從Activities/Fragments經ViewModels及repositories,直至HTTP呼叫的全流程追蹤。
  • 分析應用結構:解析manifest、packages及架構模式。
  • 處理混淆程式碼:應對ProGuard/R8產生的混淆輸出,提供導航策略。

安裝需求與步驟

需Java JDK 17+及jadx (CLI),選用Vineflower或Fernflower(複雜Java程式碼輸出更佳),dex2jar用於APK/DEX檔案的Fernflower支援。詳細安裝見plugins/android-reverse-engineering/skills/android-reverse-engineering/references/setup-guide.md

從GitHub安裝(推薦):

/plugin marketplace add SimoneAvogadro/android-reverse-engineering-skill
/plugin install android-reverse-engineering@android-reverse-engineering-skill

技能將永久可用於所有Claude Code工作階段。或從本地clone:

git clone https://github.com/SimoneAvogadro/android-reverse-engineering-skill.git

再執行上述plugin指令。

使用方式

斜線指令

/decompile path/to/app.apk

執行完整流程:檢查依賴、反編譯及初始結構分析。

自然語言觸發

  • "Decompile this APK"
  • "Reverse engineer this Android app"
  • "Extract API endpoints from this app"
  • "Follow the call flow from LoginActivity"
  • "Analyze this AAR library"

獨立腳本執行

  • bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/check-deps.sh:檢查依賴。
  • bash .../install-dep.sh jadx:自動偵測OS及套件管理器安裝缺失依賴,如jadx或vineflower。
  • bash .../decompile.sh app.apk:jadx反編譯APK(預設);XAPK自動解壓並反編譯內部APK。
  • bash .../decompile.sh --engine fernflower library.jar:指定Fernflower。
  • bash .../decompile.sh --engine both --deobf app.apk:雙引擎比較並去混淆。
  • bash .../find-api-calls.sh output/sources/:尋找API呼叫;加--retrofit限Retrofit,或--urls限URL。

程式庫結構

android-reverse-engineering-skill/
├── .claude-plugin/
│   └── marketplace.json                    # Marketplace catalog
├── plugins/
│   └── android-reverse-engineering/
│       ├── .claude-plugin/
│       │   └── plugin.json                 # Plugin manifest
│       ├── skills/
│       │   └── android-reverse-engineering/
│       │       ├── SKILL.md                # Core workflow (5 phases)
│       │       ├── references/
│       │       │   ├── setup-guide.md
│       │       │   ├── jadx-usage.md
│       │       │   ├── fernflower-usage.md
│       │       │   ├── api-extraction-patterns.md
│       │       │   └── call-flow-analysis.md
│       │       └── scripts/
│       │           ├── check-deps.sh
│       │           ├── install-dep.sh
│       │           ├── decompile.sh
│       │           └── find-api-calls.sh
│       └── commands/
│           └── decompile.md                # /decompile slash command
├── LICENSE
└── README.md

參考工具

法律免責聲明

此plugin嚴格限合法用途,包括:

  • 安全研究及授權滲透測試。
  • 法允許的互通性分析(如EU Directive 2009/24/EC、US DMCA §1201(f))。
  • 惡意軟體分析及事件回應。
  • 教育及CTF比賽。

使用者自行負責確保符合所有法律、法規及服務條款。未經授權反向工程非自有或無權分析的軟體,可能違反智慧財產法及電腦詐欺法規。作者對工具誤用免責。

授權

Apache 2.0,詳見LICENSE