安卓逆向—以车载微信为例对微信协议请求进行抓包(理论全版本通杀)

admin 2026-01-27 00:29:49 网络安全文章 来源:ZONE.CI 全球网 0 阅读模式

文章总结: 本文详解利用FridaHook车载版微信Java层以抓取mmtls加密流量的技术。通过Jadx定位修改设备校验逻辑,并拦截日志类定位网络请求代码,最终Hook收发包函数输出Protobuf数据。该方案理论全版本通用,适用于微信协议分析与逆向研究,实操性强。 综合评分: 89 文章分类: 逆向分析,移动安全,实战经验


cover_image

安卓逆向 — 以车载微信为例对微信协议请求进行抓包(理论全版本通杀)

Command Command

逆向有你

2026年1月26日 17:21 河南

前言

由于微信客户端(不是小程序)请求加密走的是mmtls而不是标准TLS, 因而导致所有抓包软件均无法正常抓到微信请求, (这就导致我们是难以看到微信内部请求逻辑的).

因此, 本文使用Frida 微信Java层Hook发/收包的方法实现对其请求的抓包.

车载微信版本: wechat-v1.0.13.0.2472-release-202111232123

本文仅用于学习交流,严禁用于非法用途

屏蔽设备校验

如果你在正常手机上使用车载版的微信的话, 你首先得解决这个问题:

使用Jadx打开APK文件, 在资源中搜索”合法性“将会得到:

我们不难看到”设备合法性校验中“的nameash, 在Jadx中搜索.ash可以找到这里:

 复制代码 隐藏代码
package com.tencent.mm.ui;
publicclassLauncherFloatViewextendsFloatView {
    /* ...... */
    staticvoida(LauncherFloatView launcherFloatView, boolean z, boolean z2, int i) {
                com.tencent.mm.sdk.platformtools.n.i("MicroMsg.LauncherFloatView", "ilink auth result: auth_get_result:" + z + " if_auth_pass:" + z2 + " err_code:" + i);
        if (launcherFloatView.fCT) {
            launcherFloatView.fCT = false;
            if (!z2) { // 验证失败
                launcherFloatView.b(false, false, z ? launcherFloatView.getResources().getString(R.string.asf) + "(" + i + ")" : launcherFloatView.getResources().getString(R.string.asg));
            } elseif (launcherFloatView.aaw()) { // 验证通过
                launcherFloatView.b(false, true, "");
                launcherFloatView.aat(); // 这个不能忘哦
            }
        }
    }
        // 当z为true时提示"合法性校验中", z2为true时提示"扫码登录微信"
        privatevoidb(boolean z, boolean z2, String str) {
        if (z) {
            aax();
            aaC();
            ((TextView) this.fCF.findViewById(R.id.sq)).setText(R.string.ash);
            a(this.fCF.findViewById(R.id.sn), this.fCQ);
            this.fCF.setVisibility(0);
            return;
        }
        if (z2) {
            aax();
            aaC();
            ((TextView) this.fCF.findViewById(R.id.sq)).setText(R.string.bfn);
            bS(this.fCF.findViewById(R.id.sn));
            this.fCF.setVisibility(8);
            return;
        }
        if (!this.fCU) {
            this.fCU = true;
            aax();
            p.a(str, "", null, null, false);
        }
    }
}

看到这顿时就豁然开朗了, 只要直接让他调用aat就可以了, 校验解决!

 复制代码 隐藏代码
Java.perform(function () {
    letLauncherFloatView = Java.use("com.tencent.mm.ui.LauncherFloatView");
    LauncherFloatView["b"].overload('boolean', 'boolean', 'java.lang.String').implementation = function (z, z2, str) {
        console.log(`LauncherFloatView.b is called: z=${z}, z2=${z2}, str=${str}`);
        this["b"](false, true, str);
        this.aat()
    };
})

获取日志

那么从哪入手呢? 留意一下刚才的代码吧!

 复制代码 隐藏代码
