Lune

S&P2017Top-tier venue

Cryptographic Function Detection in Obfuscated Binaries via Bit-Precise Symbolic Loop Mapping

Dongpeng Xu, Jiang Ming, Dinghao Wu

Abstract

Cryptographic functions have been commonly abused by malware developers to hide malicious behaviors, disguise destructive payloads, and bypass network-based firewalls. Now-infamous crypto-ransomware even encrypts victim's computer documents until a ransom is paid. Therefore, detecting cryptographic functions in binary code is an appealing approach to complement existing malware defense and forensics. However, pervasive control and data obfuscation schemes make cryptographic function identification a challenging work. Existing detection methods are either brittle to work on obfuscated binaries or ad hoc in that they can only identify specific cryptographic functions. In this paper, we propose a novel technique called bit-precise symbolic loop mapping to identify cryptographic functions in obfuscated binary code. Our trace-based approach captures the semantics of possible cryptographic algorithms with bit-precise symbolic execution in a loop. Then we perform guided fuzzing to efficiently match boolean formulas with known reference implementations. We have developed a prototype called CryptoHunt and evaluated it with a set of obfuscated synthetic examples, well-known cryptographic libraries, and malware. Compared with the existing tools, CryptoHunt is a general approach to detecting commonly used cryptographic functions such as TEA, AES, RC4, MD5, and RSA under different control and data obfuscation scheme combinations.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

14 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Unleashing the hidden power of compiler optimization on binary code difference: an empirical study cites BinSim: Trace-based Semantic Binary Diffing via System Call Sliced Segment Equivalence Checking
  • VMHunt: A Verifiable Approach to Partially-Virtualized Binary Code Simplification cites BinSim: Trace-based Semantic Binary Diffing via System Call Sliced Segment Equivalence Checking
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers14

  1. BinSim: Trace-based Semantic Binary Diffing via System Call Sliced Segment Equivalence CheckingJiang Ming, Dongpeng Xu, Yufei Jiang, Dinghao WuUSENIX Security 2017 · 118 citations
  2. FlashGuard: Leveraging Intrinsic Flash Properties to Defend Against Encryption RansomwareJian Huang, Jun Xu, Xinyu Xing, Peng Liu et al.CCS 2017 · 94 citations
  3. VMHunt: A Verifiable Approach to Partially-Virtualized Binary Code SimplificationDongpeng Xu, Jiang Ming, Yu Fu, Dinghao WuCCS 2018 · 60 citations
  4. Unleashing the hidden power of compiler optimization on binary code difference: an empirical studyXiaolei Ren, Michael Ho, Jiang Ming, Yu Lei et al.PLDI 2021 · 57 citations
  5. K-Hunt: Pinpointing Insecure Cryptographic Keys from Execution TracesJuanru Li, Zhiqiang Lin, Juan Caballero, Yuanyuan Zhang et al.CCS 2018 · 42 citations

Related papers

  1. Where's Crypto?: Automated Identification and Classification of Proprietary Cryptographic Primitives in Binary CodeCarlo Meijer, Veelasha Moonsamy, Jos WetzelsUSENIX Security 2021 · 26 citations
  2. CacheD: Identifying Cache-Based Timing Channels in Production SoftwareShuai Wang, Pei Wang, Xiao Liu, Danfeng Zhang et al.USENIX Security 2017 · 130 citations
  3. HAWKEYE - Recovering Symmetric Cryptography From Hardware CircuitsGregor Leander, Christof Paar, Julian Speith, Lukas StennesCRYPTO 2024 · 1 citation
  4. Limits of I/O Based Ransomware Detection: An Imitation Based AttackChijin Zhou, Lihua Guo, Yiwei Hou, Zhenya Ma et al.S&P 2023
  5. Binary Cryptographic Function Identification via Similarity Analysis with Path-Insensitive EmulationYikun Hu, Yituo He, Wenyu He, Haoran Li et al.OOPSLA 2025 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines