当前位置:网站首页>APK加固技术的演变,APK加固技术和不足之处
APK加固技术的演变,APK加固技术和不足之处
2022-07-05 22:27:00 【贫穷斯蒂芬】
主流加固厂商
- 腾讯乐固
- 360加固
- 阿里聚安全
- 百度加固
- 顶像加固
- 网易云加固
- 邦邦加固
- 爱加密
- 娜迦加固
- 通付盾加固
- 。。。
第一代壳:动态加载
开发过程
程序分成加载(loader)与关键逻辑(payload)两部分,并分别打包
核心逻辑
启动时loader会先运行,释放出关键逻辑payload,然后使用java的动态加载技术进行加载,并转交控制权
不足之处
1、payload部分需要解压和释放在文件系统中,可以直接获取
2、可以通过hook虚拟机关键词函数,在加载payload时把dex在内存中dump出来
第二代壳:内存不落地加载
开发过程
加载loader,初始化StubApplication,解密后加载payload,转交控制权给原来的appcation的Oncreate方法,最好正常加载其他组件
核心逻辑
1、拦截系统IO相关函数,如read/write,在这些函数中提供透明加密
2、直接调用虚拟机提供的函数进行不落地加载,即内存加载。
不足之处
1、在启动时进行大量的解密操作,容易造成卡顿或者假死
2、payload被加载后,在内存中是连续的,拦截关键函数在内存dump还是可以直接获取的。
第三代壳:代指令抽取
开发过程
首先经保护级别降到函数级别,然后将原始的dex内的函数内容Code Item清场、单独移到加密文件、运行时再讲函数内容重新恢复到对应的函数体
核心逻辑
1、加载后恢复函数内存到dex 所在的内存区域
2、虚拟机读取dex文件后,内存对每一个函数有一个结构体,其中有一个只在指向函数的内容Codeitem,可以通过修改这个指针修改对应的函数内容
3、拦截虚拟机内与查找执行代码相关的函数,返回函数内容
不足之处
1、指令抽取方案跟虚拟机的jit优化冲突、达不到最佳的性能
2、依然使用java虚拟机进行函数内容执行,无法对抗自定义虚拟机如dexhunter
3、使用大量的虚拟机内部结构、存在兼容性问题
第四代壳:转换指令
核心逻辑
1、dex文件的函数被标记为native,内容被抽取并转化为JNI标准的动态库so文件、so文件通过JNI和Android系统交互
2、函数体内容被抽离并转换成自定义的指令格式、该格式使用自定义的接收器执行,然后然后使用JNI和系统交互
不足之处
1、攻击者可以将指令转换/VMP加固方案当做黑盒、通过自定义的JNI接口对象对黑盒内部进行探测、记录和分析;
2、四代VMP一般和第三代加固技术配合使用、三代存在的问题、该方案依旧存在
第五代加壳:VMP虚拟机源码保护
核心逻辑
1、基于第四代的方案:Java或kotlin => C++ 即使用java2cpp 方案
2、基于LLVM工具链实现so的VMP;
3、通过对IR进行指令转换,生成自定义的指令集IR => VM , app内部隔离出独立的执行环境,核心代码在此环境下面运行;
不足之处
1、无法摆脱JNI的依赖
2、由于java2cpp 会导致体积呈线性增大,性能有所下降;
边栏推荐
- Navigation day answer applet: preliminary competition of navigation knowledge competition
- How to quickly experience oneos
- 點到直線的距離直線的交點及夾角
- 解决thinkphp启动时“No input file specified”的问题
- 2022 Software Test Engineer salary increase strategy, how to reach 30K in three years
- Business learning of mall order module
- New 3D particle function in QT 6.3
- Sub total of Pico development
- A substring with a length of three and different characters in the leetcode simple question
- Practice: fabric user certificate revocation operation process
猜你喜欢
IIC bus realizes client device
Distance entre les points et les lignes
What if the files on the USB flash disk cannot be deleted? Win11 unable to delete U disk file solution tutorial
Promql demo service
Leetcode simple question: find the nearest point with the same X or Y coordinate
Livelocks and deadlocks of concurrency control
2022-07-05: given an array, you want to query the maximum value in any range at any time. If it is only established according to the initial array and has not been modified in the future, the RMQ meth
Interview questions for famous enterprises: Coins represent a given value
Performance monitoring of database tuning solutions
Leetcode simple question check whether all characters appear the same number of times
随机推荐
Pl/sql basic case
Advantages and disadvantages of the "Chris Richardson microservice series" microservice architecture
实战:fabric 用户证书吊销操作流程
Metaverse Ape获Negentropy Capital种子轮融资350万美元
Draw a red lantern with MATLAB
Database recovery strategy
[error record] file search strategy in groovy project (src/main/groovy/script.groovy needs to be used in the main function | groovy script directly uses the relative path of code)
Distributed resource management and task scheduling framework yarn
Overview of concurrency control
Overriding equals() & hashCode() in sub classes … considering super fields
The difference between MVVM and MVC
Sub total of Pico development
How to add new fields to mongodb with code (all)
请求二进制数据和base64格式数据的预览显示
如何开发引入小程序插件
Granularity of blocking of concurrency control
Some tutorials install the database on ubantu so as not to occupy computer memory?
700. Search in a Binary Search Tree. Sol
Postman core function analysis - parameterization and test report
Wonderful review of the digital Expo | highlight scientific research strength, and Zhongchuang computing power won the digital influence enterprise award