package com.tencent.mm.ui;
publicclassLauncherFloatViewextendsFloatView {
    /* ...... */
    staticvoida(LauncherFloatView launcherFloatView, boolean z, boolean z2, int i) {
        com.tencent.mm.sdk.platformtools.n.i("MicroMsg.LauncherFloatView", "ilink auth result: auth_get_result:" + z + " if_auth_pass:" + z2 + " err_code:" + i);
    }
}

看到这里的日志了吗, 像这样的日志无处不在哦, 我们只要Hook一下下就能看到日志了~

跟过去看一下:

 复制代码 隐藏代码
package com.tencent.mm.sdk.platformtools;
publicfinalclassn {
    /* ... */
    publicstaticvoidi(String str, String str2) {i(str, str2, null);}
    publicstaticvoidd(String str, String str2) {d(str, str2, null);}
    // INFO日志, str: TAG, str2: 日志内容, objArr(用于填充str2中占位符)
        publicstaticvoidi(String str, String str2, Object... objArr) {/* ... */}
    // DEBUG日志, 同理
    publicstaticvoidd(String str, String str2, Object... objArr) {/*...*/}
}

Frida一下吧, 只需要DEBUG和INFO级别的日志就可以了 (不知道为什么, 有时候成功有时候却不行, 如果微信一启动就显示出很多的日志就表示成功了):

 复制代码 隐藏代码
Java.perform(function () {
        let n = Java.use("com.tencent.mm.sdk.platformtools.n");
    n["d"].overload('java.lang.String', 'java.lang.String', '[Ljava.lang.Object;').implementation = function (str, str2, objArr) {
        console.log(`[D][${str}] ${str2}${objArr}`);
        this["d"](str, str2, objArr);
    };
    n["i"].overload('java.lang.String', 'java.lang.String', '[Ljava.lang.Object;').implementation = function (str, str2, objArr) {
        console.log(`[I][${str}] ${str2}${objArr}`);
        this["i"](str, str2, objArr);
    };

})

请求抓包

分析日志

 复制代码 隐藏代码
......
[I][MicroMsg.Cgi] Start doScene:%d func:%d netid:%dtime:%d9929498,503,0,26
[I][MicroMsg.RemoteResp] bufToResp unpack ret[%b], jType[%d], noticeid[%d], headExtFlags[%d] true,503,0,255
[I][MicroMsg.RemoteResp] bufToResp using protobuf ok jType:%d, enType:%d errCode:%d, len:%d, headExtFlags:%d503,3,0,244,255
[I][MicroMsg.Cgi] onGYNetEnd:%d func:%dtime:%d [%d,%d,%s] 9929498,503,246,0,0,
......
[I][MicroMsg.RunCgi] Start doScene:%d func:%d netid:%dtime:%d245210210,684,3,124
......
[I][MicroMsg.RunCgi] onGYNetEnd:%d func:%dtime:%d [%d,%d,%s] 245210210,684,283,0,0,
......

不难发现, 每次发送和接收都会经过MicroMsg.CgiMicroMsg.RunCgi, 只要在这两处Hook是不是就可以了呢?

分析代码

搜索字符串可以定位到此处:

 复制代码 隐藏代码
