简体   繁体   English

如何在没有代码的情况下在 Android 上查看 React Native App 的网络流量

[英]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:这是我所做的:

  1. 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 文件。

  2. Proxy network traffic through my laptop.通过我的笔记本电脑代理网络流量。 This works but all the requests from the app are encrypted.这有效,但来自应用程序的所有请求都是加密的。

  3. Install custom certificate authority on my android to prepare for SSL encrypt/decrypt inside laptop proxy.在我的 android 上安装自定义证书颁发机构以准备在笔记本电脑代理中进行 SSL 加密/解密。

  4. 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 握手失败。

  5. 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.

相关问题 Android:如何以编程方式捕获App的网络流量? - Android: How to capture App's Network Traffic Programmatically? 如何保护Android应用程序免受网络流量捕获 - How to secure android app from network traffic capturing 如何在没有 Android Studio 的情况下生成 react native 应用程序的 apk - How to generate apk of react native app without Android Studio 通过wireshark查看android网络流量 - View android network traffic via wireshark 持续产生网络流量的应用程序代码 - Code for app that constantly generates network traffic 捕获由Android应用程序生成的网络流量 - Capture network traffic generated by an android app 反转 Android 市场应用程序网络流量 - reversing Android Market app network traffic 查看原生Android电子邮件应用程序的源代码? - View source code of the native Android email app? 如何在没有 vpnservice 和 root 的情况下重定向我自己的 Android 应用程序流量 - How to redirect my own android app traffic without vpnservice and root 我已经创建了 React 本机应用程序并将其构建为独立的 android apk 文件,但如果不连接到同一网络,我将无法使用它 - I have created React native app and build it as a standalone android apk file but I am unable to use it without connecting to same network
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM