[逆向工具] 详解pbtk解析steam中的protobuf协议

导读:
Protobuf 是由 Google 开发的一种序列化格式,并在越来越多的 Android、Web、桌面和更多应用程序中使用。
在逆向工作中的,protobuf逆向的重要性也越来越多的体现来。
今天就跟大家一起使用pbtk神器,对steam平台协议,进行简单的分析。
pbtk的github地址:https://github.com/marin-m/pbtk
小编克隆岛gitee地址,方便国内用户下载:https://gitee.com/yeahmao/tools_reverse__pbtk
gitee项目中还将持续上传一些爬取到的proto代码。

环境搭建

准备个空的python虚拟环境:J:_ALLCODEvenvpy386_everythingScripts

REM 下载代码
cd /d J:_ALLCODEgiteeyeahmao
git clone https://gitee.com/yeahmao/tools_reverse__pbtk
cd tools_reverse__pbtk


REM python环境准备(记得设置阿里云镜像)
J:_ALLCODEvenvpy386_everythingScriptsactivate.bat
pip3 install protobuf pyqt5 pyqtwebengine requests websocket-client
REM 测试环境是否搭建成功,出现如下图片,即表示环境搭建成功了
python gui.py

在这里插入图片描述

确认proto所在模块

启动steam,通过CheatEngine搜索steam进程内存,如下图:

在这里插入图片描述
选中绿色结果,右键(或者ctrl+B)浏览内存区域,确认内存内容和内存所在模块。
在这里插入图片描述
在这里插入图片描述
通过上述方法,我们可以判断出以下模块包含proto信息:

  • steam.exe
  • steamclient.dll
  • steamui.dll
  • steamservice.dll

工具使用

这里我们使用from_binary.py直接解析可执行文件就能拿到proto原始文件了。

对于一些vmp加壳的可执行程序,我们需要通过第三方工具dump下内存,然后再执行from_binary.py

python ./extractors/from_binary.py "G:Program Files (x86)Steamsteam.exe" _protosteamsteam.exe
python ./extractors/from_binary.py "G:Program Files (x86)Steamsteamclient.dll" _protosteamsteamclient.dll
python ./extractors/from_binary.py "G:Program Files (x86)Steamsteamui.dll" _protosteamsteamui.dll
python ./extractors/from_binary.py "G:Program Files (x86)Steambinsteamservice.dll" _protosteamsteamservice.dll

参考资料

  • qq群:夜猫逐梦技术交流裙/953949723
    逐梦中原技术交流QQ群

**ps:**文章中内容仅用于技术交流,请勿用于违规违法行为。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码

)">
< <上一篇
下一篇>>