原文教程
吾爱破解论坛的个人空间_哔哩哔哩_bilibili
《安卓逆向这档事》一、模拟器环境搭建 - 『移动安全区』 - 吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn
观 吾爱破解《安卓逆向这档事》另类破解 | v5le0n9’s garden 有感
再写一个frida解法
ChallengeSecond
找包名及activity就不再赘述

找到关键比较点

查看isvip()
一个简单的boolean类型

直接编写frida代码 修改其返回值
1 2 3 4 5 6 7 8
| function main(){ Java.perform(function(){ Java.use("com.zj.wuaipojie.ui.ChallengeSecond").isvip.implementation = function() {return true;} console.log("fine") }) }
setImmediate(main)
|

ChallengeThird
流程大意为先执行 AdActivity 中内容 观看三秒广告后进入 ChallengeThird
ChallengeThird 中有一个检测版本弹窗及两个广告弹窗
第二个广告弹窗劫持了返回键
根据三种类型不同的弹窗 编写相应hook脚本

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| function main() { Java.perform(function() {
Java.choose("com.zj.wuaipojie.ui.AdActivity", { onMatch:function(instance) { console.log("found instance:", instance); instance.jump();
},onComplete:function() {console.log("fine");} });
Java.use("com.zj.wuaipojie.ui.ChallengeThird").getVersionCode.implementation = function(arg0) {
var result = this.getVersionCode(arg0); console.log("result:", JSON.stringify(result)); return 2; };
Java.use("androidx.appcompat.app.AlertDialog$Builder").setCancelable.implementation = function(arg1) { console.log("androidx.appcompat.app.AlertDialog$Builder is called! \nreturn result:", JSON.stringify(arg1));
return true; } }) }
setImmediate(main)
|

ChallengeFourth
直接修改其返回值
boolean类型 直接修改返回值即可

1 2 3 4 5 6 7
| function main() { Java.perform(function() { Java.use("com.zj.wuaipojie.ui.ChallengeFourth").check.implementation = function() {return true;} }) }
setImmediate(main)
|

hook encodeToString函数
hook check函数中最后返回值中对比的 bytes

1 2 3 4 5 6 7 8 9 10 11 12 13 14
| function main() { Java.perform(function() { Java.use("com.zj.wuaipojie.util.Base64Utils").encodeToString.implementation = function(arg1) { console.log("\ncom.zj.wuaipojie.util.Base64Utils.encodeToString is called! \ncArr=", JSON.stringify(arg1));
var result = this.encodeToString(arg1); console.log("content=", JSON.stringify(result));
return result; } }) }
setImmediate(main)
|


其中 Encode 函数中我们输入的 string+i2 也可以通过hook来获得
得到的结果为 ”username+{1000 - [len(username) + 1] * 7}“
我这里是”dongyun944”