论文标题

状态的灰盒模糊

Stateful Greybox Fuzzing

论文作者

Ba, Jinsheng, Böhme, Marcel, Mirzamomen, Zahra, Roychoudhury, Abhik

论文摘要

许多协议实现是反应性系统,其中协议过程与其他过程和环境不断互动。如果仅在某个状态下暴露错误,则模糊器需要提供特定的事件序列,因为输入将在显示错误之前将协议纳入该状态。我们将这些错误称为“状态”错误。通常,当我们测试协议实施时,我们没有详细的正式规范要依靠的协议。在不了解协议的情况下,模糊不清就很难发现这种状态的错误。然后,一个关键的挑战是覆盖状态空间,而无需明确规定协议。 在这项工作中,我们认为,可以避免用于状态协议模糊的状态识别的手动注释。具体来说,我们依靠一个程序化直觉,该计划中的状态变量通常出现在枚举类型变量中,其值(状态名称)来自命名常数。在我们对前50名最广泛使用的开源协议实现的分析中,我们发现每个实现都使用分配的状态变量,这些变量被分配为命名常数(易于理解的名称,例如INIT,准备就绪)来表示当前状态。在这项工作中,我们建议自动识别此类状态变量,并在模糊过程中跟踪分配给它们的值的顺序,以产生探索状态空间的“映射”。 我们的实验证实,我们的状态杂物发现了状态错误的速度是我们扩展的基线灰盒杂物的两倍。从初始状态开始,我们的fuzzer练习一个数量级的状态/过渡序列,并涵盖代码的速度是基线爆炸器的两倍。我们的Fuzzer发现了突出的协议实现中的几个零日错误,并分配了8个CVE。

Many protocol implementations are reactive systems, where the protocol process is in continuous interaction with other processes and the environment. If a bug can be exposed only in a certain state, a fuzzer needs to provide a specific sequence of events as inputs that would take protocol into this state before the bug is manifested. We call these bugs as "stateful" bugs. Usually, when we are testing a protocol implementation, we do not have a detailed formal specification of the protocol to rely upon. Without knowledge of the protocol, it is inherently difficult for a fuzzer to discover such stateful bugs. A key challenge then is to cover the state space without an explicit specification of the protocol. In this work, we posit that manual annotations for state identification can be avoided for stateful protocol fuzzing. Specifically, we rely on a programmatic intuition that the state variables used in protocol implementations often appear in enum type variables whose values (the state names) come from named constants. In our analysis of the Top-50 most widely used open-source protocol implementations, we found that every implementation uses state variables that are assigned named constants (with easy to comprehend names such as INIT, READY) to represent the current state. In this work, we propose to automatically identify such state variables and track the sequence of values assigned to them during fuzzing to produce a "map" of the explored state space. Our experiments confirm that our stateful fuzzer discovers stateful bugs twice as fast as the baseline greybox fuzzer that we extended. Starting from the initial state, our fuzzer exercises one order of magnitude more state/transition sequences and covers code two times faster than the baseline fuzzer. Several zero-day bugs in prominent protocol implementations were found by our fuzzer, and 8 CVEs have been assigned.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源