1、工具准备样本App版本:v5.0.90注入框架:xposed、frida(hluda 16.2.1)反编译&其他:JEB、jadx、Charles2、过程大致分为抓包、脱壳、反编译、动态调试/加解密算法探索,构造模拟请求几个步骤,每个步骤都可能有不同的异常出现,本文主要记录在过程中的主体脉络和流程,过程中会附上关键代码。2.1 抓包首先尝试在手机上配置wifi代理,但Charles中无法看到相应的包记录。猜测是因为App屏蔽了网络代理,因此改用其他方式。手机上安装Drony,并开启手机全局网络代理(类型选择:socks5),代理地址指向Chares,此时就可以愉快的看到请求记录了。在抓到的报文中,可以看到每次请求中,都包含了一些奇怪的header,比如t、spv、n、st,这些字段大概率与api接口的加密与签名有关。接下来,需要结合代码进一步分析。2.2 脱壳&反编译直接通过frida-dump脱壳这时直接在反编译的结果中搜索关键词"spv"签名的传入参数为分别为:t - 时间戳、data_json - 按json序列化后的业务对象参数、n - 去掉"-"符号后的uuid(32位字
Frida脚本来源githubfunction patch(address) { Memory.protect(address, 4, 'rwx'); Memory.writeByteArray(address, [0x00, 0x00, 0x80, 0x52]); } // function onLoad(name, callback) { // var Runtime = Java.use('java.lang.Runtime'); // var System = Java.use('java.lang.System'); // var VMStack = Java.use('dalvik.system.VMStack'); // var VERSION = Java.use('android.os.Build$VERSION'); // System.loadLibrary.overload('java.lang.String').implementation = function (libName) { //
小日日
Stay hungry,stay foolish