TL;DR
BEACON is a new automated tool that generates "least-privilege" security policies for Docker containers by observing them in action. Unlike previous tools that often miss rare execution paths, BEACON uses "environment-aware" dynamic analysis to stress-test containers under various configurations, resulting in policies that are both more secure and less likely to cause application crashes in production.
What Problem Does This Paper Address?
Containers are the backbone of modern cloud computing, but they have a fundamental security weakness: they share the same host OS kernel. By default, a container can access over 300 system calls (syscalls), even if it only needs a fraction of them. If an attacker breaks into a container, they can exploit vulnerabilities in these unnecessary syscalls to "escape" to the host.
To fix this, we need security policies (like Linux Seccomp and Capabilities) that block everything the container doesn't strictly need. However, creating these policies manually is a nightmare. Existing automated tools fall into two traps:
- Static Analysis: They look at the code and guess what might be needed. This usually results in "over-privileging"—leaving the door too wide open.
- Dynamic Analysis: They watch the container run. But if the container isn't tested under the right conditions (e.g., specific workloads or startup options), the tool misses essential syscalls. When that container hits a "corner case" in production, the security policy blocks a required syscall, and the app crashes.
Methods
BEACON introduces a three-stage pipeline to solve the "under-profiling" problem of dynamic analysis:
- Environment Emulation: Instead of just running a container once, BEACON's Emulation Agent systematically varies Docker command-line options (like
--initor--network) and applies diverse workloads using the YCSB benchmark. - Efficient Heuristics: To avoid the "state explosion" of testing every possible combination of settings, the authors developed a mutation algorithm to explore integer-type options and an inference strategy. They discovered that the syscalls needed for a complex environment can be accurately predicted by taking the union of syscalls observed in simpler, individual configurations.
- eBPF-based Monitoring: BEACON uses eBPF (Extended Berkeley Packet Filter) to trace syscalls and capability checks directly in the kernel with extremely low overhead.
- Intention-Aware Tuning: A Decision Agent assigns a Security Score (based on CVSS scores of known vulnerabilities associated with a syscall) and a Functionality Score (based on how often a syscall was seen across different environments). This allows administrators to choose a policy that balances "maximum security" against "maximum uptime."
Datasets
The researchers evaluated BEACON using:
- 167 official Docker images from Docker Hub, spanning categories like databases, web servers, and networking tools.
- YCSB (Yahoo! Cloud Serving Benchmark) to generate realistic traffic for database-style containers.
- A vulnerability database mapping 45 known Linux kernel CVEs to specific syscalls and capabilities to test mitigation effectiveness.
Key Insights and Ideas
- The Environment Gap: The authors found that simply changing Docker options can reveal 11% more required syscalls, while varying workloads reveals 22% more. This proves that "one-and-done" profiling is insufficient for container security.
- Capabilities Matter: Most prior research focused only on syscalls. BEACON includes Linux Capabilities (fine-grained root privileges), which is crucial for blocking attacks like the "Raw-socket" vulnerability (CVE-2020-14386) that syscall filtering alone cannot stop.
- Tunable Security: Security isn't one-size-fits-all. By using CVSS data, BEACON lets a bank choose a "high-security" profile that blocks risky syscalls, while a dev-ops team might choose a "high-functionality" profile to ensure their experimental app never crashes.
Key Results
- Better Protection: BEACON mitigated 85.3% of tested kernel vulnerabilities on average, significantly outperforming Confine (a state-of-the-art static analysis tool), which only managed 58.6%.
- Robustness: In 80% of tested containers, BEACON's policies were significantly tighter (averaging 100+ fewer allowed syscalls) than static analysis, yet they didn't cause the functional failures common in traditional dynamic analysis.
- Real-world Success: In case studies, BEACON successfully blocked the famous Dirty CoW exploit and kernel panic attacks by identifying that the
madvisesyscall andCAP_NET_RAWcapability were not required for the containers' normal operations. - Low Overhead: The eBPF monitoring agent only caused a 5.6% throughput reduction, making it practical for use in staging or even production profiling.
Limitations and Future Work
- Workload Quality: BEACON is only as good as the workloads provided to it. While YCSB covers many cases, highly custom or proprietary applications might still require manually crafted test suites to ensure full coverage.
- Syscall Parameters: Currently, BEACON filters based on the type of syscall, not its arguments (e.g., it can allow
open, but it doesn't restrict which specific files can be opened). The authors suggest integrating with Linux Security Modules (LSMs) like AppArmor or SELinux for this deeper level of control. - Zero-Day Vulnerabilities: Because the Security Score relies on CVSS data for known vulnerabilities, it cannot perfectly quantify the risk of unknown "zero-day" exploits, though it still improves security by reducing the overall attack surface.
Summary updated