【原创】安卓逆向实例 - 懒人驾考【永久会员 + 无限试用技巧 + 去广告】
# 0x00 前言之前答应朋友送他一个考驾照的会员软件,今天动手来试试看
希望他考试一帆风顺
# 0x01 准备工作
懒人驾考最新版本
> https://www.wandoujia.com/apps/8106296
使用工具
> MT管理器
# 0x02 需要逆向的功能
## 1、永久会员
!(data/attachment/forum/202302/01/164503ieweo9beiw3z5hzd.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "VIP.png")
## 2、去广告(三个位置)
位置一:开屏广告
!(data/attachment/forum/202302/01/164557lpzl8ayl4mpx9ehp.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "gg-1.png")
位置二:答题广告
!(data/attachment/forum/202302/01/164620idbphieli5i3j58f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "gg-2.png")
位置三:答题结束的广告
!(data/attachment/forum/202302/01/164722u44vr5bvxb3bxpxq.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "gg-4.png")
## 3、无限试用速记技巧
!(data/attachment/forum/202302/01/164808o2o1a3dllqjk7ddl.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "suji.png")
# 0x03 逆向分析
## 1、逆向永久会员
观察下永久会员的页面,直接在搜索:会员
!(data/attachment/forum/202302/01/165116gulj4p99p5t95t92.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "fvip-1.png")
随便选择一个,我就偷懒选了第一个;不看 smail 代码,直接转成 Java 代码
这个G方法中的 key_mmkv_vip_list_forever 字符串有点意思
而且是从 k.a 方法中返回之后进行 decode=1Bool
!(data/attachment/forum/202302/01/165231tw2v70ajwzeytve7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
那么返回 smail,修改一下让 i 永远 == 1
!(data/attachment/forum/202302/01/165655euoqnw1okbkno1n3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "fvip-2.png")
保存编译,查看是否已经成为永久会员
!(data/attachment/forum/202302/01/165839dmlzignfbu28lfzl.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "fvip-3.png")
## 2、逆向无限试用速记技巧
因为不知道有啥提示,所以先去试用技巧,把次数耗光,看是否有提示
!(data/attachment/forum/202302/01/170154zllut8n3m6vt1fd5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "freec-1.png")
尝试搜索:免费机会已用完,随便选择一个点击
!(data/attachment/forum/202302/01/170342nijjfvbjz3wgjvs8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "freec-2.png")
不看 smail 代码,直接转成 Java 代码
观察到这不就是提示机会的地方,它的值是 getLaveFreeCount 这个方法来的
```java
private void F() {
if (b.h()) {
this.d.setVisibility(8);
this.d.setText("");
} else {
this.l = getIntent().getIntExtra("from", 0);
if (k.a().decode=1Bool("key_mmkv_vip_list_KCVIP") || this.l == 1) {
this.d.setVisibility(8);
this.d.setText("");
} else {
this.d.setVisibility(0);
int laveFreeCount = LearnPreferences.getLaveFreeCount();
if (laveFreeCount > 0) {
TextView textView = this.d;
textView.setText(Html.fromHtml("剩余<font color='#ff0000'>" + laveFreeCount + "</font>次体验机会"));
} else {
this.d.setText("免费机会已用完");
if (!k.a().decode=1Bool("key_mmkv_static_is_upskill", false)) {
AppLog.onEventV3("exercise_skill_over", m.c("practiceCount", k.a().decode=1Int("key_mmkv_static_question_count", 0)));
k.a().encode("key_mmkv_static_is_upskill", true);
}
}
}
}
```
!(data/attachment/forum/202302/01/170605fy34xbz1xgw9j3go.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "freec-3.png")
跟进 getLaveFreeCount 这个方法
```Java
public static int getLastFreeCount(String str) {
LearnPreferences learnPreferences = sPref;
return learnPreferences.getIntValue("last_free_count_" + str, 0);
}
```
接着来修改 smail,逆向的思路很多种,这里我提供两种思路
> 1. getLearnMaxFreeCount() 方法
> 2. 修改关于次数的判断
修改关于次数的判断:减法改加法
!(data/attachment/forum/202302/01/171224izqr2q36ykl3y8yq.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "freec-4.png")
修改 sub-int -> add -int:
> 补充:
>
> add-int/2addr vx,vy 添加 vy 到 vx.
>
> sub-int/2addr vx,vy 计算 vx-vy 并将结果赋值到 vx.
!(data/attachment/forum/202302/01/171507r0o2exx4p06p2xiw.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "ccode.png")
修改之后,每次试用机会都会+1
!(data/attachment/forum/202302/01/171311ypqso1vhhywkof7f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "freec-5.png")
## 3、去广告
这个软件开了会员之后并不会去广告;
但是这个去广告的经验,是我在论坛中看了很多篇帖子学习的,现在分享给大家
去除腾讯的广告
广告特征字符串:qq.e,搜索替换为任意字符串即可
> 原理:通过破坏代码之间的调用,来达到去广告的效果
>
> PS:具体为什么是腾讯广告,留给你仔细观察了
!(data/attachment/forum/202302/01/171847l9b4lthz7yzze59l.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "qgg-1.png")
!(data/attachment/forum/202302/01/171853bc3wooydewn7ndea.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "qgg-2.png")
# 0x04 总结
以后的帖子都不打算隐藏了,写文章更多是我自己思考总结
当然如果你看了我的帖子有所收获,我也挺高兴的
没签名校验,能搜索字符串,搞起来就是爽啊 感谢大佬的分享,最近正在学习安卓逆向,有空试试 楼主,辛苦啦,谢谢啦。 牛啊!爱了爱了! 感谢分享 感谢分享 继续学习 感谢分享 楼主,辛苦啦,谢谢啦。
页:
[1]
2