当前位置:网站首页>Anti App so层对抗分析
Anti App so层对抗分析
2022-08-09 09:19:00 【Codeooo】
1.jadx反编译,查看
直接在onCreate之前就进行加载了一个so
static {
System.loadLibrary("antidebug");
}
查看so有大文章:
直接分析动态注册:
静态分析 改改参数:
至于怎么静态改,查阅之前博客:https://blog.csdn.net/weixin_38927522/article/details/119672156
if (((*vm)->GetEnv)(vm) || (v4 = anti_time(), anti_breakpoint(v4, v5), anti_pthread(), registerNativeMethod(v6)) )
result = -1;
else
result = 65540;
jclass FindClass(const char* name) FindClass(查找java中的类)
jclass cls = (*env)->FindClass(env, “类路径”);
|| 或
(v4 = anti_time(), anti_breakpoint(v4, v5), anti_pthread(), registerNativeMethod(v6))
这里有一个成立,则会返回-1
=========anti_time():
v0 = getpid(); 获取进程id
gettimeofday(&v3, &tz);
gettimeofday(&tv, &tz);
v1 = tv.tv_sec - v3.tv_sec; 秒数相减
时间函数,传入两个值,进行相减,看结果是否大于1s
大于1: kill掉进程,并返回1
小于1 :直接返回0
=========anti_breakpoint:
if 是 v2,则进入循环,否则报错retuern 0
v2 = GetLibAddr();
v3 = v2;
if ( v2 )
v2为获取的地址值, 地址值若获取到则必然大于1为真:
这一块循环,都会走到:LABEL_11: return 1
经过我们分析,实际上我们要过掉反调,就应让他返回false
V6:
v2 = GetLibAddr();
v3 = v2;
v6 = *(v3 + 44); 地址+ 44
v4:初始值为0
这样地方可以考虑在IDA动态调试的时候: 将 if ( v4 >= v6 ) NOP掉直接走break
也可以用010Editor直接修改so 将大于改为小于 方法很多
==========anti_pthread():
这个地方很明显就是开线程:
v1 = pthread_self(); 获取自身线程id
pipe(&pipefd); 加入管道 实现进程通信
pthread_create(&v1, 0, anti_thread, 0); 创建线程
上面未发现异常,看下创建线程时候,V1地址,V1为自己的线程id
anti_thread:
看这个,kill -9 强制杀死
kill(childpid, 9);
v2 = getpid();
kill(v2, 9);
这方法大致看了下,获取了线程做了一些操作
_stack_chk_guard:
详细查阅:https://wiki.osdev.org/Stack_Smashing_Protector 361
用来检查进出函数时堆栈是否平衡和数据是否被修改
v1 = fork(); 一个子进程。成功则赋值childpid,失败则关闭。
最后才是走registerNativeMethod注册函数:
//RegisterNatives,注册方法;
//第一个、第二个:env,clazz; 第三个:定义的数组名;第四个:数组元素的个数
边栏推荐
- Summary of steps and methods for installing and uninstalling test cases that you must read
- 编程memonic chant、trick
- AES/ECB/PKCS5Padding加解密
- 【培训课程专用】Secureboot
- MySQL查漏补缺(二)排序检索、过滤数据、模糊查询、正则表达式
- 【环境搭建】tensorrt
- 接口测试的概念、目的、流程、测试方法有哪些?
- Global 19 Google Satellite Map Free View Download
- 软件测试分析流程及输出项包括哪些内容?
- 性能测试包括哪些方面?分类及测试方法有哪些?
猜你喜欢
“摄像头用不了”+win8.1+DELL+外置摄像头+USB免驱的解决办法
Venture DAO Industry Research Report: Macro and Classic Case Analysis, Model Summary, Future Suggestions
数据治理(四):数据仓库数据质量管理
性能测试报告包括哪些内容?模板范文哪里找?看这里
栈的实现之用链表实现
HD Satellite Map Browser
Anaconda4.8.3介绍、安装及使用教程安装(win10)并修改Jupyter默认工作目录
如何用数组实现环形队列
Teach you how to get a 0.1-meter high-precision satellite map for free
JMeter初探五-配置元件与参数化
随机推荐
Difference: char* and char[]
上帝视角看高清村庄卫星地图,附下载高清卫星地图最新方法
本体开发日记05-努力理解SWRL(上)
软件测试分析流程及输出项包括哪些内容?
接口测试的概念、目的、流程、测试方法有哪些?
on duplicate key update
关于指针、地址的大小的问题(以及malloc的用法)
【Harmony OS】【ArkUI】ets开发 简易视频播放器
lateral view explode的另一种实现方式
使用Protege4和CO-ODE工具构建OWL本体的实用指南-1.3版本(4.Building An OWL Ontology)
Redis基础
HD Satellite Map Browser
MySQL查漏补缺(三) 计算字段
本体开发日记03-排错进行时
软件测试的流程规范有哪些?具体要怎么做?
Read file by byte and character_load configuration file
Domestic Google earth, terrain analysis seconds kill with the map software
数理逻辑MOOC+知识点总结(未完无待续)
When and How to use MALLOC
国产谷歌地球同款软件,查看下载19级高清卫星影像so easy!