Abstract
Traditional intrusion detection systems (IDS) relying on system call sequences are increasingly vulnerable to "mimicry attacks," where malicious intent is masked by benign-looking system calls. This paper presents DeePBM, a novel framework that shifts the monitoring granularity from coarse system calls to fine-grained hardware-assisted branch traces. By utilizing Intel Processor Tracing (PT) and Long Short-Term Memory (LSTM) networks, DeePBM learns the complex "grammar" of normal program execution. Our evaluation demonstrates that branch-level modeling effectively exposes the internal logic discrepancies of mimicry attacks, achieving high detection accuracy with minimal false positives across various real-world vulnerabilities.
Introduction
The security of modern software often hinges on Host-based Intrusion Detection Systems (HIDS). For decades, the standard approach has been monitoring system call sequences. However, attackers have developed sophisticated "mimicry attacks" that bypass these monitors by injecting "no-op" system calls—invalid or harmless calls that pad malicious sequences to match benign profiles.
The fundamental limitation of system-call-based IDS is granularity. A system call is a high-level abstraction that hides the internal execution paths of the kernel and application. This paper proposes that monitoring branch sequences provides the necessary resolution to distinguish between legitimate operations and the error-handling paths typically triggered by mimicry "no-ops."
Methodology: The DeePBM Framework
The proposed DeePBM (Deep Program Behavior Modeling) framework integrates low-overhead hardware tracing with deep sequence modeling.
The architecture consists of two primary components:
- Hardware-Assisted Logging: To mitigate the performance overhead of full branch tracing, DeePBM leverages Intel Processor Tracing (PT). This hardware feature captures Taken/Not-Taken (TNT) and Target IP (TIP) packets with negligible impact on the target process.
- LSTM-based Branch Model: Branch sequences are significantly longer and more complex than system call sequences. DeePBM treats branch prediction as a language modeling task, employing an LSTM network to capture long-term dependencies in execution flow. The model is trained on benign traces to predict subsequent branches; anomalies are detected when the observed sequence results in high perplexity.
The Core Insight: Branch-Level Granularity
The central thesis of this work is that branches magnify anomalies that are invisible at the system call level. Attackers often use invalid system calls as "no-ops" to fool monitors. While the OS kernel receives the same system call identifier, the internal logic it executes differs drastically based on the validity of the arguments.
As shown in the trace comparison, a successful sys_open() call follows a complex "happy path" involving numerous internal functions. In contrast, a "no-op" version—designed to fail—quickly diverts into error-handling branches. In our experiments, a normal open() call executed 364 branches, whereas a failed mimicry version executed only 159. This discrepancy allows DeePBM to see through the "no-op" mask.
Experimental Results
DeePBM was evaluated using three server applications: MySQL, Nagios, and ProFTPD. The system was tested against real-world vulnerabilities (CVEs) including privilege escalation and Data-Oriented Programming (DOP) attacks.
Key findings include:
- High Detection Accuracy: ROC analysis showed near-perfect detection rates with very low false-alarm rates.
- Perplexity Gap: There was a massive statistical gap between normal and attack sequences. Normal behavior resulted in consistently low perplexity, while attack sequences caused immediate spikes, facilitating clear threshold-based detection.
- Robustness: The system successfully identified DOP attacks, which are notoriously difficult to detect because they do not alter the control flow in ways that traditional monitors can easily spot.
Conclusion
DeePBM demonstrates that fine-grained branch modeling is a powerful defense against mimicry attacks. By leveraging hardware-assisted tracing and deep learning, it is possible to monitor program behavior at a level of detail that exposes the internal logic of malicious activity. Future work will focus on scaling the model to broader malware families and further optimizing the performance overhead for production environments.
Summary updated