论坛首页 逆向工程技术区 阅读主题

[原创]逆向一小游戏的成绩提交代码

240 浏览 2 回复
#1 楼主 2026-06-01 21:09:08
首先 打开Devtools监听请求 正常过关 捕捉到提交成绩的请求 很明显 这个style是伪造的api接口 并且数据加密那么 根据他的发起程序来看看真实数据加密的函数打上断点 重新正常通关 断点成功触发然而 第一层的请求数据已经是加密的了 那么就需要往深处追查在追查时遇到了Promise 导致参数,局部变量无法获取 那么重新打断点再次正常过关 断点也触发了根据调用堆栈一路追查 最后发现了真实的提交数据的函数这里的参数u 就是真实成绩 而函数H 则是加密并提交成绩的函数用虚假的u调用H函数直接提交虚假的成绩试试看 虽然这里的t可能是某种校验 不过我们先试试没想到 居然直接就提交成功了那么这次逆向的总结就是跟着调用堆栈一路追查下去 找到原始的提交数据逻辑 这样就能忽略掉所有的数据加密
附:该游戏加密逻辑:async function H(t, u, e) {
    if (!V())
        return;
    const r = e ? "hua" : ""
      , n = t ? "xian" : ""
      , i = [];
    for (let h = 0; h < 4; h += 1)
        i.push(Number.parseInt(String(t).substr(h * 6, 6), 16).toString(36));
    const o = Date.now()
      , c = Math.round(u * 1e3).toString(36)
      , a = L("".concat(t, "_xn_").concat(Math.round(u * 1e3).toString(16), "_").concat(e).concat(String.fromCharCode(13)).concat(o.toString(36)))
      , l = [];
    for (let h = 0; h < 4; h += 1)
        l.push(Number.parseInt(String(a).substr(h * 8, 8), 16).toString(36));
    const C = [Math.random().toString(20).substr(2, 6), l[0], i[1], l[1], Math.random().toString(21).substr(3, 5), i[3], Math.random().toString(22).substr(2, 7), i[2], l[2], l[3], Math.random().toString(23).substr(4, 4), i[0], Math.random().toString(24).substr(3, 8), c, Math.random().toString(25).substr(5, 3), o.toString(36)];
    B().post([j, "".concat(r).concat(n), "style"].join("/"), {
        version: C.join(String.fromCharCode(12))


传播安全知识、拓宽行业人脉——看雪讲师团队等你加入!

---
来源: 看雪论坛
原文链接: https://bbs.kanxue.com/thread-286353.htm
#2 2026-06-01 21:09:08
会破解漏洞吗
#3 2026-06-01 21:09:08
mb_vgegnqgx


会破解漏洞吗

哪种?

请登录后参与讨论

立即登录 注册账号