Abstract
Traditional Denial-of-Service (DoS) defenses often fail against low-volume, stealthy exploits that target internal system resources rather than network bandwidth. This paper presents ROKI, a defense system that utilizes hardware performance counters and eBPF to attribute internal resource consumption to individual network packets. By monitoring the computational cost of traffic across the kernel stack, ROKI effectively identifies and mitigates "Micro-DoS" (µDoS) attacks with minimal performance overhead.
Introduction: The Challenge of Low-volume DoS
Traditional DoS defenses are designed to handle "floods"—massive traffic volumes that saturate network links. However, Low-volume DoS (µDoS) attacks, such as SegmentSmack or Slowloris, present a different challenge. These attacks send a small number of benign-looking packets that trigger expensive computations or memory-intensive operations deep within the operating system. Because these packets arrive at a slow rate and appear legitimate, they bypass traditional firewalls and rate-limiters. The fundamental issue is a lack of visibility: defenders typically monitor external network flow, while the actual damage occurs during internal resource allocation.
Methods: The ROKI Architecture
ROKI (Resource-Oriented Kernel Instrumentation) addresses this visibility gap by shifting the focus from traffic volume to the symptom of resource exhaustion.
The system operates through a multi-stage process:
- System Watchdog: To minimize overhead, full profiling only activates when system-wide stress (e.g., CPU usage > 75%) is detected.
- eBPF-Based Probing: ROKI uses eBPF to inject non-intrusive probes at the entry and exit points of kernel functions across the Link, Network, Transport, and Application layers.
- Hardware-Assisted Profiling: It leverages Hardware Performance Counters (HPCs)—specifically the Performance Monitoring Unit (PMU) and Memory Bandwidth Monitoring (MBM)—to calculate the exact CPU and memory cost of each packet.
- Data-Driven Mitigation: Once an "expensive" IP is identified, ROKI uses standard tools like
iptablesandFridato block new packets and terminate malicious sessions.
Key Insights
- The "Expensive Packet" Metric: By quantifying the computational cost of a single packet, ROKI can detect "loud" internal events that are "quiet" on the network.
- Layer-Specific Visibility: Multi-layer tracking prevents attackers from hiding their resource consumption in specific parts of the kernel stack, such as IP fragment reassembly.
- Symptom-over-Signature: Focusing on resource usage allows ROKI to mitigate zero-day attacks without requiring pre-defined attack signatures.
Evaluation and Results
The authors evaluated ROKI against real-world µDoS attacks, including FragmentSmack and Apache Range Header exploits.
Key findings include:
- Effective Mitigation: ROKI successfully identified and blocked all test attacks, maintaining service for benign clients even under heavy stress.
- Low Performance Impact: In pure profiling mode, overhead is negligible. During active mitigation, the system incurs only a 3.5% to 4.8% overhead in throughput and latency.
- Scalability: The per-packet metadata is extremely lightweight (~126 bytes), allowing the system to track 100,000 concurrent packets with only 12MB of RAM.
Limitations and Future Work
While effective, ROKI faces challenges such as IP spoofing, which could lead to blocking legitimate users. Future work includes developing dynamic thresholds that adapt to varying server loads and optimizing the eBPF ring buffer to prevent data loss during extreme packet rates. Additionally, the limited number of hardware counters on modern CPUs requires careful multiplexing to monitor diverse resource metrics simultaneously.
Summary updated