Skip to content

[Rooted Android] 3.x 新版导出令牌的另一种思路 #2276

@MuelNova

Description

@MuelNova

详情可以查看 #2129 (comment)

因为 steam 3.x 是使用 React Native 写的,所以可以通过修改 bundle 的形式完成 Javascript 注入并获取我们想要的东西。

注意的是,这个方法需要修改 APK 签名,所以你可能需要先把 Android 对于降级/签名不一致检测的方法 Patch 掉,可以使用 CorePatch 这个 Xposed 模块做到。

注入 Javascript 获取令牌的简易方法:

  • 打开 steam.apk 下的 assests/index.android.bundle
  • 查找 key: "GetSteamGuardInfo",在 value 对应的 function 内,在 return 上方加入这样几行
                this.m_mapGuardInfo.forEach(function (t, n) {
                  console.error(n);
                  console.error(JSON.stringify(t))
                });

结构应该是这样的:

            {
              key: "GetSteamGuardInfo",
              value: function (t) {
                this.m_mapGuardInfo.forEach(function (t, n) {
                  console.error(n);
                  console.error(JSON.stringify(t))
                });
                return this.m_mapGuardInfo.has(t)
                  ? this.m_mapGuardInfo.get(t)
                  : null;
              },
            },
  • 保存,打包签名(如果安装了 CorePatch 那么就不需要签名了)并安装到你的设备,这里推荐使用 adb install -r steam_patched.apk
  • 此时,使用 adb 连接到你的设备,并在命令行内输入 adb logcat *:S ReactNative:V ReactNativeJS:V\
  • 现在打开 APP,切换到令牌页,你应该能在命令行中看到 JSON 格式的令牌了。
    image

说实在的,这个方法实在是没有降级导出再升级 / 抓包的方法容易,但是如果可以作为为后来人逆向(关于这部分的讨论也可以看 #2129 (comment) )的参考,那也是有意义的。

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions