Skip to main content
Article
Context-sensitive analysis without calling-context
Higher-Order and Symbolic Computation archive (2010)
  • Arun Lakhotia, University of Louisiana at Lafayette
  • Davidson R. Boccardo, Inmetro--National Institute of Metrology, Quality and Technology, Rio de Janeiro, Brazil#TAB#
  • Anshuman Singh, University of Louisiana at Lafayette
  • Aleardo Manacero, Sao Paulo State University
Abstract
Since Sharir and Pnueli, algorithms for context-sensitivity have been defined in terms of ‘valid’ paths in an interprocedural flow graph. The definition of valid paths requires atomic call and ret statements, and encapsulated procedures. Thus, the resulting algorithms are not directly applicable when behavior similar to call and ret instructions may be realized using non-atomic statements, or when procedures do not have rigid boundaries, such as with programs in low level languages like assembly or RTL.

We present a framework for context-sensitive analysis that requires neither atomic call and ret instructions, nor encapsulated procedures. The framework presented decouples the transfer of control semantics and the context manipulation semantics of statements. A new definition of context-sensitivity, called stack contexts, is developed. A stack context, which is defined using trace semantics, is more general than Sharir and Pnueli’s interprocedural path based calling-context. An abstract interpretation based framework is developed to reason about stack-contexts and to derive analogues of calling-context based algorithms using stack-context.

The framework presented is suitable for deriving algorithms for analyzing binary programs, such as malware, that employ obfuscations with the deliberate intent of defeating automated analysis. The framework is used to create a context-sensitive version of Venable et al.’s algorithm for analyzing x86 binaries without requiring that a binary conforms to a standard compilation model for maintaining procedures, calls, and returns. Experimental results show that a context-sensitive analysis using stack-context performs just as well for programs where the use of Sharir and Pnueli’s calling-context produces correct approximations. However, if those programs are transformed to use call obfuscations, a context-sensitive analysis using stack-context still provides the same, correct results and without any additional overhead.
Publication Date
September 1, 2010
DOI
10.1007/s10990-011-9080-1
Citation Information
Arun Lakhotia, Davidson R. Boccardo, Anshuman Singh and Aleardo Manacero. "Context-sensitive analysis without calling-context" Higher-Order and Symbolic Computation archive Vol. 23 Iss. 3 (2010) p. 275 - 313
Available at: http://works.bepress.com/anshuman-singh/11/