how professional hackers understand protected code while
play

How Professional Hackers Understand Protected Code while Performing - PowerPoint PPT Presentation

How Professional Hackers Understand Protected Code while Performing Attack Tasks July 10 th , 2017 - Dagstuhl Mariano Ceccato, Paolo Tonella , Cataldo Basile, Bart Coppens, Bjorn De Sutter, Paolo Falcarin, and Marco Torchiano 26 th IEEE


  1. How Professional Hackers Understand Protected Code while Performing Attack Tasks July 10 th , 2017 - Dagstuhl Mariano Ceccato, Paolo Tonella , Cataldo Basile, Bart Coppens, Bjorn De Sutter, Paolo Falcarin, and Marco Torchiano 26 th IEEE International Conference on Program Comprehension (ICPC – 2017) ACM SIGSOFT Distinguished Papers Award Best Paper Award 1

  2. Man-at-the-end attacks Programs contain critical assets that need to be protected • – Tampering – Code lifting – Data extraction Software protection (e.g., obfuscation) limits attack • – Delay attacks Attacks become economically disadvantageous – 2

  3. in a nutshell ASPIRE'Framework' SafeNet'use'case' Protected'SafeNet'use'case' ' Decision'Support'System' ' Gemalto'use'case' ' Protected'Gemalto'use'case' ' ' So9ware'Protec:on'Tool'Chain' Nagravision'use'case' Protected'Nagravision'use'case' ' Data$Hiding$ Algorithm$Hiding$ An01Tampering$ Remote$A6esta0on$ Renewability$ 3

  4. Research question • How do professional hackers understand protected code when they are attacking it? 4

  5. Participants Professional penetration testers working for security companies • Routinely involved in security assessment of company’s products • Profiles: • – Hackers with substantial experience in the field – Fluent with state of the art tools (reverse engineering, static analysis, debugging, profiling, tracing, …) – Able to customize existing tools, to develop plug-ins for them, and to develop their own custom tools Minimal intrusion (hacker activities can not be traced) • 5

  6. Experimental procedure Attack task definition • – Description of the program to attack, attack scope, attack goal(s) and report structure Monitoring (long running experiment: 30 days) • – Minimal intrusion into the daily activities Could not be traced automatically or through questionnaires • – Weekly conf call to monitor the progress and provide support for clarifying goals and tasks Attack reports • – Final (narrative) report of the attack activities and results – Qualitative analysis Objects C H Java C++ Total DRMMediaPlayer 2,595 644 1,859 1,389 6,487 LicenseManager 53,065 6,748 819 - 58,283 OTP 284,319 44,152 7,892 2,694 338,103 6

  7. Data collection • Report in free format • Professional hackers were asked to cover these topics: 1. type of activities carried out during the attack; 2. level of expertise required for each activity; 3. encountered obstacles; 4. decision made, assumptions, and attack strategies; 5. exploitation on a large scale in the real world. 6. return / remuneration of the attack effort; 7

  8. Data analysis Qualitative data analysis method from Grounded Theory • – Data collection – Open coding – Conceptualization – Model analysis Not applicable to our study: • – Immediate and continuous data analysis – Theoretical sampling – Theoretical saturation 8

  9. Open coding Performed by 7 coders from 4 academic • project partners – Autonomously & independently – High level instructions • Maximum freedom to coders, to minimize bias Annotated reports have been merged • No unification of annotations, to preserve • viewpoint diversity Annotator Case study A B C D E F G Total P 52 34 48 53 43 49 - 279 L 20 10 6 12 7 18 9 82 O 12 22 - 29 24 11 - 98 Total 84 66 54 94 74 78 9 459 9

  10. Conceptualization 1. Concept identification – Identify key concepts used by coders – Organize key concepts into a common hierarchy 2. Model inference – Temporal relations (e.g., before ) – Causal relations (e.g., cause ) – Conditional relations (e.g., condition for ) – Instrumental relations (e.g., used to ) 2 joint meetings: • – Merge codes (sentence by sentence, annotation by annotation) – Abstractions have been discussed, until consensus was reached Subjectivity reduction: • – Consensus among multiple coders – Traceability links between abstractions and annotations to help decision revision 10

  11. Conceptualization results: taxonomy of concepts Obstacle Attack strategy Attack step Protection Workaround Obfuscation Attack step Prepare attack Weakness Control flow flattening Prepare the environment Choose/evaluate alternative tool Global function pointer table Opaque predicates Reverse engineer app and protections Customize/extend tool Recognizable library Anti debugging Understand the app Port tool to target execution environment Shared library Preliminary understanding of the app White box cryptography Create new tool for the attack Java library Identify input / data format Customize execution environment Execution environment Decrypt code before executing it Build a workaround Limitations from operating system Recognize anomalous/unexpected behaviour Clear key Recreate protection in the small Tool limitations Identify API calls Clues available in plain text Assess e ff ort Analysis / reverse engineering Understand persistent storage / file / socket Tamper with code and execution Clear data in memory String / name analysis Understand code logic Tamper with execution environment Asset Symbolic execution / SMT solving Identify sensitive asset Background knowledge Run app in emulator Crypto analysis Identify code containing sensitive asset Knowledge on execution environment framework Undo protection Pattern matching Identify assets by static meta info Tool Deobfuscate the code* Static analysis Identify assets by naming scheme Debugger Convert code to standard format Dynamic analysis Identify thread/process containing sensitive asset Disable anti-debugging Profiler Dependency analysis Identify points of attack Tracer Obtain clear code after code decryption at runtime Data flow analysis Identify output generation Emulator Tamper with execution Memory dump Identify protection Replace API functions with reimplementation Monitor public interfaces Run analysis Tamper with data Debugging Reverse engineer the code Tamper with code statically Profiling Disassemble the code Out of context execution Tracing Deobfuscate the code* Brute force attack Build the attack strategy Statistical analysis Analyze attack result Evaluate and select alternative step / revise attack strategy Di ff erential data analysis Make hypothesis Choose path of least resistance Correlation analysis Make hypothesis on protection Limit scope of attack Black-box analysis Make hypothesis on reasons for attack failure Limit scope of attack by static meta info File format analysis Confirm hypothesis 11

  12. Obstacle Protection Obfuscation Control flow flattening Opaque predicates Anti debugging [P:F:7] General obstacle to understanding [by White box cryptography dynamic analysis]: execution environment Execution environment (Android: limitations on network access and Limitations from operating system maximum file size) Tool limitations Analysis / reverse engineering String / name analysis Symbolic execution / SMT solving Crypto analysis Pattern matching “Aside from the [omissis] added inconveniences Static analysis [due to protections], execution environment Dynamic analysis requirements can also make an attacker’s task Dependency analysis Data flow analysis much more difficult. [omissis] Things such as Memory dump limitations on network access and maximum Monitor public interfaces file size limitations caused problems during this Debugging exercise” Profiling Tracing Statistical analysis Di ff erential data analysis Correlation analysis Black-box analysis 12 File format analysis

  13. Obstacle Protection Obfuscation Control flow flattening Opaque predicates Anti debugging White box cryptography Execution environment Limitations from operating system Tool limitations Analysis / reverse engineering String / name analysis Symbolic execution / SMT solving Crypto analysis Pattern matching Static analysis Dynamic analysis Dependency analysis Data flow analysis Memory dump Monitor public interfaces Debugging Profiling Tracing Statistical analysis Di ff erential data analysis Correlation analysis Black-box analysis 13 File format analysis

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend