利用adb+burpsuite 抓取安卓设备https数据包
曾经见过一个摄影师喂藏羚羊喝水,后行的警察把藏羚羊赶走了,摄影师问为什么,警察说,要不然它会以为人类是善良的
实现:
首先连接设备:
usb (root)或 adb connect(同一局域网)
给安卓设备设置代理:
adb shell settings put global http_proxy 代理IP地址:端口号
移除代理(重启生效):
adb shell settings delete global http_proxy
adb shell settings delete global global_http_proxy_host
adb shell settings delete global global_http_proxy_port
这样就可以抓取http的了,显然是不够的,接下来我们给安卓设备安装burp证书,这样就可以利用burp抓取https数据包了。
adb push 1.cer /sdcard/
//将文件推到安卓设备
adb shell
//打开adbshell
mount -o remount,rw /system
//挂载系统分区为可写
cd /system/etc/security/cacerts/
//进入设备证书存放目录
cp /sdcard/1.cer ./
//将证书考入到此目录
chmod 644 1.cer
//设置权限 rw-r-r
la -al |grep 1.cer
//查看是否生效
reboot
余生很长,请多指教。