skip to main content
10.1145/2556464.2556465acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
tutorial

Recovering C++ Objects From Binaries Using Inter-Procedural Data-Flow Analysis

Published:22 January 2014Publication History

ABSTRACT

Object-oriented programming complicates the already difficult task of reverse engineering software, and is being used increasingly by malware authors. Unlike traditional procedural-style code, reverse engineers must understand the complex interactions between object-oriented methods and the shared data structures with which they operate on, a tedious manual process.

In this paper, we present a static approach that uses symbolic execution and inter-procedural data flow analysis to discover object instances, data members, and methods of a common class. The key idea behind our work is to track the propagation and usage of a unique object instance reference, called a this pointer. Our goal is to help malware reverse engineers to understand how classes are laid out and to identify their methods. We have implemented our approach in a tool called ObJDIGGER, which produced encouraging results when validated on real-world malware samples.

References

  1. Aris Adamantiadis. Reversing C++ programs with IDA pro and and Hey-rays. http://blog.0xbadc0de.be/archives/67.Google ScholarGoogle Scholar
  2. Gogul Balakrishnan and Thomas Reps. Divine: discovering variables in executables. In Proceedings of the 8th international conference on Verification, model checking, and abstract interpretation, VMCAI'07, pages 1--28, Berlin, Heidelberg, 2007. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy. Iterative data-flow analysis, revisited. Technical report, Rice University, 2004.Google ScholarGoogle Scholar
  4. David Dewey and Jonathon T. Giffin. Static detection of C++ vtable escape vulnerabilities in binary code. In Proceedings of the 19th Annual Network and Distributed System Security Symposium, NDSS'12, http://www.internetsociety.org/static-detection-c-vtable-escape-vulnerabilitiesbinary-code, 2012.Google ScholarGoogle Scholar
  5. Agner Fog, Technical University of Denmark. Calling conventions for different C++ compilers and operating systems. http://www.agner.org/optimize/calling_conventions.pdf, pages 16--17, Last Updated 04-09-2013.Google ScholarGoogle Scholar
  6. Alexander Fokin, Katerina Troshina, and Alexander Chernov. Reconstruction of Class Hierarchies for Decompilation of C++ Programs. In Proceedings of the 14th European Conference on Software Maintenance and Reengineering (CSMR'10), IEEE, pages 240--243, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Alexander Fokin, Egor Derevenetc, Alexander Chernov, and Katerina Troshina. SmartDec: Approaching C++ Decompilation. In Proceedings of the 18th Working Conference on Reverse Engineering, WCRE'11, pages 347--356, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Jan Gray. C++: Under the Hood. http://www.openrce.org/articles/files/jangrayhood.pdf, 1994.Google ScholarGoogle Scholar
  9. S. Horwitz, T. Reps, and D. Binkley. Interprocedural Slicing Using Dependence Graphs. In Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language Design and Implementation (PLDI'88), pages 35--46, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Harold Johnson. Data flow analysis for `intractable' system software. In SIGPLAN Symposium on Compiler Construction, pages 109--117, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. James C. King. Symbolic Execution and Program Testing. Communications of the ACM (CACM), 19(7), July 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Ákos Kiss, Judit Jász, and Tibor Gyimóthy. Using dynamic information in the interprocedural static slicing of binary executables. Software Quality Control, 13(3):227--245, September 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. JongHyup Lee, Thanassis Avgerinos, and David Brumley. Tie: Principled reverse engineering of types in binary programs. In NDSS. The Internet Society, 2011.Google ScholarGoogle Scholar
  14. Z. Lin, X. Zhang, and D. Xu. Automatic Reverse Engineering of Data Structures from Binary Execution. In Proceedings of the Network and Distributed System Security Symposium (NDSS'2010), March 2010.Google ScholarGoogle Scholar
  15. Dan Quinlan. ROSE: Compiler support for object-oriented frameworks. In Parallel Processing Letters 10, no. 02n03, pages 215--226. 2000.Google ScholarGoogle Scholar
  16. G. Ramalingam, John Field, and Frank Tip. Aggregate structure identification and its application to program analysis. In Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, POPL '99, pages 119--132, New York, NY, USA, 1999. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. ROSE website. http://www.rosecompiler.org.Google ScholarGoogle Scholar
  18. Paul Vincent Sabanal and Mark Vincent Yason. Reversing C++. http://www.blackhat.com/presentations/bh-dc-07/Sabanal_Yason/Paper/bh-\dc-07-Sabanal_Yason-WP.pdf.Google ScholarGoogle Scholar
  19. Asia Slowinska, Traian Stancescu, and Herbert Bos. Dde: dynamic data structure excavation. In Proceedings of the first ACM asia-pacific workshop on Workshop on systems, APSys '10, pages 13--18, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. V.K. Srinivasan and T. Reps. Software Architecture Recovery from Machine Code. Technical Report TR1781, University of Wisconsin - Madison, March 2013. http://digital.library.wisc.edu/1793/65091.Google ScholarGoogle Scholar
  21. Jens Tröger, and Cristina Cifuentes. Analysis of Virtual Method Invocation for Binary Translation. In Proceedings of the 9th Working Conference on Reverse Engineering (WCRE '02), IEEE Computer Society, pages 65--, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Recovering C++ Objects From Binaries Using Inter-Procedural Data-Flow Analysis

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Conferences
              PPREW'14: Proceedings of ACM SIGPLAN on Program Protection and Reverse Engineering Workshop 2014
              January 2014
              69 pages
              ISBN:9781450326490
              DOI:10.1145/2556464

              Copyright © 2014 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with 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 permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 22 January 2014

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • tutorial
              • Research
              • Refereed limited

              Acceptance Rates

              PPREW'14 Paper Acceptance Rate6of10submissions,60%Overall Acceptance Rate21of36submissions,58%

              Upcoming Conference

              POPL '25

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader