Obfuscation Resilient Search Throughexecutable Classification

Obfuscation Resilient Search Throughexecutable Classification

Obfuscation Resilient Search through Executable Classification Fang-Hsiang Su Jonathan Bell Computer Science Computer Science Columbia University, USA George Mason University, USA [email protected] [email protected] Gail Kaiser Baishakhi Ray Computer Science Computer Science Columbia University, USA Columbia University, USA [email protected] [email protected] Abstract CCS Concepts • Security and privacy ! Software reverse Android applications are usually obfuscated before release, engineering; • Theory of computation ! Program anal- making it difficult to analyze them for malware presence or ysis; • Computing methodologies ! Supervised learning intellectual property violations. Obfuscators might hide the by classification; true intent of code by renaming variables and/or modifying Keywords executable search, bytecode search, obfuscation program structures. It is challenging to search for executa- resilience, bytecode analysis, deep learning bles relevant to an obfuscated application for developers to analyze efficiently. Prior approaches toward obfuscation ACM Reference Format: resilient search have relied on certain structural parts of Fang-Hsiang Su, Jonathan Bell, Gail Kaiser, and Baishakhi Ray. 2018. Obfuscation Resilient Search through Executable Classification. In apps remaining as landmarks, un-touched by obfuscation. Proceedings of 2nd ACM SIGPLAN International Workshop on Ma- For instance, some prior approaches have assumed that the chine Learning and Programming Languages (MAPL’18). ACM, New structural relationships between identifiers are not broken York, NY, USA, 11 pages. https://doi.org/10.1145/3211346.3211352 by obfuscators; others have assumed that control flow graphs maintain their structures. Both approaches can be easily de- 1 Introduction feated by a motivated obfuscator. We present a new approach, Macneto, to search for programs relevant to obfuscated exe- Android apps are typically obfuscated before delivery to de- cutables leveraging deep learning and principal components crease the size of distributed binaries and reduce disallowed on instructions. Macneto makes few assumptions about the reuse. Malware authors may take advantage of the general kinds of modifications that an obfuscator might perform. We expectation that Android code is obfuscated to pass off ob- show that it has high search precision for executables obfus- fuscated malware as benign code: obfuscation will hide the cated by a state-of-the-art obfuscator that changes control actual purpose of the malicious code, and the fact that there flow. Further, we also demonstrate the potential of Macneto is obfuscation will not be surprising, as it is already a gen- to help developers understand executables, where Macneto eral practice. Hence, there is great interest in obfuscation infers keywords (which are from relevant un-obfuscated resilient search: tools that can automatically find program programs) for obfuscated executables. structures (in a known codebase) likely to be similar to the original version of code that has been obfuscated. arXiv:1806.02432v2 [cs.SE] 11 Jun 2018 Obfuscation resilient search can be used in various au- tomated analyses, for instance, plagiarism detection [39] or detecting precise versions of third party libraries [25] Permission to make digital or hard copies of all or part of this work for embedded in applications, allowing auditors to identify the personal or classroom use is granted without fee provided that copies are not use of vulnerable libraries. Similarly, obfuscation resilient made or distributed for profit or commercial advantage and that copies bear search can search among un-obfuscated apps to recover iden- this notice and the full citation on the first page. Copyrights for components tifiers [11] and/or control flow [51] of an obfuscated app. of this work owned by others than ACM must be honored. Abstracting with Obfuscation resilient search can be useful in human-guided credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request analysis, where an engineer inspects applications to deter- permissions from [email protected]. mine security risks. MAPL’18, June 18, 2018, Philadelphia, PA, USA In general, searching for code likely to be similar to an © 2018 Association for Computing Machinery. obfuscated program relies on some training set of pairs of ACM ISBN 978-1-4503-5834-7/18/06...$15.00 un-obfuscated code and its obfuscated counterpart to build https://doi.org/10.1145/3211346.3211352 a model. Once trained, the code search engine can match MAPL’18, June 18, 2018, Philadelphia, PA, USA Fang-Hsiang Su, Jonathan Bell, Gail Kaiser, and Baishakhi Ray obfuscated code to its original un-obfuscated code when both • A new approach to conduct obfuscation resilient code obfuscated and un-obfuscated versions are in the corpus. In search leveraging deep learning and principal components the more typical use case when only the obfuscated code is (features) on bytecode. at hand, and the un-obfuscated version is unknown to the • A new approach to automate classification of programs analyst, the code search may be able to find known code with similar semantics. highly likely to be similar to the un-obfuscated version. • An evaluation of our tool on an advanced obfuscator. For example, some code search “deobfuscation” tools rely • An open source implementation of Macneto [1]. on the structure of an application’s control flow graph. How- ever, they are susceptible to obfuscators that introduce extra basic blocks and jumps to the application’s code and can 2 Background be slow to use, requiring many pair-wise comparisons to In general, obfuscators make transformations to code that perform their task [16, 46]. Using another approach, De- result in an equivalent execution, despite structural or lex- Guard [11] is a state-of-the-art deobfuscator that builds a ical changes to the code — generating code that looks dif- probabilistic model for identifiers based on the co-occurrence ferent, but behaves similarly. Depending on the intended of names. While this technique can be very fast to apply (af- purpose (e.g., hiding a company’s intellectual property, dis- ter the statistical model is trained), it may be defeated by guising malware, or minimizing code size), a developer may obfuscators that introduce new fields among classes. choose to use a different kind of obfuscator. These obfusca- We present a novel approach for automated obfuscation tions might include lexical transformations, control transfor- resilient search for Android apps, using deep learning: Mac- mations, and data transformations [14]. Obfuscators might neto, which searches at bytecode level, instead of source choose to apply a single sort of transformation, or several. code. Macneto leverages a key observation about obfusca- Lexical transformations are typically employed by “mini- tion: an obfuscator’s goal is to transform how a program mizing” obfuscators (those that aim to reduce the total size looks as radically as possible, while maintaining the original of code). Lexical transformations replace identifiers (such as program semantics. Macneto works by learning lightweight method, class or variable names) with new identifiers. Since (partial) executable semantics through Principal Component obfuscators are applied only to individual apps, they must Analysis (PCA). These PCA models are a proxy for program leave identifiers exposed via public APIs unchanged. behaviors that are stable despite changes to the layout of Control transformations can be significantly more com- code, the structure of its control flow graph, or any metadata plex, perhaps inlining code from several methods into one, about the app (features assumed stable by other deobfusca- splitting methods into several, reordering statements, adding tors). Macneto’s deep PCA model is resilient to multiple jumps and other instructions [31, 41]. Control transforma- obfuscation techniques [18, 44], including identifier renam- tions typically leverage the limitations of static analysis: an ing and control flow modifications. obfuscator might add additional code to a method, with a Macneto uses deep learning to train a classifier on known jump to cause the new code to be ignored at runtime. How- pairs of un-obfuscated/obfuscated apps offline. This train- ever, that jump might be based on some complex heap-stored ing process allows Macneto to be potentially applicable to state which is tricky for a static analysis tool to reason about. various obfuscators: supporting a new obfuscator using the Finally, data transformations might involve encoding data same kinds of obfuscations would only require a new data in an app or changing the kind of structure that it’s stored in. set of pairs of the original un-obfuscated apps and the corre- For instance, an obfuscator might encrypt strings in apps so sponding obfuscated apps. Then, these models are saved for that they can’t be trivially matched, or change data structures. fast, online search where an unknown obfuscated executable For encrypting/decrypting strings, an obfuscator can inject is projected to principal components via deep learning, and additional helper methods into programs [44]. matched to the most similar executables from the known In this paper we define the obfuscation resilient search corpus. problem as follows. A developer/security analyst has access We evaluated Macneto on 1500+ real Android apps us- to a set of obfuscated executables,

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    11 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us