package com.tencent.mm.q;
publicclassa<_Resp&nbsp;extendshv> {
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;/* ... */
&nbsp; &nbsp;&nbsp;publicstaticclassb<_Resp&nbsp;extendshv>&nbsp;extendsk&nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp; com.tencent.mm.q.b cJB;
&nbsp; &nbsp; &nbsp; &nbsp; com.tencent.mm.vending.g.b cJC;
&nbsp; &nbsp; &nbsp; &nbsp; a cJD;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;ecJz=null;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;finalkcJA=this;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;finallongmStartTime=&nbsp;aq.XI();
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;private&nbsp;com.tencent.mm.network.kcJE=newcom.tencent.mm.network.k() {&nbsp;// from class: com.tencent.mm.q.a.b.1
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;@Override// com.tencent.mm.network.k
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;publicfinalvoida(int&nbsp;i,&nbsp;int&nbsp;i2,&nbsp;int&nbsp;i3, String str, com.tencent.mm.network.q qVar,&nbsp;byte[] bArr)&nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; com.tencent.mm.vending.g.g.a(b.this.cJC, C0315a.a(i2, i3, str, (hv) b.this.cJB.cJH.cJP, b.this, b.this.cJD));
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b.this.cJz.a(i2, i3, str, b.this.cJA);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; com.tencent.mm.sdk.platformtools.n.i("MicroMsg.Cgi",&nbsp;"onGYNetEnd:%d func:%d time:%d [%d,%d,%s]", Integer.valueOf(b.this.cJA.hashCode()), Integer.valueOf(b.this.cJB.cJI), Long.valueOf(aq.XI() - b.this.mStartTime), Integer.valueOf(i2), Integer.valueOf(i3), str); &nbsp;// 日志位置
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; };

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;@Override// com.tencent.mm.q.k
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;publicfinalinta(com.tencent.mm.network.e eVar, e eVar2)&nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cJz = eVar2;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;inta2=&nbsp;a(eVar,&nbsp;this.cJB,&nbsp;this.cJE);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; com.tencent.mm.sdk.platformtools.n.i("MicroMsg.Cgi",&nbsp;"Start doScene:%d func:%d netid:%d time:%d", Integer.valueOf(this.cJA.hashCode()), Integer.valueOf(this.cJB.cJI), Integer.valueOf(a2), Long.valueOf(aq.XI() -&nbsp;this.mStartTime));&nbsp;// 日志, func表示cgi号, this.cJB是重点
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(a2 <&nbsp;0) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; com.tencent.mm.vending.g.g.a(this.cJC, C0315a.a(3, -1,&nbsp;"", (hv)&nbsp;this.cJB.cJH.cJP,&nbsp;this,&nbsp;this.cJD));
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;a2;
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; }
}

继续追踪com.tencent.mm.q.b cJB

&nbsp;复制代码&nbsp;隐藏代码
package&nbsp;com.tencent.mm.q;

