Cornucopia: A Framework for Feedback Guided Generation of Binaries

Vidush Singhal, Akul Abhilash Pillai, Charitha Saumya, Milind Kulkarni, Aravind Machiry
9/14/2022
cs.SE

Official code: vidsinghal/Cornucopia (7 stars, MIT, last commit 2023-12-03).

Abstract

Binary analysis is an important capability required for many security and software engineering applications. Consequently, there are many binary analysis techniques and tools with varied capabilities.

Show full abstract

However, testing these tools requires a large, varied binary dataset with corresponding source-level information. In this paper, we present Cornucopia, an architecture agnostic automated framework that can generate a plethora of binaries from corresponding program source by exploiting compiler optimizations and feedback-guided learning. Our evaluation shows that Cornucopia was able to generate 309K binaries across four architectures (x86, x64, ARM, MIPS) with an average of 403 binaries for each program and outperforms Bintuner, a similar technique. Our experiments revealed issues with the LLVM optimization scheduler resulting in compiler crashes ($\sim$300). Our evaluation of four popular binary analysis tools Angr, Ghidra, Idapro, and Radare, using Cornucopia generated binaries, revealed various issues with these tools. Specifically, we found 263 crashes in Angr and one memory corruption issue in Idapro. Our differential testing on the analysis results revealed various semantic bugs in these tools. We also tested machine learning tools, Asmvec, Safe, and Debin, that claim to capture binary semantics and show that they perform poorly (For instance, Debin F1 score dropped to 12.9% from reported 63.1%) on Cornucopia generated binaries. In summary, our exhaustive evaluation shows that Cornucopia is an effective mechanism to generate binaries for testing binary analysis techniques effectively.

View on arXivView PDF

Code Implementations(1)

MIT

A Framework for Feedback Guided Generation of Binaries

71May 5, 20222 years agoMIT

Similar Papers

Cite this paper

@article{singhal2022cornucopia,
  title  = {Cornucopia: A Framework for Feedback Guided Generation of Binaries},
  author = {Vidush Singhal and Akul Abhilash Pillai and Charitha Saumya and Milind Kulkarni and Aravind Machiry},
  year   = {2022},
  eprint = {2209.06694},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2209.06694}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2209.06694.svg)](https://codeofpaper.com/paper/2209.06694)

Discussion