安卓逆向——Frida Bypass Anti Root Detected & Hook
继续讲讲Frida吧前面的准备步骤请参阅下面的帖子这里就不多赘述了
安卓逆向——Frida Hook入门教学
https://www.52hb.com/thread-39372-1-1.html
(出处: 吾爱汇编论坛)
直接进入正题
将APK拖进反编译工具中得到MainActivity处代码
public class MainActivity
extends Activity
{
private void a(String paramString)
{
AlertDialog localAlertDialog = new AlertDialog.Builder(this).create();
localAlertDialog.setTitle(paramString);
localAlertDialog.setMessage("This in unacceptable. The app is now going to exit.");
//new b(this)为调用系统退出方法
localAlertDialog.setButton(-3, "OK", new b(this));
localAlertDialog.setCancelable(false);
localAlertDialog.show();
}
protected void onCreate(Bundle paramBundle)
{
//此处检测安装环境是否为Root ,符合则直接退出软件
if ((sg.vantagepoint.a.c.a()) || (sg.vantagepoint.a.c.b()) || (sg.vantagepoint.a.c.c())) {
a("Root detected!");
}
//此处一样检测是否被调试,条件符合则直接退出
if (sg.vantagepoint.a.b.a(getApplicationContext())) {
a("App is debuggable!");
}
super.onCreate(paramBundle);
setContentView(2130903040);
}
public void verify(View paramView)
{
paramView = ((EditText)findViewById(2131230720)).getText().toString();
AlertDialog localAlertDialog = new AlertDialog.Builder(this).create();
if (a.a(paramView))
{//这里判断密码正确还是错误
localAlertDialog.setTitle("Success!");
localAlertDialog.setMessage("This is the correct secret.");
}
for (;;)
{
localAlertDialog.setButton(-3, "OK", new c(this));
localAlertDialog.show();
return;
localAlertDialog.setTitle("Nope...");
localAlertDialog.setMessage("That's not it. Try again.");
}
}
}
我们跟进退出方法看一下
class b
implements DialogInterface.OnClickListener
{
b(MainActivity paramMainActivity) {}
public void onClick(DialogInterface paramDialogInterface, int paramInt)
{
//调用系统退出
System.exit(0);
}
}
很明显了这里就是关键点正常检测到打开是这样的
那么怎么修改呢两种方法
方法一:暴力注释
我们查看Smali源码
这样就OK了
方法二使用Frida Hook
修改onClick方法实现如下
**** Hidden Message *****
保存为Hook.py运行
教程就到这里了感谢大家
评分走一波虽然你们都不爱Android{:5_184:}
给我继续下去的动力
。。。打破零回复{:5_185:} 教一下小说软件怎么逆向,就是那种收费的 还有逆向用的工具打包一下。。我网络上找的没用 Pit丶妖 发表于 2018-8-25 14:31
还有逆向用的工具打包一下。。我网络上找的没用
??工具包 ??Android Killer? 小说一样的拖进AK里面看一下相应的方法修改代码 学习了
支持恒大 学习了 谢谢 学习有无止境 看下。。。 学习了 谢谢