Abstract
Cloud-native environments are characterized by constant updates and architectural changes, leading to a phenomenon known as normality shift in system logs. This paper introduces CAShift, a novel benchmark dataset featuring 20 real-world attack scenarios and three types of normality shifts. Evaluation of existing Log-based Anomaly Detection (LAD) models reveals significant performance drops under these shifts, though continuous learning techniques provide a viable path for model adaptation.
Introduction
Cloud-native environments, powered by technologies like Kubernetes and Docker, are inherently dynamic. Frequent application updates, service deployments, and infrastructure migrations are the norm. While Log-based Anomaly Detection (LAD) is a cornerstone of cloud security—learning "normal" system behavior to flag deviations—it faces a critical challenge: normality shift.
Normality shift occurs when routine system updates change the baseline distribution of logs. For instance, a model trained on WordPress 4.8 logs might generate excessive false positives when the application is updated to version 5.6, or when the underlying container runtime is swapped from runc to gVisor. Existing LAD datasets often overlook these complex, cloud-specific distribution shifts, focusing instead on network traffic or simple application bugs.
The CAShift Dataset
To address this gap, the authors introduced CAShift, a comprehensive benchmark dataset designed to evaluate LAD models under realistic cloud conditions. CAShift includes:
- Scale: 4.5 billion log entries, comprising 27,000 normal system call traces and 2,500 attack traces.
- Shift Scenarios: Data is partitioned into three distinct types: Application Shift (changing the app), Version Shift (updating the app), and Cloud Architecture Shift (changing the container runtime).
- Attack Diversity: 20 real-world CVE exploits, ranging from application-level SQL injections to critical system-level container escapes and Linux kernel exploits.
Methodology
The researchers deployed a Kubernetes cluster and simulated normal user traffic using Selenium across various applications (WordPress, Joomla, Jinja2) and runtimes (containerd, cri-o, runc, gvisor). They benchmarked eight LAD methods, including established baselines like DeepLog and LogAnomaly, alongside custom semantic-aware models using AutoEncoders (AE) and Variational AutoEncoders (VAE) with BERT embeddings.
To explore recovery from normality shifts, the study evaluated four continuous learning strategies (DeepGini, ZOL, KM-ST, and Random). These strategies aim to adapt models by selecting and labeling a small subset of new, shifted data, thereby minimizing human effort.
Key Insights and Results
The Fragility of Detection
While LAD methods performed exceptionally well on in-distribution data (averaging an F1-Score of 0.90), normality shifts caused significant performance degradation. F1-Scores dropped by as much as 34%. The Cloud Architecture Shift proved most challenging; sandbox-based runtimes like gVisor produce system call patterns that differ drastically from standard runtimes, confusing models trained on the latter.
Semantics vs. Structure
Models relying on the structural graphs of system calls (e.g., CHIDS) struggled with Denial of Service (DoS) attacks, which often mimic normal traffic patterns structurally. In contrast, models that leveraged the semantic meaning of logs (e.g., VAE) were more robust and achieved near-perfect detection in stable environments.
Adaptation via Continuous Learning
Continuous learning successfully mitigated shift-induced performance drops, improving F1-Scores by up to 27%. However, the study found that more data is not always better. For AE models, retraining on all new data led to overfitting, while for VAE models, excessive new data could cause "catastrophic forgetting" of previously learned attack patterns.
Conclusion and Future Directions
The CAShift benchmark highlights the urgent need for LAD models that can handle the fluid nature of cloud environments. While continuous learning offers a path forward, future research should explore multi-modal detection—integrating system calls with network traffic and application logs. Additionally, training-less approaches like Retrieval-Augmented Generation (RAG) and contrastive learning represent promising avenues for real-time adaptation to normality shifts.
Summary updated