TL;DR
The "Build It, Break It, Fix It" (BIBIFI) contest is a novel security competition that shifts the focus from just breaking systems to building them securely from the start. By analyzing data from three contests involving 116 teams, the authors provide empirical evidence that while C/C++ leads to high performance, it significantly increases security risks—primarily due to memory safety issues—whereas teams with diverse programming language knowledge produce more resilient code.
What Problem Does This Paper Address?
Traditional cybersecurity contests, like Capture The Flag (CTF), primarily reward "breaking" skills—finding and exploiting vulnerabilities. Conversely, standard programming contests focus on correctness and performance while ignoring security. This creates a gap: we lack a rigorous way to evaluate and incentivize the ability to build secure systems.
The authors argue that security must be a first-order design goal, not an afterthought. BIBIFI addresses this by creating a competition framework that forces developers to balance the competing demands of correctness, performance, and security, providing a "quasi-controlled experiment" to study which development practices actually lead to more secure software.
Methods
The BIBIFI contest is structured into three distinct phases:
- Build-it: Teams implement a software specification (e.g., a secure log or an ATM system). They are scored on a "Ship Score" based on correctness and performance.
- Break-it: Teams receive the source code of other submissions and attempt to find bugs. They earn points for identifying correctness flaws, crashes, or security property violations (privacy/integrity).
- Fix-it: Builders are given the bug reports and can submit fixes. This phase helps identify "morally identical" bugs (multiple test cases for one flaw) and allows builders to regain some lost points.
The infrastructure is highly automated to ensure scalability. As shown in Figure 1, it uses a Haskell-based web frontend and a backend that spins up isolated Amazon EC2 instances to build and test submissions against an "oracle" (a reference implementation).
Datasets
The study analyzes data from three contests held in 2015:
- Spring 2015: 68 teams (mostly MOOC students) tasked with building a Secure Log system.
- Fall 2015: Two simultaneous contests (one for MOOC students, one for US university students) tasked with a Secure ATM/Bank simulation.
The dataset includes 116 teams, their source code (spanning various languages), Git commit histories, and demographic surveys.
Key Insights and Ideas
- The C/C++ Double-Edged Sword: C/C++ teams consistently achieved the highest performance scores but were the most vulnerable. Interestingly, the authors found that the increased insecurity of C/C++ was almost entirely due to memory-safety bugs. When crashes were excluded, C/C++ was no more "insecure" than other languages.
- The Value of Polyglots: Teams that collectively knew more programming languages produced more secure code, even if they didn't use those languages for the contest. This suggests that broad programming experience is a strong proxy for security-mindedness.
- Good Builders make Great Breakers: There was a significant correlation between success in the Build-it phase and success in the Break-it phase. Those who understood how to construct a secure system were much better at finding the subtle semantic flaws in others' designs.
- Library Choice is Critical: Qualitative analysis showed that "Success Stories" often involved using high-level cryptographic libraries with few "knobs" (like NaCl or SSL PKI), whereas "Failure Stories" often involved teams trying to implement their own crypto or using low-level APIs incorrectly.
Key Results
- Language Impact: Statically-typed, memory-safe languages (like Java or Go) were 8.5x less likely to have a discovered security bug compared to C/C++.
- Code Size: Shorter programs correlated with better scores. Each additional line of code was associated with a slight drop in the "ship score," likely because more code provides a larger attack surface and more opportunities for error.
- Language Distribution: As seen in Figure 2, Python was the most popular choice, but the contest saw a wide variety of languages, including Go, Java, and even OCaml.
- Contest Difficulty: The ATM problem (Fall 2015) was significantly harder to secure than the Log problem (Spring 2015). Fall 2015 implementations were 296x more likely to have a discovered security bug, largely because the Man-in-the-Middle (MITM) attack surface allowed for more complex interactive exploits.
Limitations and Future Work
The authors identify several areas for improvement:
- Incentivizing Fixes: Many teams opted out of the Fix-it phase if they felt they were out of the running for prizes, which makes "Resilience Score" a noisy metric for code quality.
- Manual Effort: While mostly automated, judging whether a fix is "atomic" (addressing only one conceptual bug) still requires manual effort from organizers.
- Baseline Comparison: The study doesn't compare contest participants against professional security researchers or automated tools (like static analyzers), which would provide a useful baseline for "total bugs available."
Future work involves releasing the BIBIFI infrastructure as an open-source platform to enable more focused studies on secure programming methodologies.
Summary updated