BeyondDimension / BeyondDimension/SteamTools

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

Open
#2,276 27 comments 6 reactions 0 assignees View on GitHub
documentation
Dominant language
C#
Stars
26.8k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

详情可以查看 https://github.com/BeyondDimension/SteamTools/issues/2129#issuecomment-1320911770

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

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

注入 Javascript 获取令牌的简易方法:
- 打开 `steam.apk` 下的 `assests/index.android.bundle`
- 查找 `key: "GetSteamGuardInfo"`,在 `value` 对应的 `function` 内,在 `return` 上方加入这样几行
```javascript
this.m_mapGuardInfo.forEach(function (t, n) {
console.error(n);
console.error(JSON.stringify(t))
});
```
结构应该是这样的:
```javascript
{
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](https://user-images.githubusercontent.com/68760718/202859217-551741d6-eb16-47da-b22a-1686aaa5cd86.png)

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.