publicfinalclassbextendsi&nbsp;{
&nbsp; &nbsp;&nbsp;public&nbsp;C0316b cJG;&nbsp;// 请求Protobuf, 调用Ep()得到请求体
&nbsp; &nbsp;&nbsp;public&nbsp;c cJH;&nbsp;// 响应Protobuf, 调用cJP.toBytesArray()得到响应体(原因见下)
&nbsp; &nbsp;&nbsp;public&nbsp;String uri;&nbsp;// 请求的uri
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;privateint&nbsp;cJI;&nbsp;// 请求cgi
&nbsp; &nbsp;&nbsp;/* ...... */

&nbsp; &nbsp;&nbsp;privateb(com.tencent.mm.ag.a aVar, com.tencent.mm.ag.a aVar2, String str,&nbsp;int&nbsp;i,&nbsp;int&nbsp;i2,&nbsp;int&nbsp;i3,&nbsp;boolean&nbsp;z)&nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;/* ...... */
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cJG =&nbsp;newC0316b(aVar, i, i2, z2);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cJH =&nbsp;newc(aVar2, i3, z);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.uri = str;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cJI = i;
&nbsp; &nbsp; }
&nbsp; &nbsp;&nbsp;publicstaticfinalclassC0316bextendsg.d&nbsp;implementsg.b {
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;privateint&nbsp;cJI;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;public&nbsp;com.tencent.mm.ag.a cJP;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;privateboolean&nbsp;cJQ;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;publicint&nbsp;cmdId;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;publicC0316b(com.tencent.mm.ag.a aVar,&nbsp;int&nbsp;i,&nbsp;int&nbsp;i2,&nbsp;boolean&nbsp;z)&nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cJP = aVar;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cJI = i;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cmdId = i2;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cJQ = z;
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;/* ...... */
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;// Protobuf实现中的toBytesArray, 调用即可
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;@Override
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;publicfinalbyte[] Ep() {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(this.cJP&nbsp;instanceof&nbsp;ho) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ((ho)&nbsp;this.cJP).eTu = com.tencent.mm.protocal.g.a(this);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;returnthis.cJP.toByteArray();&nbsp;// 这里cJP和下面cJP类型一样, 都有这个函数
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; }
&nbsp; &nbsp;&nbsp;publicstaticfinalclasscextendsg.e&nbsp;implementsg.c {
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;public&nbsp;com.tencent.mm.ag.a cJP;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;privateboolean&nbsp;cJQ;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;publicint&nbsp;cmdId;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;publicc(com.tencent.mm.ag.a aVar,&nbsp;int&nbsp;i,&nbsp;boolean&nbsp;z)&nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cJP =&nbsp;null;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cJP = aVar;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cmdId = i;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cJQ = z;
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;// Protobuf实现中的parseFrom
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;@Override
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;publicfinalintA(byte[] bArr)&nbsp;{
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this.cJP =&nbsp;this.cJP.T(bArr);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;if&nbsp;(this.cJP&nbsp;instanceof&nbsp;ih) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;((ih)&nbsp;this.cJP).getRet();
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; com.tencent.mm.protocal.g.a(this, ((hv)&nbsp;this.cJP).eTO);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;((hv)&nbsp;this.cJP).eTO.eHv;
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; }
}

写个Hook吧

&nbsp;复制代码&nbsp;隐藏代码
// Jadx生成的代码, 手改了改, 可能有点乱, 见谅
Java.perform(function&nbsp;() {
&nbsp; &nbsp;&nbsp;functionjavaByteArrayToJsArray(javaByteArray) {
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;len = javaByteArray.length;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;jsArr =&nbsp;newArray(len);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;for&nbsp;(let&nbsp;i =&nbsp;0; i < len; i++) jsArr[i] = javaByteArray[i] &&nbsp;0xFF;
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;jsArr;
&nbsp; &nbsp; }

&nbsp; &nbsp;&nbsp;// MicroMsg.Cgi
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;let&nbsp;b =&nbsp;Java.use("com.tencent.mm.q.a$b");
&nbsp; &nbsp; b["a"].implementation&nbsp;=&nbsp;function&nbsp;(eVar, eVar2) {
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.log(`CGIReq [${this.cJA.value.hashCode()}][CGI=${this.cJB.value.cJI.value}]${this.cJB.value.uri.value}&nbsp;DATA:`)
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;letRes&nbsp;=&nbsp;this.cJB.value.cJG.value.Ep()
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;let&nbsp;jsArr =&nbsp;javaByteArrayToJsArray(Res);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;ptrBuf =&nbsp;Memory.alloc(Res.length);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;Memory.writeByteArray(ptrBuf, jsArr);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.log(jsArr)
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.log(hexdump(ptrBuf, {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;offset:&nbsp;0,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;length:&nbsp;Res.length,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;header:&nbsp;true,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;ansi:&nbsp;true
&nbsp; &nbsp; &nbsp; &nbsp; }));
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;let&nbsp;result =&nbsp;this["a"](eVar, eVar2);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;result;
&nbsp; &nbsp; };
&nbsp; &nbsp;&nbsp;letAnonymousClass1&nbsp;=&nbsp;Java.use("com.tencent.mm.q.a$b$1");
&nbsp; &nbsp;&nbsp;AnonymousClass1["a"].implementation&nbsp;=&nbsp;function&nbsp;(i, i2, i3, str, qVar, bArr) {
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.log(`CGIResp [${this.cJF.value.cJA.value.hashCode()}][CGI=${this.cJF.value.cJB.value.cJI.value}]${this.cJF.value.cJB.value.uri.value}&nbsp;DATA:`)
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;letRes&nbsp;=&nbsp;this.cJF.value.cJB.value.cJH.value.cJP.value.toByteArray()
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;let&nbsp;jsArr =&nbsp;javaByteArrayToJsArray(Res);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;ptrBuf =&nbsp;Memory.alloc(Res.length);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;Memory.writeByteArray(ptrBuf, jsArr);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.log(jsArr)
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.log(hexdump(ptrBuf, {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;offset:&nbsp;0,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;length:&nbsp;Res.length,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;header:&nbsp;true,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;ansi:&nbsp;true
&nbsp; &nbsp; &nbsp; &nbsp; }));
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this["a"](i, i2, i3, str, qVar, bArr);
&nbsp; &nbsp; };

&nbsp; &nbsp;&nbsp;// MicroMsg.RunCgi
&nbsp; &nbsp;&nbsp;letRCAnonymousClass1&nbsp;=&nbsp;Java.use("com.tencent.mm.q.u$1");
&nbsp; &nbsp;&nbsp;RCAnonymousClass1["a"].implementation&nbsp;=&nbsp;function&nbsp;(eVar, eVar2) {
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.log(`RunCGIReq [${this.cLn.value.hashCode()}][CGI=${this.cLq.value.cJI.value}]${this.cLq.value.uri.value}&nbsp;DATA:`)
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;letRes&nbsp;=&nbsp;this.cLq.value.cJG.value.Ep()
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;let&nbsp;jsArr =&nbsp;javaByteArrayToJsArray(Res);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;ptrBuf =&nbsp;Memory.alloc(Res.length);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;Memory.writeByteArray(ptrBuf, jsArr);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.log(jsArr)
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.log(hexdump(ptrBuf, {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;offset:&nbsp;0,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;length:&nbsp;Res.length,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;header:&nbsp;true,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;ansi:&nbsp;true
&nbsp; &nbsp; &nbsp; &nbsp; }));
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;let&nbsp;result =&nbsp;this["a"](eVar, eVar2);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;result
&nbsp; &nbsp; };
&nbsp; &nbsp;&nbsp;letC03181&nbsp;=&nbsp;Java.use("com.tencent.mm.q.u$1$1");
&nbsp; &nbsp;&nbsp;C03181["a"].implementation&nbsp;=&nbsp;function&nbsp;(i, i2, i3, str, qVar, bArr) {
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.log(`RunCGIResp [${this.cLt.value.cLn.value.hashCode()}][CGI=${this.cLt.value.cLq.value.cJI.value}]${this.cLt.value.cLq.value.uri.value}&nbsp;DATA:`)
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;letRes&nbsp;=&nbsp;this.cLt.value.cLq.value.cJH.value.cJP.value.toByteArray()
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;let&nbsp;jsArr =&nbsp;javaByteArrayToJsArray(Res);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;ptrBuf =&nbsp;Memory.alloc(Res.length);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;Memory.writeByteArray(ptrBuf, jsArr);
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.log(jsArr)
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;console.log(hexdump(ptrBuf, {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;offset:&nbsp;0,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;length:&nbsp;Res.length,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;header:&nbsp;true,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;ansi:&nbsp;true
&nbsp; &nbsp; &nbsp; &nbsp; }));
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;this["a"](i, i2, i3, str, qVar, bArr);
&nbsp; &nbsp; };
})

成果展示

抓包得到的Protobuf建议结合网上公开的微信协议源码看, 这样可以把抓到的和源码中的结构对照一下, 方便加深理解.

(我看了一下, 任何版本的微信你只要找到特征改一下就照样可以抓)


免责声明:

本文所载程序、技术方法仅面向合法合规的安全研究与教学场景,旨在提升网络安全防护能力,具有明确的技术研究属性。

任何单位或个人未经授权,将本文内容用于攻击、破坏等非法用途的,由此引发的全部法律责任、民事赔偿及连带责任,均由行为人独立承担,本站不承担任何连带责任。

本站内容均为技术交流与知识分享目的发布,若存在版权侵权或其他异议,请通过邮件联系处理,具体联系方式可点击页面上方的联系我

本文转载自:逆向有你 Command Command《安卓逆向 — 以车载微信为例对微信协议请求进行抓包(理论全版本通杀)》

安全简讯(2026.01.26) 网络安全文章

安全简讯(2026.01.26)

文章总结: 近期全球安全事件频发。纽约工会与韩国Boryung药企遭攻击致大量敏感数据泄露。俄背景沙虫组织攻击波兰能源设施部署数据擦除软件。ShinyHunte
评论:0   参与:  0