jadx
1.下载jadx反编译工具,安装(解压即用)
| # 下载地址:https://github.com/skylot/jadx/releases |

2.打开jadx反编译工具:

3.抓包与代码定位
3.1 抓包

3.2.反编译定位代码的位置
| |
| |
| |
| -优先考虑地址 |
| - pwd不能直接搜,java中字符串是双引号引起来的 |
| -(“pwd”) |
hook 框架
1.hook介绍

2.下载与安装
注意:
-在电脑端(写hook函数----需要安装软件)----》需要有python的解释器环境(
需要安装两个模块
pip install frdia==16.0.19
)
| # 有可能安装会报错,需要下载whl,egg文件安装(用源码包安装) |
| # 需要根据:frdia+python版本+操作系统来选择对应的egg或whl文件 |
| # htts://pypi.doubanio.com/simple/frdia/ |
| # pip install xx.whl/egg |
-在手机(执行某个App的某个函数----需要运行服务)(所以手机也需要安装16.0.9)
注意注意:在手机上的服务版本要和电脑端的版本一致,否则不行
手机端安装步骤
| |
| |
| 命令: adb push xxxx /data/local/tmp/ |
| |
| |
| ./frdia-server-16.0.9 |
| |
下载地址


hook启动
frida查看手机端所有的进程和前台进程
| import frida |
| |
| |
| rdev = frida.get_remote_device() |
| print(rdev) |
| |
| |
| |
| |
| |
| |
| |
| front_app = rdev.get_frontmost_application() |
| print(front_app) |
| |
| |
| |


2.hook脚本
| import frida |
| import sys |
| |
| rdev = frida.get_remote_device() |
| |
| session = rdev.attach("车智赢+") |
| scr = """ |
| Java.perform(function(){ |
| //包,类 com.autohome.ahkit.utils.SecurityUtil |
| var UserModel = Java.use("com.che168.autotradercloud.user.model.UserModel"); |
| var SecurityUtil = Java.use("com.autohome.ahkit.utils.SecurityUtil"); |
| //hook替换 encodeMD5 |
| UserModel.loginByPassword.implementation = function(str,str2,str3,responseCallback){ |
| console.log("-----------------------请求来了-----------------------"); |
| console.log("用户名", str2); |
| console.log("密码", str3); |
| var res = this.loginByPassword(str,str2,str3,responseCallback); |
| return res; |
| }; |
| SecurityUtil.encodeMD5.implementation = function(str){ |
| console.log("=================请求来了...."); |
| console.log("明文是:" ,str); |
| var res = this.encodeMD5(str); |
| console.log("密文是:",res); |
| return res; |
| } |
| }); |
| """ |
| script = session.create_script(scr) |
| |
| |
| def on_message(message, data): |
| print(message, data) |
| |
| |
| script.on("message", on_message) |
| script.load() |
| sys.stdin.read() |
| |
3.python的hook方式
| |
| |
| |
| |
| import frida |
| import sys |
| |
| rdev = frida.get_remote_device() |
| pid = rdev.spawn(["com.hupu.shihuo"]) |
| session = rdev.attach(pid) |
| scr = """ |
| Java.perform(function(){ |
| //包,类 com.azhon.appupdate.dialog.UpdateDialog |
| var UpdateDialog = Java.use("com.azhon.appupdate.dialog.UpdateDialog") |
| |
| //hook替换 |
| UpdateDialog.show.implementation = function(){ |
| console.log("++++++++show来啦++++++++++++++"); |
| //this.show(); |
| } |
| |
| }); |
| """ |
| script = session.create_script(scr) |
| |
| |
| def on_message(message, data): |
| print(message, data) |
| |
| |
| script.on("message", on_message) |
| script.load() |
| rdev.resume(pid) |
| sys.stdin.read() |
js的hook方式
| ############################################################ |
| Java.perform(function(){ |
| |
| var UpdateDialog = Java.use("com.azhon.appupdate.dialog.UpdateDialog") |
| |
| |
| UpdateDialog.show.implementation = function(){ |
| console.log("++++++++show来啦++++++++++++++"); |
| |
| } |
| }); |
| ################################################################## |
| 执行js的hook代码 |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!