版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024-2030年孕妇专用药搬迁改造项目可行性研究报告
- 宿舍楼房屋课课程设计
- 2024-2030年全球及中国门塞警报器行业营销策略及竞争对手分析报告
- 2024-2030年全球及中国花园绿篱机行业现状动态及发展前景预测报告
- 2024-2030年全球及中国素肉行业营销策略及销售前景预测报告
- 2024-2030年全球及中国电缆润滑剂行业销售策略及盈利前景预测报告
- 2024-2030年全球及中国烘焙人造黄油行业销售模式及营销策略分析报告
- 2024-2030年全球及中国氮化镓型功率元件行业供需前景与竞争格局预测报告
- 2024-2030年全球及中国普鲁卡因青霉素行业竞争态势及投资前景预测报告
- 2024-2030年全球及中国废料装载机行业发展动态及需求前景预测报告
- 学前儿童健康教育与活动指导(第2版)高职PPT完整全套教学课件
- 理论力学-上海交通大学中国大学mooc课后章节答案期末考试题库2023年
- 风景背后的地貌学-华中师范大学中国大学mooc课后章节答案期末考试题库2023年
- 消防联动测试记录表
- 【教师必备】部编版四年级语文上册第二单元【集体备课】
- 23所行政管理博士点学校之一
- 静脉导管常见并发症临床护理实践指南1
- 学校学生劳动教育评价表
- apt攻击专项应急预案
- 小学三年级秋季学期《道德与法治》(统编版)学习任务单(全册汇总)
- 奥迪A7L汽车说明书
评论
0/150
提交评论