[英]How to view network traffic of React Native App on Android WITHOUT code
I'm trying to view the network traffic of an android app for which I'm in no way associated.我正在尝试查看与我无关的 Android 应用程序的网络流量。
Here's what I've done:这是我所做的:
Install app from google play store.从 Google Play 商店安装应用程序。 Running
adb shell pm path ...
shows multiple APK files have been installed.运行
adb shell pm path ...
显示已安装多个APK 文件。
Proxy network traffic through my laptop.通过我的笔记本电脑代理网络流量。 This works but all the requests from the app are encrypted.
这有效,但来自应用程序的所有请求都是加密的。
Install custom certificate authority on my android to prepare for SSL encrypt/decrypt inside laptop proxy.在我的 android 上安装自定义证书颁发机构以准备在笔记本电脑代理中进行 SSL 加密/解密。
Decrypt traffic on my laptop proxy.解密我的笔记本电脑代理上的流量。 From laptop proxy logs I can see many requests are succeeding, including mail.google.com.
从笔记本电脑代理日志中,我可以看到许多请求都成功了,包括 mail.google.com。 However the app I'm interested in is failing SSL handshake between android and my laptop.
但是,我感兴趣的应用程序在 android 和我的笔记本电脑之间的 SSL 握手失败。
Pull all app APK files from my android to laptop.将所有应用程序 APK 文件从我的安卓设备拉到笔记本电脑。
My plan: Modify the APK files and reload them onto my android to accept my own SSL ca.我的计划:修改 APK 文件并将它们重新加载到我的 android 上以接受我自己的 SSL ca。 I believe this can be achieved by simply modifying/adding xml files.
我相信这可以通过简单地修改/添加 xml 文件来实现。
Problem: How do I configure android studio to load the many APK files onto my android.问题:如何配置 android studio 以将许多 APK 文件加载到我的 android. I can get it to install one APK file, but this doesn't work.
我可以让它安装一个 APK 文件,但这不起作用。
Edit1: Replace 'cert' with 'ca' for clarity.编辑 1:为清楚起见,将 'cert' 替换为 'ca'。
Putting in your own cert won't work.放入你自己的证书是行不通的。 The encrypted traffic will be encrypted with the public key of the server when going to the server, and the app wil make a random one for traffic coming back.
加密后的流量到服务器时会用服务器的公钥加密,应用程序会随机生成一个流量回来。 Adding an SSL cert won't effect outgoing traffic, unless you're also going to man in the middle attack it.
添加 SSL 证书不会影响传出流量,除非您也打算在中间攻击它。
Probably the easiest way to do this is the compile a custom AOSP that replaces the networking libraries with versions that also log to a file.可能最简单的方法是编译一个自定义 AOSP,将网络库替换为也记录到文件的版本。 Let the traffic go through as normal, but let the SSL lib decrypt it for us and read the results directly from that.
让流量照常通过,但让 SSL 库为我们解密并直接从中读取结果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.