Towards Practical Reactive Security Audit Using Extended Static Checkers

Julien Vanegue, Shuvendu K. LahiriIEEE Symposium on Security and Privacy 2013 · DOI

Abstract

This paper describes our experience of performing reactive security audit of known security vulnerabilities in core operating system and browser COM components, using an extended static checker HAVOCLITE. We describe the extensions made to the tool to be applicable on such large C++ components, along with our experience of using an extended static checker in the large. We argue that the use of such checkers as a configurable static analysis in the hands of security auditors can be an effective tool for finding variations of known vulnerabilities. The effort has led to finding and fixing around 70 previously unknown security vulnerabilities in over 10 millions lines operating system and browser code.

Introduction

In modern software development, security vulnerabilities such as buffer overflows or use-after-free errors are rarely isolated incidents. Often, a single discovered bug is a symptom of a broader pattern; similar "variants" frequently exist across a codebase due to code reuse or shared logic errors. The industry standard for identifying these variants—reactive security auditing—typically relies on manual code review, fuzzing, and ad-hoc scripting. While these methods are valuable, they often struggle with scale or precision.

Formal verification offers the precision needed but is traditionally too heavyweight for industrial-scale codebases comprising millions of lines of complex C++. This research introduces HAVOC-LITE, an extended static checker designed to bridge this gap. By focusing on property-specific audits rather than whole-system correctness, HAVOC-LITE provides a pragmatic yet formal approach to finding security vulnerabilities in production-grade software.

Methodology

HAVOC-LITE is an evolution of the HAVOC static analysis tool, specifically tailored for large-scale C++ and COM (Component Object Model) components. The tool's architecture is built upon several technical pillars designed to balance precision with scalability.

Architecture and Workflow

The core workflow involves translating C++ code into BoogiePL, an intermediate verification language. This allows the use of the Boogie verifier and the Z3 SMT solver to check security assertions across all execution paths. A critical component of this process is the Two-Level Houdini algorithm for contract inference. Because manually writing pre- and post-conditions for thousands of functions is infeasible, this algorithm automatically infers properties that hold across function boundaries.

The HAVOC-LITE architecture for reactive security auditing.

As shown in the architecture diagram, the system takes source code and property templates as input. The Houdini inference engine and modular checker work in tandem, guided by concrete program semantics, to produce inferred annotations and warnings for review. This creates a feedback loop where auditors can refine annotations based on warning reviews to improve the analysis.

Modeling and Precision

To handle real-world Windows and Internet Explorer code, HAVOC-LITE models complex C++ features including virtual method calls, inheritance offsets, and bit-level manipulations of VARIANT structures. The researchers found that bit-precision was essential; using bit-vector theory in the SMT solver allowed the tool to identify vulnerabilities in bitwise operations that simpler integer models would miss.

Furthermore, the tool adopts a philosophy of pragmatic unsoundness. By making optimistic assumptions (such as "field safety") to reduce false positives, the tool remains useful for human auditors who must triage results in a fast-paced environment.

Evaluation and Results

The tool was evaluated against over 10 million lines of code from Microsoft Windows and Internet Explorer. The analysis covered massive modules with hundreds of thousands of procedures.

The results demonstrate the effectiveness of the approach:

  • Vulnerability Discovery: The audit led to the discovery and fixing of approximately 70 new security vulnerabilities.
  • Audit Efficiency: Security experts were able to review between 25 and 50 warnings per day, a manageable rate for industrial security teams.
  • Performance: Checking 6.5 million lines for VARIANT type safety took roughly 5 hours of computation, with an additional 11 hours for deep inter-procedural inference.
  • Impact of Inference: Inter-procedural analysis reduced false-positive "noise" by 10% to 45%, significantly increasing the signal-to-noise ratio for auditors.

Conclusion and Future Work

HAVOC-LITE demonstrates that extended static checkers can be successfully deployed for reactive security audits at an industrial scale. By allowing auditors to write non-intrusive specifications and focusing on specific bug patterns, the tool acts as a force multiplier for security teams.

Future work will focus on addressing current limitations, such as the sequential nature of the inter-procedural inference. Developing a distributed version of the Houdini algorithm could further decrease analysis time. Additionally, implementing automated warning prioritization based on confidence scores would help auditors focus their efforts on the most critical potential vulnerabilities first.

Summary updated

BibTeX
@inproceedings{vanegue2013towards,
  author = {Julien Vanegue and Shuvendu K. Lahiri},
  title = {{Towards Practical Reactive Security Audit Using Extended Static Checkers}},
  booktitle = {IEEE Symposium on Security and Privacy},
  year = {2013},
  doi = {10.1109/sp.2013.12},
}
Figure