Chaff Bugs: Deterring Attackers by Making Software Buggier

Zhenghao Hu, Yu Hu, Brendan Dolan-GavittarXiv 2018

Abstract

Traditional software security focuses on the elimination of vulnerabilities or the mitigation of their exploitation. This paper proposes a paradigm shift toward deceptive defense through "chaff bugs"—intentionally injected, provably non-exploitable memory safety errors. By flooding software with thousands of these fake vulnerabilities, defenders can drastically increase the economic cost of an attack by overwhelming the triage and exploit development phases of the attack lifecycle.

Introduction

The current landscape of software security is an arms race where defenders attempt to find and patch every bug, while attackers only need to find one exploitable flaw. Traditional defenses like static analysis, fuzzing, Address Space Layout Randomization (ASLR), and Control Flow Integrity (CFI) aim to reduce the attack surface or increase the difficulty of exploitation. However, sophisticated adversaries continue to bypass these measures.

The Chaff Bug workflow: flooding the triage phase with non-exploitable bugs to waste attacker resources.

This research addresses the problem of attacker economics. Finding a crash is merely the beginning for an attacker; they must then determine if the crash is exploitable (triage) and develop a reliable exploit. By injecting a vast number of non-exploitable "chaff" bugs, defenders can force attackers to waste significant time and resources investigating dead-ends.

Methodology: Engineering Non-Exploitable Bugs

The authors developed a system based on LAVA to inject memory safety errors—specifically stack and heap buffer overflows—that are mathematically guaranteed to be non-exploitable. Two primary strategies are employed to ensure safety:

  1. Unused Variable Overwrites: The system identifies or injects dummy local variables that are never used by the program's logic. Buffer overflows are then engineered to overwrite these variables while leaving critical control-flow data, such as return addresses or frame pointers, untouched.
  2. Overconstrained Values: The attacker-controlled input used for the overwrite is subjected to constraints along its execution path. These constraints ensure the input can only take on "safe" values (e.g., 0). While overwriting a pointer with zero will cause a crash, it prevents the attacker from redirecting execution to arbitrary code.
Implementation of non-exploitable stack overflows via unused variables and overconstrained values.

To maximize deception, the system obfuscates these constraints across multiple functions and adds fake data flows to make unused variables appear legitimate to automated analysis tools.

Experimental Evaluation

The system was evaluated on three widely used C/C++ projects: the nginx web server, the file utility, and the libFLAC audio library.

Scale and Performance

The injection process successfully generated tens of thousands of validated chaff bugs. For example, over 45,000 bugs were injected into file and over 5,000 into nginx. Performance testing on nginx showed that adding 2,000 bugs resulted in a manageable ~15% overhead under concurrent load, a cost that could be further mitigated through compiler optimizations.

Deception Effectiveness

The effectiveness of the deception was tested using the American Fuzzy Lop (AFL) fuzzer and the gdb exploitable triage tool. AFL successfully discovered the chaff bugs, producing hundreds of unique crashes (e.g., 1,275 in libFLAC). Most significantly, the gdb exploitable plugin classified 100% of the evaluated chaff bugs as either EXPLOITABLE or PROBABLY_EXPLOITABLE. This indicates that current automated triage tools, which are designed to be conservative, are easily fooled by chaff bugs, forcing attackers into a tedious manual verification process.

Discussion and Limitations

While promising, the current implementation of chaff bugs has limitations. Savvy attackers might eventually identify artifacts, such as specific "magic values" used to trigger the bugs, to filter them out. Additionally, the current prototype requires source code access and is limited to stack and heap overflows.

Future work will focus on making chaff bugs blend more naturally into existing codebases, expanding the variety of injected vulnerabilities (e.g., use-after-free), and developing binary-level injection techniques for legacy software.

Conclusion

Chaff bugs represent a novel approach to software defense that leverages deception to disrupt attacker economics. By weaponizing the inherent unsafety of C/C++ code, defenders can transform a program's bugs from a liability into a deterrent, overwhelming the triage capabilities of even sophisticated adversaries.

Summary updated

BibTeX
@misc{hu2018chaff,
  author = {Zhenghao Hu and Yu Hu and Brendan Dolan-Gavitt},
  title = {{Chaff Bugs: Deterring Attackers by Making Software Buggier}},
  year = {2018},
  eprint = {1808.00659},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1808.00659},
}
Figure