mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
63 lines
3.3 KiB
Markdown
63 lines
3.3 KiB
Markdown
# APK decompilers
|
||
|
||
{{#include ../../banners/hacktricks-training.md}}
|
||
|
||
**有关每个工具的更多详细信息,请查看原始帖子** [**https://eiken.dev/blog/2021/02/how-to-break-your-jar-in-2021-decompilation-guide-for-jars-and-apks/#cfr**](https://eiken.dev/blog/2021/02/how-to-break-your-jar-in-2021-decompilation-guide-for-jars-and-apks/#cfr)
|
||
|
||
### [JD-Gui](https://github.com/java-decompiler/jd-gui)
|
||
|
||
作为开创性的 GUI Java 反编译器,**JD-Gui** 允许您在 APK 文件中调查 Java 代码。使用起来非常简单;获取 APK 后,只需用 JD-Gui 打开它以检查代码。
|
||
|
||
### [Jadx](https://github.com/skylot/jadx)
|
||
|
||
**Jadx** 提供了一个用户友好的界面,用于从 Android 应用程序中反编译 Java 代码。由于其跨平台的易用性,推荐使用。
|
||
|
||
- 要启动 GUI,请导航到 bin 目录并执行: `jadx-gui`
|
||
- 对于命令行使用,反编译 APK: `jadx app.apk`
|
||
- 要指定输出目录或调整反编译选项: `jadx app.apk -d <path to output dir> --no-res --no-src --no-imports`
|
||
|
||
### [GDA-android-reversing-Tool](https://github.com/charles2gan/GDA-android-reversing-Tool)
|
||
|
||
**GDA** 是一个仅限 Windows 的工具,提供了广泛的 Android 应用程序逆向工程功能。在 Windows 系统上安装并运行 GDA,然后加载 APK 文件进行分析。
|
||
|
||
### [Bytecode-Viewer](https://github.com/Konloch/bytecode-viewer/releases)
|
||
|
||
使用 **Bytecode-Viewer**,您可以使用多个反编译器分析 APK 文件。下载后,运行 Bytecode-Viewer,加载您的 APK,并选择您希望同时使用的反编译器进行分析。
|
||
|
||
### [Enjarify](https://github.com/Storyyeller/enjarify)
|
||
|
||
**Enjarify** 将 Dalvik 字节码转换为 Java 字节码,使 Java 分析工具能够更有效地分析 Android 应用程序。
|
||
|
||
- 要使用 Enjarify,请运行: `enjarify app.apk` 这将生成提供的 APK 的 Java 字节码等效物。
|
||
|
||
### [CFR](https://github.com/leibnitz27/cfr)
|
||
|
||
**CFR** 能够反编译现代 Java 特性。使用方法如下:
|
||
|
||
- 对于标准反编译: `java -jar ./cfr.jar "app.jar" --outputdir "output_directory"`
|
||
- 对于大型 JAR 文件,调整 JVM 内存分配: `java -Xmx4G -jar ./cfr.jar "app.jar" --outputdir "output_directory"`
|
||
|
||
### [Fernflower](https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine)
|
||
|
||
**Fernflower** 是一个分析性反编译器,需要从源代码构建。构建后:
|
||
|
||
- 反编译 JAR 文件: `java -jar ./fernflower.jar "app.jar" "output_directory"` 然后,使用 `unzip` 从生成的 JAR 中提取 `.java` 文件。
|
||
|
||
### [Krakatau](https://github.com/Storyyeller/Krakatau)
|
||
|
||
**Krakatau** 提供了对反编译的详细控制,特别是在处理外部库时。
|
||
|
||
- 通过指定标准库路径和要反编译的 JAR 文件来使用 Krakatau: `./Krakatau/decompile.py -out "output_directory" -skip -nauto -path "./jrt-extractor/rt.jar" "app.jar"`
|
||
|
||
### [procyon](https://github.com/mstrobel/procyon)
|
||
|
||
对于简单的反编译,使用 **procyon**:
|
||
|
||
- 将 JAR 文件反编译到指定目录: `procyon -jar "app.jar" -o "output_directory"`
|
||
|
||
### [frida-DEXdump](https://github.com/hluwa/frida-dexdump)
|
||
|
||
此工具可用于转储运行中 APK 的 DEX 在内存中。这有助于击败在应用程序在内存中执行时被移除的静态混淆。
|
||
|
||
{{#include ../../banners/hacktricks-training.md}}
|