




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Program ObfuscationXU, Hui August 6, 2022COMP130159.011. Overview2The Problem of Software IP ProtectionExamples of MATE attacks:Disable License CheckingSteal AlgorithmsClone Codesif (verifyLicense (key) startProgram();else printf (“invalid key”); exit(-1);Software intellectual property:Server side (
2、secure)Client side (vulnerable)MATE (Man-At-The-End) attack Collberg11: reverse engineerCollberg11 C. Collberg, et al. Toward digital asset protection. IEEE Intelligent Systems, 2011.3Software Obfuscation for IP ProtectionC. Collberg, et al. A taxonomy of obfuscating transformations, 1997Obfuscator:
3、 a program that transforms the application into one that is functionally identical to the original but which is much more difficult to understand.Evaluation CriteriaPotency: to what degree is a human reader confusedResilience: how well are automatic deobfuscation attacks resistedCost: how much overh
4、ead is added to the applicationStealth: how well does obfuscated code blend in with the original code42. Software Obfuscation5Obfuscation TargetComponents6 pile Java Bytecode is EasyAPKjd-guiunzipdex2jarview7Software ObfuscationLexical obfuscationUse meaningless identifiers to replace meaningful one
5、s,Typically with alphabets or short random strings.Control-flow obfuscationIncrease the complexity of the control-flow graph, e.g., by adding bogus control flows.Data obfuscationOriginal programDifferent Versions of obfuscated programYadegari, et. al, A Generic Approach to Automatic Deobfuscation of
6、 Executable Code, S&P 20158Lexical ObfuscationWhat lexical information can be scrambled?Variable nameMethod nameField namePerform a def-use analysis for each identifier to obfuscate.Make sure both def and use are changed Try it yourself via static data-flow analysisWhat cannot be changed?Identifiers
7、 defined by other libraries9Obfuscating Android Apps During CompilationClassic tool: ProGuardLatest tool in Android Studio: R810Effectiveness of Obfuscation11Residual Informationresidual information“We can recover a large portion of lexical information based on the residual information, e.g., names
8、of invoked methods and strings.”B. Bichsel, et al. Statistical deobfuscation of android applications, CCS, 2016.Java Source CodeJava APIThird-party LibrariesAndroid Framework APIinvocation12How to Obfuscate ponent Information?Use call wrappers and dispatchersOriginal VersionObfuscated Version3-rd pa
9、rty libraryfunA()funB()funC()Java ClassfunB()invoke3-rd party libraryfunA()funB()funC()Java Classdispatcher()invokeWrapper Classdispatcher()invoke13Control-flow ObfuscationIncrease the (Cyclomatic) complexity of the program withBogus control flowControl-flow flatteningE = the number of edges of the
10、graph.N = the number of nodes of the graph.P = the number of connected components.ababbogusccdispatcherabc14Obfuscation with Obfuscator-LLVM -mllvm -bcf: activates the bogus control flow pass-mllvm -bcf_loop=3: if the pass is activated, applies it 3 times on a function. Default: 1-mllvm -bcf_prob=40
11、: if the pass is activated, a basic bloc will be obfuscated with a probability of 40%. Default: 30Use LLVM to compile C programs with the following arguments:Other features in Obfuscator-LLVMControl-flow flatteningInstructions substitution15Bogus Control FlowP. Junod, et. al, Obfuscator-LLVM - Softw
12、are Protection for the Masses, 2015If-elseadd junk codes16Opaque Predicate Used in Obf-LLVMx7 = 0;y8 = 0;if(x7(x7 1)%2 = 0|y81) if(x%2=1) x=3*x+1; else x = x/2; if (x = 1) /always reachable OriginalCode();20Relationship with Symbolic Executionint opaque(int x) int *p=&x; int*q=&x; int y=0; if(x*x3)/
13、contextual opaque predicate if(x*x-4x+30) x=x1; if(*p)%2=0)/dynamic opaque predicate y=x+1; else y=x+1; y=y+2; if(*q)%2=0) y=y+2; x=y+3; else x=y+3; return x;Use symbolic execution to analyze these path constraints21Control-Flow Flatteningif-elsewhile+switch-caseFlattening22Control-Flow FlatteningLs
14、zl, Tmea, and kos Kiss. Obfuscating C+ programs via control flow flattening. 200923VM-based ObfuscationCamouflage widely used by malware.Convert x86 machine code into virtual machine bytecode and execute it at runtimeAvailable tools: VMProtectCode VirtualizerRolfRolles x86 Virtualizer 24Virtualizati
15、on Virtualization25VM Section263. Theoretical Limitations27Program ObfuscatorB. Barak et al., On the (im) possibility of obfuscating programs, CRYPTO, 200128Theoretical Limitation of ObfuscationVirtual block-box property (VBBP): The obfuscated program does not help in determine the program result (e
16、ven leaks 1-bit information) than given only oracle access.VBBP is not always possible.B. Barak et al., On the (im) possibility of obfuscating programs, CRYPTO, 200129Proof VBBP with A Counter ExampleProof by contraction. Details can be found in Baraks paper.B. Barak et al., On the (im) possibility
17、of obfuscating programs, CRYPTO, 200130Indistinguishable Property31Idea for Achieving IOS. Garg et al., Candidate indistinguishability obfuscation and functional encryption for all circuits, FOCS 201332Convert to Branching Programs1s2s9s3s4s5s6s7s800011111bit1s1011000001bit2bit3bit4bit5bit6bit7bit8i
18、f(x = 7) return 1;else return 0;Example: convert a point function33Convert to Matrix Branching Programsmatrices for bit1head matrixtail matrix34MBP Randomization35Encrypt RMBP with Graded EncodingCandidate algorithms: GGH, CLTEncrypt each element with a key, like public key encryption.The computatio
19、n is noisy (non-deterministic) by introducing some small integers.The final evaluation function (zero-testing) is deterministic.Far from practical usage Results achieved when encrypting a point function.Lewi, et al. 5gen: A framework for prototyping applications using multilinear maps and matrix branching programs.“CCS 2016.36Comparison of The Two FieldsPROGRAM OBFUSCATOR(THEORETICAL)CODE OBFUSCATORRESEARCH COMMUNITYtheory scientistssoftware scientistsTarget Programcircuit/Turing-Machinec
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 语文课外活动的心得体会
- 健身房会员售后服务流程规划
- 建筑公司可持续发展理念范文
- 一年级科学信息技术融合计划
- 人教版六年级数学教学反思与改进计划
- 2025年秋季学校小学少先队历史文化传承计划
- 儿童哮喘管理的护理服务方案
- 航空物流服务协议
- 音乐行业在线音乐平台开发及运营策略
- 法律英语翻译技巧试题
- 亮化工程售后服务方案及优惠承诺
- 物业服务礼仪礼貌培训七大要点
- 2025-2030中国儿童服装行业深度调研及投资前景预测研究报告
- 2025年温州职业技术学院单招职业技能考试题库必考题
- 2025年高考物理模拟试卷1(广东卷)及答案
- 《颅内血肿教学查房》课件
- 2025新人教版七下英语单词默写表
- 人教版一年级数学上册《6-10的认识和加减法》同步练习题及答案
- 二十案例示轮回
- 老年营养示范化病房创建方案
- 设备安全操作培训
评论
0/150
提交评论