Querying Streaming System Monitoring Data for Enterprise System Anomaly Detection

Peng Gao, Xusheng Xiao, Ding Li, Kangkook Jee, Haifeng Chen, Sanjeev R. Kulkarni, Prateek Mittal · DOI

Abstract

The need for countering Advanced Persistent Threat (APT) attacks has led to the solutions that ubiquitously monitor system activities in each enterprise host, and perform timely abnormal system behavior detection over the stream of monitoring data. However, existing stream-based solutions lack explicit language constructs for expressing anomaly models that capture abnormal system behaviors, thus facing challenges in incorporating expert knowledge to perform timely anomaly detection over the large-scale monitoring data. To address these limitations, we build SAQL, a novel stream-based query system that takes as input, a real-time event feed aggregated from multiple hosts in an enterprise, and provides an anomaly query engine that queries the event feed to identify abnormal behaviors based on the specified anomaly models. SAQL provides a domain-specific query language, Stream-based Anomaly Query Language (SAQL), that uniquely integrates critical primitives for expressing major types of anomaly models. In the demo, we aim to show the complete usage scenario of SAQL by (1) performing an APT attack in a controlled environment, and (2) using SAQL to detect the abnormal behaviors in real time by querying the collected stream of system monitoring data that contains the attack traces.

Introduction

Modern enterprise security relies on "ubiquitous monitoring," where every system call—including process creation, file access, and network connections—across hundreds of hosts is recorded. This approach creates two significant challenges. First, the "Needle in a Haystack" problem: Advanced Persistent Threats (APTs) are stealthy, multi-stage attacks that can persist for months. Detecting them requires combining expert domain knowledge with complex logic to identify subtle deviations. Second, the "Data Firehose": monitoring just 100 hosts can generate approximately 50GB of logs daily. Existing general-purpose stream-processing systems often lack the specific language constructs needed for security anomalies and struggle to manage the memory overhead of many concurrent, complex queries.

The SAQL System

SAQL (Stream-based Anomaly Query Language) is designed to detect complex, multi-stage cyberattacks in real-time. The system consists of a domain-specific language and a high-performance execution engine.

The SAQL System Architecture, featuring the Parser and Execution Engine components.

Domain-Specific Language

Unlike standard SQL, SAQL includes first-class support for four primary anomaly models:

  • Rule-based: Matches specific sequences of events, such as known malware execution patterns.
  • Time-series: Utilizes sliding windows to calculate statistical spikes, such as sudden bursts in data exfiltration.
  • Invariant-based: Establishes a baseline of "normal" behaviors (e.g., typical child processes for a web server) and alerts on unseen deviations.
  • Outlier-based: Employs clustering algorithms like DBSCAN to identify "odd-one-out" behavior across different hosts or processes.

Execution Engine

The engine is built upon the Siddhi Complex Event Processing (CEP) framework, enhanced with a Master-Dependent Query Scheme. This optimization groups semantically similar queries, allowing them to share a single copy of the data stream. This significantly reduces the memory overhead typically associated with multi-query environments.

Evaluation and Results

The system was evaluated in a real-world environment at NEC Labs America, involving 150 hosts across Linux, Windows, and macOS. Data was collected using standard tools like auditd, ETW, and DTrace to feed a centralized event stream.

A simulated APT attack scenario involving five stages from initial compromise to data exfiltration.

The evaluation focused on a controlled APT attack involving five stages: initial email compromise, malware infection, privilege escalation, database penetration, and data exfiltration. SAQL successfully detected all five stages in real-time. Key insights from the evaluation include:

  • Unified Primitives: SAQL allows analysts to combine rule-matching and statistical clustering within a single query syntax.
  • Stateful Querying: The introduction of a state block allows the system to maintain a memory of past events directly within the stream processor, which is essential for detecting deviations from baseline behavior.
  • Efficiency: The master-dependent query scheme enabled the system to handle high-volume feeds while supporting multiple concurrent security queries without significant performance degradation.

Conclusion and Future Work

SAQL demonstrates that a specialized stream-based query language can effectively bridge the gap between expert knowledge and high-volume system monitoring. While the system makes expressing models easier, it still relies on human experts to define the initial queries. Future work will explore more automated query optimization and rigorous performance benchmarking for very large-scale enterprises exceeding 10,000 hosts.

Summary updated

BibTeX
@inproceedings{gao2020querying,
  author = {Peng Gao and Xusheng Xiao and Ding Li and Kangkook Jee and Haifeng Chen and Sanjeev R. Kulkarni and Prateek Mittal},
  title = {{Querying Streaming System Monitoring Data for Enterprise System Anomaly Detection}},
  booktitle = {ICDE},
  year = {2020},
  doi = {10.1109/icde48307.2020.00167},
}
Figure