{{#include ../../banners/hacktricks-training.md}} 有些应用程序不喜欢用户下载的证书,因此为了检查某些应用的网络流量,我们实际上需要反编译应用程序,添加一些内容并重新编译它。 # 自动 工具 [**https://github.com/shroudedcode/apk-mitm**](https://github.com/shroudedcode/apk-mitm) 将 **自动** 对应用程序进行必要的更改,以开始捕获请求,并且还会禁用证书固定(如果有的话)。 # 手动 首先我们反编译应用: `apktool d *file-name*.apk` ![](../../images/img9.png) 然后我们进入 **Manifest.xml** 文件,向下滚动到 `<\application android>` 标签,如果没有以下行,我们将添加它: `android:networkSecurityConfig="@xml/network_security_config"` 添加前: ![](../../images/img10.png) 添加后: ![](../../images/img11.png) 现在进入 **res/xml** 文件夹,创建/修改一个名为 network_security_config.xml 的文件,内容如下: ```html ``` 然后保存文件,退出所有目录,并使用以下命令重建apk: `apktool b *folder-name/* -o *output-file.apk*` ![](../../images/img12.png) 最后,您只需**签署新应用程序**。 [阅读此页面的此部分 Smali - Decompiling/\[Modifying\]/Compiling 以了解如何签署它](smali-changes.md#sing-the-new-apk)。 {{#include ../../banners/hacktricks-training.md}}