eBPF-PATROL: Protective Agent for Threat Recognition and Overreach Limitation using exteneded Berkeley Packet Filter (eBPF) in Containerized and Virtualized Environments
Sangam Ghimire 1 , Nirjal Bhurtel 2 , Roshan Sahani 3 , Sudan Jha 4 · 2025
Read eBPF-PATROL: Protective Agent for Threat Recognition and Overreach Limitation using exteneded Berkeley Packet Filter (eBPF) in Containerized and Virtualized Environments by Sangam Ghimire 1 , Nirjal Bhurtel 2 , Roshan Sahani 3 , Sudan Jha 4 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2511-18155.txt.
Introduction
Sangam Ghimire and three co-authors present a runtime security agent for containers and virtual machines, built on a Linux technology that safely runs small programs inside the kernel. Existing tools such as syscall filters and access control frameworks lack context, argument filtering, and the ability to adapt decisions at run time.
Their agent intercepts system calls, analyzes the execution context, and applies user defined rules to stop boundary violations such as reverse shells, privilege escalation, and container escapes in real time. Evaluation shows low overhead, under a few percent, and high detection accuracy across real world attack scenarios.
Catalog record
| CREATOR | Sangam Ghimire 1 , Nirjal Bhurtel 2 , Roshan Sahani 3 , Sudan Jha 4 |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 28 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2511-18155
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
eBPF-PATROL: Protective Agent for Threat Recognition and Overreach Limitation using exteneded Berkeley Packet Filter (eBPF) in Containerized and Virtualized Environments Sangam Ghimire 1 , Nirjal Bhurtel 2 , Roshan Sahani 3 , Sudan Jha 4 Abstract With the increasing use and adoption of cloud and cloud-native computing, the underlying technologies,(i.e containerization and virtualization) have become foundational. However, strict isolation and maintaining runtime security in those environments has become increasingly challenging. Existing approaches like seccomp and Mandatory Access Control (MAC) frameworks offer some protection upto a limit, but often lacks context-awareness, syscall argument filtering, and adaptive enforcement, providing the ability to adjust it’s descision at runtime based on observed application behaviour, workload changes, or detect anomalies rather than relying solely on static/predefined rule. Our paper introduces eBPF-PATROL (eBPF-Protective Agent for Threat Recognition and Overreach Limitation), an extensible lightweight runtime security agent that uses extended Berkeley Packet Filter (eBPF) technology to monitor and enforce policies in containerized and virtualized environments. By intercepting system calls, analyzing execution context, and applying user-defined rules, eBPF-Protective Agent for Threat Recognition and Overreach Limitation (eBPF-PATROL) detects and prevents real-time boundary violations, such as reverse shells, privilege escalation, and container escape attempts. We describe the architecture, implementation, and evaluation of eBPF-PATROL , demonstrating its low overhead (<2.5%) and high detection accuracy across real-world attack scenarios. I Introduction With the wide adoption of cloud-native computing, virtualization and containerization has proved to be cornerstone for scalable, portable, and efficient software deployment. Containerization allows multiple isolated enviroment at user-space level to share a single kernel, which helps optimize resource utilization across microservices and distributed system applications. Generally, these environments interact with the underlying kernel through system calls, I/O and networking. Although the shared-kernel model provides flexibility, it introduces significant attack surface. Compromized malicious conatainerized workload can exploit the legitimate system interfaces to launch a variety of attacks, that includes privilege escalation, lateral movement across containers, or unauthorized access to resources. Similarly, in virtualized systems hypervisor escape and inter- Virtual Machine (VM) attack poses similar risks. Generally, techniques such as syscall tampering, namespace escapes, misuse of Linux capabilities, and manipulation of unguarded kernel APIs are used by intruders for unauthorized actions. These risks can be mitigated up to a level using traditional mechanisms like seccomp (secure computing mode) that restricts the syscalls available to containerized processes. But, techniques like seccomp is limited in scope. It filters only syscall numbers without understanding their context or arguments. This limitation allows sophisticated attacks to bypass these filters. For example, CVE-2022-0185 (a heap overflow in fsconfig() ) and CVE-2022-0847 (Dirty Pipe) exploited syscalls permitted by default seccomp profiles, enabling container breakouts and unauthorized file modifications. Additionally, seccomp does not inspect syscall arguments. The action open("/etc/shadow") is inseperable from open("/tmp/file") if open() is allowed, even though the former exposes highly sensitive data. Such semantic blindness can be used by attackers to access privileged resources. Also, seccomp is not designed to handle side-channel attacks, Linux capability abuse (e.g., CAP_SYS_ADMIN , CAP_NET_RAW ), or logic flaws in userspace code, which leavs many such critical paths unprotected. These challenges can be addressed using Extended Berkeley Packet Filter ( eBPF ). It has emerged as a powerful technology for safe, dynamic introspection and enforcement within the Linux kernel. It acts as a programmable middleware layer and enables real time observability and policy enforcement at multiple kernel entry points without requiring kernel modifications or high performance overhead. It’s safety model ensures that the programs are verified and sandboxed prior to execution which makes it ideal for production security tools. In this paper, we propose eBPF-PATROL , which is a lightweight eBPF-based runtime security agent designed to detect and limit malicious behaviors in containerized and virtualized environments. We present our proposed architecture, implementation, and evaluation of our system, highlighting its capabilities for precise monitoring, real-time threat detection, and adaptive policy enforcement. Our work highlights how eBPF can bridge the gap between static policy enforcement and adaptive runtime defense, which enables proactive, context-aware protection for modern cloud and virtualization stacks. II Related Work Modern virtualization and containerization technologies provide lightweight process isolation by leveraging user-space separation and namespace-based control mechanisms. Containers and virtual machines operate primarily in user mode [ 18 ] , where system libraries (such as the GNU C Library) and runtime environments execute on behalf of the application environments [ 5 ] . Although user-space isolation provides an additional degree to process separation, it is often referred to as soft isolation sufficient from a user perspective but inadequate in the presence of kernel vulnerabilities [ 17 ] . As containerized workloads share the same kernel, any vulnerability that can be triggered via system calls such as memory corruption, type confusion and heap overflows can potentially compromise the host or other co-resident containers [ 16 ] which highlights the pressing need for stronger runtime enforcement mechanisms that essential to maintain robust isolation guarantees in multi-tenant environments. There are ongoing research efforts and existing open-source tools that have sought to improve isolation and threat detection in such systems, focusing on either enhancing user-space constraints or deploying runtime monitoring in the kernel. II-A User-Space Isolation and Access Control One traditional line of work focuses on tightening user-space control using Mandatory Access Control (MAC) frameworks such as AppArmor, SELinux, and seccomp [ 8 , 13 , 6 ] . These tools allow static configuration of process-level capabilities, syscall filtering, and file access restrictions. Protect [ 19 ] presents a mechanism that combines syscall interception with AppArmor for securing virtualized environments. The authors demonstrate that integrating these user-space access control techniques can help prevent certain types of boundary violations. However, Protect suffers from limited visibility into syscall semantics and provides no runtime learning or adaptive enforcement. Similarly, tools like gVisor and Nabla [ 7 , 10 ] attempt to harden user space by introducing lightweight VMMs (Virtual Machine Monitors) or unikernels [ 12 ] to act as syscall proxies. These solutions offer stronger isolation at the cost of performance, increased complexity, and compatibility constraints with standard Linux applications. II-B Kernel-Level Monitoring with eBPF To overcome the limitations of user-space-only enforcement, recent work has focused on leveraging eBPF to perform runtime monitoring and policy enforcement directly in the kernel. eBPF allows programs to hook into various kernel events such as system calls, network packets, and process lifecycle changes, making it ideal for dynamic and context-aware security. Gwak et al. [ 3 ] explore eBPF’s application in Kubernetes-based environments. Their work demonstrates how eBPF probes can be dynamically attached to system calls and container-specific cgroups to monitor runtime behavior. Their approach enables fine-grained process-level tracking, including syscall tracing and file descriptor monitoring. However, their focus is largely on observability rather than proactive enforcement or threat prevention. Tracee [ 14 ] , developed by Aqua Security, and Falco [ 15 ] , maintained by Sysdig, are notable open-source tools that leverage eBPF for container runtime security. Tracee provides a lightweight syscall trace engine that allows for behavioral anomaly detection based on predefined rules [ 14 ] . Falco uses a hybrid of kernel modules and eBPF for detecting abnormal activity such as privilege escalation attempts or file tampering. While effective, these tools often rely on fixed rule sets and