版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、安卓应用保护技术分析技术创新,变革未来AGENDA Why app packing services are becoming popular The main app packing/unpacking techniquesNew trends3APP REPACKAGING4 Given10,305 popular apps, 954,986 repackaged apps are found*27.505582.5110SOFTWAREGAME*Datasource LinkTHE CONSEQUENCES OF APP REPACKAGING Developers Users5How
2、easily to repackage an app?Video DemoAPP PACKING SERVICE PROVIDERS7FREE SERVICEDOUBLE-EDGED SWORD Packing services create problem for both good and bad guys Bad guys: malware authors, (重)打包党 hard to repackage popular apps Good guys: app markets maintainers, security researchers(?)8IN REALITY App pac
3、king services are abused by bad guys9*Datasource LinkMAIN TYPES OF APP PACKING TECHNIQUES Static: cheat static analysis tools Dynamic Memory dex loading: directly load encrypted dex file into memory and execute Anti-analysis: raise the bar for dynamic analysis10MAIN TYPES OF APP UNPACKING TECHNIQUES
4、 Static: reverse engineer the encryption algorithm Pros: one method to kill all samples protected by one packer Cons: hard usually the encryption algorithm is in the native code, and continuously changing11MAIN TYPES OF APP UNPACKING TECHNIQUES Dynamic: memory dump Basic idea: the unencrypted byteco
5、de will be eventually in memory Lack of self-modifying (and JITed bytecode) support12ENCRYPTED CODEDVMDECRYPTED CODEPACKERMETA DATAApp Packing Techniques: StaticMANIFEST CHEATING Manifest file: define package name, permissions, components When parsed, attributes are translated into ids If we insert
6、an id to represent an undefined Java class aapt: ignore this apktool: honor this- app repackaged by apktool will crash due to unimplemented Java classes14FAKE ENCRYPTION Apk file isindeed a normal zip file Set the encryption flag to true Old Android system does NOT check this flag, but static analys
7、t tool does15BYTECODE-OBFUSCATION Depends on the disassembly algorithm Linear Recursive16Image source: DexLabs(LONG)FILE-NAME TRICKS Limited length of a file name17OVERVIEW Pros: easy to implement, better compatibility, low performance overhead Cons: easy to be bypassed, Small tricks, not a systemat
8、ic way to protect app18App Packing Techniques: DynamicBACKGROUND Dex Header20BACKGROUND class_def21BACKGROUND Original dex file is embedded in the OAT file22THE BASIC IDEA OF APP PACKING23ORIGINAL DEX CODEPACKER SOENCRYPTED DEX CODEloadInjected ApplicationDVMDECRYPTED DEX CODEdecryptMETA DATAload de
9、x from memoryAPP PACKING: DALVIK24BASICLASSLOADERPATHLISTDEXELEMENTSDEXFILEDEXFILEMEMORY LOADED DEXFILE STRUCTUREAPP PACKING: ART OAT file can still be executed in the interpreter mode cost: performance loss The embedded dex file Dex2oat is responsible for translating dex file into oat file when the
10、 app is being installed25APP PACKING: ART (CONTINUED) Propose I: run the app in the interpreter mode HowCreate an empty dex file (with all classes but empty methods real methods are encrypted)and the corresponding oat file will be createdDecrypt the real methods and make up the empty method structur
11、e in memory26APP PACKING: ART (CONTINUED) Propose II: Encrypt the generated oat file How?27APP PACKER: PROTECT THE PACKER ITSELF Packer is usually in the format of so library o-LLVM upx init functions Based on custom so loader VMP engine to protect key functions28App UNPacking Techniques: StaticAPP
12、UNPACKING: STATIC Understand the encryption/decryption logic of the packer Pros: one effort to kill all (apps with one packer) Cons: so packer (VMP engine), encryption method/key is continuously changing But it is efficient if we have an insider30App UNPacking Techniques: DynamicTHE KEY VULNERABLE P
13、OINT OF APP PACKING Dalvik VM executes unencrypted dex code requires the integrity of some meta data32点穴RUNTIME MEMORY STATE33Dexfile ViewImage source: AppSpear paperDalvik ViewAPP UNPACKING 101 Basic idea: locate the dex file in memory and dump How: locate “dex. 035” When: hook key functions (mmap,
14、 strcmp and etc) Countermeasure: corrupt the header, inline key functions34APP UNPACKING 102 Basic idea: dump the memory and reconstruct the dex file without relying on the dex header DexHunter, and AppSpear How: modify libdvm, dump memory, reconstruct dex35APP UNPACKING 102: DEXHUNTER36Image source
15、: DexHunter HitCon2015 slidesAPP UNPACKING 102: APPSPEAR37Image source: AppSpear paperCountermeasuresINCREMENTAL UNPACKING When to refill these instructions?39ANTI-DISASSEMBLY Change the value of debug_info_off40ANTI-PTRACE/DEBUG Check files: /proc/$pid/status, etc Check process name SIGTRAP Multi-p
16、rocess Inotify Hook read/write APIs41New TrendsDEX2NATIVE The dex code could be dumped from memory (as long as Dalvik is still used) Dex code could be recovered Native code is much harder to understand4344DEX2NATIVE: 101 Hide the control flowABCABCDISPATCHER( JNI)DISPATCHER (JNI)DEAD CODE?DEX2NATIVE 102 Completely convert the bytecode to another format of bytecode: how to maintain the sema
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025甘肃禹力水电工程有限责任公司招聘15人笔试参考题库附带答案详解
- 2025湖南湘潭高新集团有限公司公开招聘工作人员3人笔试参考题库附带答案详解
- 2025湖北十堰市武当山文旅集团招聘笔试笔试参考题库附带答案详解
- 2025浙江温州市鹿通文化旅游有限公司招聘11人笔试参考题库附带答案详解
- 2025浙江宁波市象山县人力资源开发服务有限公司第二期招聘总及对象笔试参考题库附带答案详解
- 2026及未来5年中国45度接头市场数据分析及竞争策略研究报告
- 浙江国企招聘截止9月24日可笔试历年典型考点题库附带答案详解
- 阿拉善盟2025内蒙古阿拉善盟融媒体中心引进播音主持急需紧缺人才6人笔试历年参考题库典型考点附带答案详解
- 连城县2025福建龙岩连城县木偶艺术传习中心招聘笔试历年参考题库典型考点附带答案详解
- 海口市海南海口市林业局2025年公开招聘下属事业单位工作人员5人笔试历年参考题库典型考点附带答案详解
- 纺粘针刺非织造布制作工操作知识考核试卷含答案
- 2025年国防军事动员教育知识竞赛题库及答案(共50题)
- 泛光照明施工安全措施方案
- KPS评分表模板及使用指南
- 2025年专利代理师资格真题及答案解析
- 养老院组织架构及岗位职责说明
- 2025年1月浙江省高考技术试卷真题(含答案)
- 两办关于进一步加强矿山安全生产意见
- 2025年湖南邵阳市中考物理考试真题及答案
- 广东中考化学三年(2023-2025)真题分类汇编:专题06 金属和金属矿物(解析版)
- 钢构消防车库施工方案
评论
0/150
提交评论