-
-
[原创]记录一下对某书的RPC调用点分析
-
发表于: 2025-6-30 23:51 1026
-
大佬们都在硬刚算法、Unidbg模拟执行,懒人们适合RPC调用或者中间人拦截。
以下只是简单记录8701109的分析流程,没头没尾,非详细流程。
根据以前对xhs的分析,直接0帧起手看 com.xingin.tiny.internal.t

在很久以前还是叫calljava、callnative,现在都是a和a了
查找a的用例

然后看 com.xingin.tiny.internal.l3

继续查找用例

看cs7.i,这里的k方法就是一个还不错的rpc调用点(可能还有其他更好的调用点)

顺带再看一下k的用例吧

看z78.t,是intercept拦截器

顺便使用frida hook一下,看看调用栈
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Java.perform(function () { try { let t = Java.use("z78.t"); t["intercept"].implementation = function (chain) { console.log("t.intercept is called: " + chain) const tmp_req = chain.request(); console.log("t.intercept is called: " + tmp_req.toString()) printstact() let result = this['intercept'](chain); console.log("t.intercept result = " + result) return result } }catch (e) { }}) |

依旧还是比较标准的okhttp3,没有进行魔改
可以针对okhttp3进行中间人拦截,例如
1 2 3 4 | okhttp3.internal.http.RealInterceptorChain.proceedokhttp3.RealCall.getResponseWithInterceptorChainokhttp3.RealCall.execute... |
顺便记录一下web端x-s参数的算法吧
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 主要算法 AES-CBC抓包发现请求头中存在 X-S字段XYW_eyJzaWd…………去掉前缀后进行base64解码得到{"signSvn":"56","signType":"x2","appId":"xhs-pc-web","signVersion":"1","payload":"e6512f3ec05bd2…………"}取出payload的值,进行aes-cbc解密得到eDE9NWRlOTMyMDhmYmY3…………再进行base64解码x1=5de93208fbf7xxxxxxxxxxxx;x2=0|0|0|1|0|0|1|0|0|0|1|0|0|0|0|1|0|0|0;x3=195d1ce6xxxxxxxxxxxxx;x4=1742981780001;字段说明x1 -> md5(url+post)x2 -> 设备环境检测x3 -> cookie[a1]x4 -> x-t |
至此,这篇没头没尾的分析记录结束了。
最后于 2025-7-11 10:37
被Rocky虞编辑
,原因:
赞赏
他的文章
赞赏
雪币:
留言: