charles 抓取安卓手机上 https 请求的问题?

2018-04-05 10:14:44 +08:00
 deweixu

同样的步骤,在 iOS 设备上能成功抓取 https 请求 在 andorid 设备上就不能抓取成功,而且网络不可用 我的手机是 pixel android 8.1

10944 次点击
所在节点    程序员
18 条回复
goofansu
2018-04-05 10:23:52 +08:00
它的证书装了没?应该是在 help 里面有个选项
irobot03
2018-04-05 10:33:06 +08:00
pynix
2018-04-05 11:09:26 +08:00
证书。。。
Love4Taylor
2018-04-05 11:18:49 +08:00
记得证书 root 后装系统里... 不然依旧不可用
jacy
2018-04-05 11:32:04 +08:00
ljcarsenal
2018-04-05 11:47:37 +08:00
亲测 4 楼办法可行
ysc3839
2018-04-05 11:56:01 +08:00
客户端内置了证书吧?这种情况我也不知道该怎么办。
TestSmirk
2018-04-05 12:06:09 +08:00
内置证书的不好弄,proxy 的 ssl 说看就看到了
WispZhan
2018-04-05 12:16:42 +08:00
看 Charles 文档和 Andorid 文档,Android N 以上的版本已经修改了这个机制。

As of Android N, you need to add configuration to your app in order to have it trust the SSL certificates generated by Charles SSL Proxying. This means that you can only use SSL Proxying with apps that you control.

In order to configure your app to trust Charles, you need to add a Network Security Configuration File to your app. This file can override the system default, enabling your app to trust user installed CA certificates (e.g. the Charles Root Certificate). You can specify that this only applies in debug builds of your application, so that production builds use the default trust profile.

建议用 root 方式,或者 vpn 方式。或者找低版本 Android
iyaozhen
2018-04-05 12:22:06 +08:00
7.0 开始有一些限制了,具体和 app 有关,有些可以有些不可以。除非改 app 的包,或者 root。

找一个 Android 4 的机器(模拟器
JsonLee
2018-04-05 14:25:59 +08:00
Android N 之后 app 默认是不会信任用户安装的证书的,需要自己在配置 app 去信任才行。
Suclogger
2018-04-05 16:04:04 +08:00
客户端内置证书的绕过可以参考我之前的文章:
http://suclogger.me/HTTPS 之殇:绕过客户端的 SSL 证书绑定 /
Suclogger
2018-04-05 16:16:10 +08:00
maemual
2018-04-05 17:56:59 +08:00
Android 7.0 之后系统不再信任自己装的证书了,所以用不了这种抓包的方式了。
wjm2038
2018-04-05 18:29:06 +08:00
@WispZhan 请问 root 方式是什么啊
crab
2018-04-05 18:41:21 +08:00
网络不可用应该是 ssl pinning
sola97
2018-04-05 21:47:21 +08:00
我都不想上 8.0,安全性提高用的就不爽了
renyijiu
2018-04-06 07:49:13 +08:00
安卓上 packet capture,非常好用

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/444443

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX