当前位置:网站首页>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 会导致体积呈线性增大,性能有所下降;
边栏推荐
- [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)
- Common interview questions of JVM manufacturers
- 等到产业互联网时代真正发展成熟,我们将会看待一系列的新产业巨头的出现
- 记录几个常见问题(202207)
- 科技云报道:算力网络,还需跨越几道坎?
- 2022-07-05:给定一个数组,想随时查询任何范围上的最大值。 如果只是根据初始数组建立、并且以后没有修改, 那么RMQ方法比线段树方法好实现,时间复杂度O(N*logN),额外空间复杂度O(N*
- Metaverse Ape获Negentropy Capital种子轮融资350万美元
- MySQL actual combat 45 lecture learning (I)
- Go语言学习教程(十五)
- 700. Search in a Binary Search Tree. Sol
猜你喜欢

Pl/sql basic case

Leetcode simple question: the minimum cost of buying candy at a discount

2022 Software Test Engineer salary increase strategy, how to reach 30K in three years

Oracle advanced query

Advantages and disadvantages of the "Chris Richardson microservice series" microservice architecture

Distance from point to line intersection and included angle of line

Technology cloud report won the special contribution award for the 10th anniversary of 2013-2022 of the "cloud Ding Award" of the global cloud computing conference

Talking about MySQL index

Three "factions" in the metauniverse

Overview of concurrency control
随机推荐
科技云报道:算力网络,还需跨越几道坎?
Pl/sql basic case
笔记本电脑蓝牙怎么用来连接耳机
Golang writes the opening chapter of selenium framework
What if the files on the USB flash disk cannot be deleted? Win11 unable to delete U disk file solution tutorial
Wonderful review of the digital Expo | highlight scientific research strength, and Zhongchuang computing power won the digital influence enterprise award
The statistics of leetcode simple question is the public string that has appeared once
What changes has Web3 brought to the Internet?
Form artifact
Metaverse ape ape community was invited to attend the 2022 Guangdong Hong Kong Macao Great Bay metauniverse and Web3.0 theme summit to share the evolution of ape community civilization from technology
CA certificate trampled pit
点到直线的距离直线的交点及夹角
Performance testing of software testing
Metasploit(msf)利用ms17_010(永恒之蓝)出现Encoding::UndefinedConversionError问题
Leetcode simple question check whether all characters appear the same number of times
元宇宙中的三大“派系”
Post-90s tester: "after joining Ali, this time, I decided not to change jobs."
The countdown to the launch of metaverse ape is hot
[Chongqing Guangdong education] National Open University autumn 2018 0088-21t Insurance Introduction reference questions
Livelocks and deadlocks of concurrency control