AppMine: Behavioral Analytics for Web Application Vulnerability Detection

Indranil Jana, Alina Oprea

Abstract: Web applications in widespread use have always been the target of large-scale attacks, leading to massive disruption of services and financial loss, as in the Equifax data breach. It has become common practice to deploy web application in containers like Docker for better portability and ease of deployment. We design a system called AppMine for lightweight monitoring of web applications running in Docker containers and detection of unknown web vulnerabilities. AppMine is an unsupervised learning system, trained only on legitimate workloads of web application, to detect anomalies based on either traditional models (PCA and one-class SVM), or more advanced neural-network architectures (LSTM). In our evaluation, we demonstrate that the neural network model outperforms more traditional methods on a range of web applications and recreated exploits. For instance, AppMine achieves average AUC scores as high as 0.97 for the Apache Struts application (with the CVE-2017-5638 exploit used in the Equifax breach), while the AUC scores for PCA and one-class SVM are 0.81 and 0.83, respectively.

1. Introduction

Web applications are the frontline of modern cyberattacks, yet protecting them has become increasingly complex as they move into containerized environments like Docker. Traditional defenses, such as anti-virus or web proxies, often struggle with the ephemeral and isolated nature of containers. Furthermore, most existing security tools rely on "signatures" of known attacks or heavy-duty static/dynamic analysis, both of which struggle to catch "zero-day" (unknown) vulnerabilities.

The authors address this challenge by building a lightweight, host-based intrusion detection system (HIDS) called AppMine. AppMine is designed to distinguish between normal user activity and malicious exploits in real-time, specifically for containerized workloads, without requiring prior knowledge of attack patterns.

2. System Architecture and Data Collection

AppMine operates on the premise that an application's "normal" behavior manifests as a predictable sequence of system calls. The system architecture is divided into four distinct phases: testbed setup, vulnerability exploitation, data collection, and the machine learning framework.

Overview of the AppMine framework, from data collection in Docker containers to anomaly prediction.

The data collection phase utilizes Sysdig to capture system calls directly from the Docker container. By monitoring at the container level, AppMine reduces "noise" from the host OS and other applications, allowing for the creation of clean behavioral "profiles" for specific enterprise applications.

3. Modeling and Feature Engineering

A critical component of AppMine is its unsupervised learning approach. The system is trained exclusively on legitimate traffic, learning what a healthy application looks like rather than searching for specific attack signatures.

3.1 Feature Engineering

System calls are grouped into frequency vectors over 1-second windows. To make the model more sensitive to anomalies, the authors apply TF-IDF (Term Frequency-Inverse Document Frequency) weighting. This ensures that rare, potentially critical system calls carry more weight than common, "noisy" ones that occur during routine operations.

3.2 Machine Learning Models

The authors compared traditional anomaly detection models with advanced neural networks. While Principal Component Analysis (PCA) and One-Class SVM (OCSVM) provide a baseline by analyzing snapshots of system call histograms, the Long Short-Term Memory (LSTM) recurrent neural network captures the temporal "rhythm" of the application.

Comparison of traditional snapshot-based models (PCA/OCSVM) versus the sequence-based LSTM model.

The LSTM is trained to predict the next sequence of system calls based on a historical window of length $\Delta$. If the actual observed calls deviate significantly from the prediction, an anomaly is flagged.

4. Experimental Evaluation

To evaluate AppMine, the authors built a comprehensive testbed including Apache Struts, Drupal, WordPress, and ProFTPD. Legitimate workloads were generated using Interactor, a tool that simulates human-like behavior (e.g., clicking, form filling) to create a realistic baseline. Attack data consisted of seven real-world exploits recreated using the Metasploit Framework.

4.1 Key Results

The LSTM model consistently outperformed traditional methods across all tested applications:

  • Apache Struts (Equifax Exploit): The LSTM achieved an AUC of 0.97, compared to 0.81 for PCA and 0.83 for OCSVM.
  • General Performance: Across 15 different attack scripts, the LSTM maintained an AUC between 0.75 and 0.97.
  • Detection Capability: The model effectively detected post-exploitation activities, such as network reconnaissance or credential dumping, with very low false-positive rates.

The results highlight that while a single second of an attack might resemble normal activity, the sequence of events over a longer duration (e.g., 15 seconds) is highly distinct.

5. Conclusion and Future Work

AppMine demonstrates the power of temporal behavioral analytics in securing containerized web applications. By leveraging unsupervised LSTM models and TF-IDF weighting, it achieves high detection accuracy for sophisticated exploits without needing attack data for training.

Future work will focus on addressing non-deterministic application behaviors that can lead to false positives and evaluating the system's performance in large-scale, "in-the-wild" cloud environments with thousands of concurrent users.

Summary updated

Abstract

Web applications in widespread use have always been the target of large-scale attacks, leading to massive disruption of services and financial loss, as in the Equifax data breach. It has become common practice to deploy web application in containers like Docker for better portability and ease of deployment. We design a system called AppMine for lightweight monitoring of web applications running in Docker containers and detection of unknown web vulnerabilities. AppMine is an unsupervised learning system, trained only on legitimate workloads of web application, to detect anomalies based on either traditional models (PCA and one-class SVM), or more advanced neural-network architectures (LSTM). In our evaluation, we demonstrate that the neural network model outperforms more traditional methods on a range of web applications and recreated exploits. For instance, AppMine achieves average AUC scores as high as 0.97 for the Apache Struts application (with the CVE-2017-5638 exploit used in the Equifax breach), while the AUC scores for PCA and one-class SVM are 0.81 and 0.83, respectively.
BibTeX
@inproceedings{jana2019appmine,
  author = {Indranil Jana and Alina Oprea},
  title = {{AppMine: Behavioral Analytics for Web Application Vulnerability Detection}},
  booktitle = {CCSW},
  year = {2019},
  doi = {10.1145/3338466.3358923},
}
Figure