ALchemist: Fusing Application and Audit Logs for Precise Attack Provenance without Instrumentation

Le Yu, Shiqing Ma, Zhuo Zhang, Guanhong Tao, Xiangyu Zhang, Dongyan Xu, Vincent E. Urias, Han Wei Lin, Gabriela F. Ciocarlie, Vinod Yegneswaran, Ashish Gehani

Abstract

ALchemist is a forensic tool designed to reconstruct precise attack provenance—the chain of causality in a cyberattack—by fusing high-level application logs with low-level system audit logs. It achieves the high accuracy typically associated with code-instrumentation techniques (which require modifying software) without needing to change a single line of code. By leveraging existing developer logs, ALchemist maintains a negligible 1.1% runtime overhead while effectively solving the "dependency explosion" problem inherent in traditional system-level logging.

Introduction

When an Advanced Persistent Threat (APT) strikes, investigators use provenance graphs to trace the attack from a symptom, such as a malicious file, back to its root cause, like a phishing link. However, standard system audit logs (syscalls) suffer from the dependency explosion problem. In long-running applications like web browsers, a syscall-only approach assumes that every output (e.g., a file save) depends on every prior input (e.g., every website visited in every tab). This results in a "spaghetti" graph of false dependencies, making it nearly impossible to isolate the actual attack path.

To address this, researchers traditionally "instrument" applications by manually adding logging code to track individual tasks. However, software vendors often resist instrumentation because it compromises software integrity and requires constant maintenance. ALchemist proposes a different path: using the logs developers already build into their applications to gain the same level of precision.

Methodology

ALchemist treats existing application logs as a "Rosetta Stone" to interpret system audit logs. The system operates through four primary components:

  1. Universal Execution Model: The authors categorized Linux application behaviors into five classes, ranging from sequential tasks to complex asynchronous task queues like those found in Firefox.
  2. Canonical Normalization: ALchemist utilizes specialized parsers to translate unstructured application logs and system audit logs into a standardized 20-field format.
  3. Datalog Reasoning Engine: Using 135 logic rules written in Datalog, the engine links high-level events (e.g., "Firefox switched to Tab A") to low-level syscalls (e.g., "Process 1234 wrote to a socket").
  4. Demand-Driven Inference: To handle massive log volumes, ALchemist starts from a suspicious symptom and performs logic reasoning only on the specific processes and timeframes involved in that chain.
Figure 1: Examples of application logs (a-c) and system audit logs (d) used by ALchemist to bridge high-level tasks with low-level system events.

Key Insights

The core innovation of ALchemist is the realization that developers already write detailed logs for debugging that naturally contain "task boundaries," such as transaction IDs or tab switches. While software code changes frequently, log formats remain remarkably stable over time, making ALchemist's parsers durable across software versions.

A critical logic rule employed is Forward Attribution: if a low-level system event occurs between two high-level application events belonging to the same task, that system event is attributed to that task. This effectively "colors" system logs with high-level semantic meaning.

Evaluation and Results

ALchemist was evaluated against 32 popular Linux applications (including Firefox, Apache, and Nginx) and 14 APT attacks.

  • High Precision: The tool achieved 92.8% precision and 99.6% recall in attributing system events to the correct application tasks.
  • Superior Forensics: In head-to-head tests, ALchemist outperformed state-of-the-art tools like NoDoze and OmegaLog. It was particularly effective at handling the interleaved background activities of modern browsers that typically cause other tools to fail.
  • Efficiency: The system is production-ready, with only 1.1% runtime overhead and 6.8% storage overhead. Using demand-driven inference, ALchemist analyzed a complex Firefox attack in 70 seconds, whereas a standard logic engine would have timed out after 10 hours.
Figure 5: Comparison between a traditional provenance graph (NoDoze) showing dependency explosion and the precise, pruned ALchemist graph.

Conclusion and Future Work

ALchemist demonstrates that precise attack provenance can be achieved without the burden of code instrumentation. While it currently assumes application logs are part of the Trusted Computing Base (TCB), future work will explore handling adversarial logging, where attackers might attempt to compromise the logging mechanism itself or craft workloads to hide their tracks within the fusion rules.

Summary updated

BibTeX
@inproceedings{yu2021alchemist,
  author = {Le Yu and Shiqing Ma and Zhuo Zhang and Guanhong Tao and Xiangyu Zhang and Dongyan Xu and Vincent E. Urias and Han Wei Lin and Gabriela F. Ciocarlie and Vinod Yegneswaran and Ashish Gehani},
  title = {{ALchemist: Fusing Application and Audit Logs for Precise Attack Provenance without Instrumentation}},
  booktitle = {NDSS},
  year = {2021},
}
Figure