针对App flutter框架抓包
项目中出现的App,当时因为抓不到包,一直记着,最近有空弄了两、三天终于搞好了,记录如下
这里环境用的是frida15.1.13(因为在低版本frida中有双进程保护问题,这里换成新版本就可以了)
>1.Star
后安装测试机中,打开出现提示,因为测试机是Android10没有刷Xposed,所以只能是root检测了
Magisk Hide开启 使用frida或objection会出现类似酱的报错
Using USB device `Mi9 Pro 5G`Unable to connect to the frida server: unable to access PID 7797 (zygote64) while preparing for app launch; try disabling Magisk Hide in case it is active
PS:这里用的高版本Frida需要将magsk Hide关闭,我们就使用objection自带root检测尝试绕过
objection -g cn.xxx.xx.xx.xx explore --startup-command "android root disable" #spawn启动前执行root屏蔽
APP正常启动
这里就需要用到如下Frida脚本
function hook_ssl_verify_result(address) {
Interceptor.attach(address, {
onEnter: function(args) {
console.log("Disabling SSL validation")
},
onLeave: function(retval) {
console.log("Retval: " + retval);
retval.replace(0x1);
}
});
}
function hookFlutter() {
var m = Process.findModuleByName("libflutter.so");
var pattern = "FF 03 05 D1 FD 7B 0F A9 FA 67 10 A9 F8 5F 11 A9 F6 57 12 A9 F4 4F 13 A9 08 0A 80 52 48 00 00 39 16 54 40 F9";
var res = Memory.scan(m.base, m.size, pattern, {
onMatch: function(address, size) {
console.log('[+] ssl_verify_result found at: ' + address.toString());
hook_ssl_verify_result(address);
},
onError: function(reason) {
console.log('[!] There was an error scanning memory');
},
onComplete: function() {
console.log("All done")
}
});
}
其中pattern的值需要使用ida查看,一般取前面10位,这里我取的多也没事 PS:并不是取的多就越定位的越精准
将libflutter.so拖入ida中,测试机arm64Cpu,请根据测试机cpu选择
字符串窗口搜索ssl_client
查看ssl_client的交叉引用
通过函数头部字节定位
在替换Frida脚本中的pattern即可
>使用HttpCanary抓包
>使用Postern+Burp Suite
PS:最近收到小伙伴留言,说ida没有特征码,我这里补充一下