TL;DR
This paper introduces Eunomia, a novel, non-intrusive system that detects and identifies various security attacks by monitoring performance deviations captured by processor performance monitoring units (PMUs). By analyzing how attacks disrupt normal program execution patterns, Eunomia offers a lightweight and effective defense against emerging threats like return-oriented programming without requiring any modifications to hardware or software.
What Problem Does This Paper Address?
Traditional security breach detection and mitigation methods often fall into two categories: those that require significant hardware modifications (making them impractical for widespread adoption) or those that demand intrusive software changes, such as altering application source code or binaries. This leaves systems vulnerable to sophisticated attacks like return-oriented programming (ROP), which are notoriously difficult to detect with existing techniques. The authors aim to bridge this gap by proposing a non-intrusive approach that leverages readily available hardware features.
Methods
The core of Eunomia's approach lies in observing how security attacks cause abnormal control flow, leading to detectable deviations in performance counter metrics. The system utilizes the performance monitoring units (PMUs) found in modern processors, specifically focusing on events like branch miss predictions, instruction TLB misses, and branch trace store (BTS) data.
Eunomia implements distinct detection strategies for different attack types:
- Code-Injection Attacks: These attacks inject malicious code into data sections (like the stack or heap), causing control flow to jump to these injected instructions. This results in deviations in PMU events such as instruction TLB misses and branch miss predictions, as the processor attempts to execute code from unexpected memory regions.
- Return-to-libc Attacks: These attacks hijack control flow to execute existing library functions (e.g.,
execve) with attacker-controlled arguments. Eunomia detects these by preprocessing application binaries to identify "legal" callers of library routines. It then uses BTS to monitor control transfers and flags any calls to library routines from unexpected sources. - Return-Oriented Programming (ROP) Attacks: ROP attacks chain together small snippets of existing code (gadgets) to form malicious functionality. Eunomia exploits the BTS mechanism to trace control flow. It identifies suspicious sequences of instructions that appear just before a
retinstruction, assigning a "suspicious value" to these sequences. When an accumulated suspicious value exceeds a predefined threshold, it indicates a potential ROP attack.
The system is implemented as a user-level tool that synchronizes with application processes using ptrace and collects performance samples in a batched mode to minimize overhead.
Datasets
The paper does not explicitly mention or introduce new datasets for training. Instead, it uses real-world applications and known vulnerabilities for evaluation. The applications evaluated include:
- Apache Web Server
- Postgres Database Server
- Exim Mail Server
- Memcached
- Metis
- OpenSSH
- Tar
- Samba Server (with a heap overflow vulnerability)
- Squid (with a stack overflow vulnerability)
Key Insights and Ideas
- Performance Counters as a Security Signal: The fundamental insight is that even sophisticated attacks that manipulate control flow leave a discernible "fingerprint" in the performance metrics collected by PMUs. This provides a powerful, low-overhead way to detect anomalies.
- Attack Behavior, Not Vulnerability Specificity: Eunomia's strength lies in its ability to detect attacks based on how they disrupt normal execution, rather than needing to know the specific vulnerability being exploited. This makes it adaptable to a wide range of threats.
- Non-Intrusive Detection: The ability to detect attacks without modifying binaries, source code, or requiring special hardware is a significant advantage for practical deployment.
- ROP Detection via Control Flow Anomaly: The novel approach to detecting ROP attacks by analyzing instruction sequences preceding
retinstructions is a key contribution, addressing a previously difficult-to-detect attack vector.
Key Results
- Eunomia successfully detected all tested attacks (code-injection, return-to-libc, and ROP) on real-world applications and vulnerabilities.
- Attacks were detected at the first instance of an abnormal performance sample being generated.
- The performance overhead of Eunomia was found to be acceptably low, averaging 4.72% for code-injection and return-based attacks using the BTS mechanism, with individual application overheads ranging from 0.09% to 10.49%.
- For code-injection detection, the
itlb_missesevent was identified as the most appropriate due to its lower overhead compared tobranch_miss_predictand BTS. - The overhead of the BTS mechanism itself was found to be comparable to using BTS with Eunomia's detection logic, suggesting that Eunomia's detection logic adds minimal overhead.
Limitations and Future Work
- False Positives in Return-to-libc: The paper acknowledges that the method for detecting return-to-libc attacks might produce false positives if there are consecutive calls in normal execution that mimic indirect library calls. Eunomia attempts to mitigate this by recording consecutive calls during preprocessing.
- ROP Detection Limitations: Eunomia currently does not consider ROP attacks that use "update-load-branch" sequences (e.g.,
pop %eax; jmp *%eax). - Samba Server ROP Failure: Due to the specific vulnerability in Samba Server, the authors were unable to construct a return stack necessary to exploit it via ROP, thus failing to test this specific attack scenario on that application.
- Future Work: The authors suggest enhancing Eunomia to detect update-load-branch ROP schemes, further analyzing false positives and negatives, and exploring how to leverage PMUs to detect more security vulnerabilities and software bugs. They also propose cooperating with compiler transformations or instrumentation to improve detection precision.
Summary updated