Abstract
Log-based cyber threat hunting has emerged as an important solution to counter sophisticated attacks. However, existing approaches require non-trivial efforts of manual query construction and have overlooked the rich external threat knowledge provided by open-source Cyber Threat Intelligence (OSCTI). To bridge the gap, we propose ThreatRaptor, a system that facilitates threat hunting in computer systems using OSCTI. Built upon system auditing frameworks, ThreatRaptor provides (1) an unsupervised, light-weight, and accurate NLP pipeline that extracts structured threat behaviors from unstructured OSCTI text, (2) a concise and expressive domain-specific query language, TBQL, to hunt for malicious system activities, (3) a query synthesis mechanism that automatically synthesizes a TBQL query for hunting, and (4) an efficient query execution engine to search the big audit logging data. Evaluations on a broad set of attack cases demonstrate the accuracy and efficiency of ThreatRaptor in practical threat hunting.
Introduction
Modern cyber threat hunting is often likened to finding a needle in a haystack. Security analysts are tasked with sifting through massive volumes of system audit logs—often exceeding 1GB per host daily—to identify traces of sophisticated, multi-stage attacks. While Open-Source Cyber Threat Intelligence (OSCTI) reports from leading security firms provide detailed narratives of these attacks, translating this unstructured knowledge into actionable search queries remains a manual and labor-intensive process.
ThreatRaptor addresses these challenges by automating the transition from reading a threat report to hunting for that threat in system logs. It overcomes two primary hurdles: the failure of standard Natural Language Processing (NLP) tools on technical security jargon and the computational expense of querying massive datasets for complex behavioral patterns.
The ThreatRaptor Architecture
ThreatRaptor is designed as an end-to-end pipeline that ingests OSCTI reports and outputs detected malicious activities from system audit data.
The system architecture consists of two main components:
- Threat Behavior Extraction: This module parses OSCTI reports to identify Indicators of Compromise (IOCs) and their relationships, constructing a Threat Behavior Graph.
- Query-Based Threat Hunting: This module synthesizes the graph into a specialized query language (TBQL) and executes it against system audit logs.
From Unstructured Reports to Structured Hunting
The core innovation of ThreatRaptor lies in its ability to transform human-readable text into machine-executable queries.
Unsupervised NLP and IOC Protection
Standard NLP tools often break when encountering technical strings like file paths (e.g., /etc/passwd) or IP addresses. ThreatRaptor introduces "IOC Protection," a technique that identifies these technical strings via regex and masks them with dummy tokens before linguistic analysis. This allows the system to achieve a 96.64% accuracy in IOC extraction and a 92.59% accuracy in relationship extraction, significantly outperforming general-purpose tools like Stanford Open IE.
TBQL: A Domain-Specific Language for Hunting
The authors developed the Threat Behavior Query Language (TBQL), designed specifically for the temporal and relational nature of system events. Unlike standard SQL, TBQL treats system events as first-class citizens and includes native support for temporal constraints (e.g., "Event A occurred before Event B"). This makes queries not only more expressive but also significantly more concise—roughly 3x shorter than equivalent SQL or Cypher queries.
Evaluation and Performance
ThreatRaptor was evaluated using a benchmark of 18 attack cases, including data from the DARPA Transparent Computing (TC) program and custom-designed multi-step intrusions. The dataset comprised approximately 47 million entities and 55 million system events.
- High Accuracy: The system achieved a 98.34% F1-score in identifying malicious activities across diverse operating systems (Linux, Windows, and Android).
- Efficiency Gains: The TBQL execution engine outperformed traditional databases, running 22.7x faster than PostgreSQL and 9.1x faster than Neo4j. This speedup is achieved by prioritizing the most restrictive parts of a query to prune the search space early.
- Robustness: By focusing on behaviors (e.g., a process reading a sensitive file and then connecting to an IP) rather than static signatures (e.g., a specific filename), ThreatRaptor remains effective even when attackers change their specific tools or file names.
Conclusion
ThreatRaptor represents a significant step forward in automating cyber threat hunting. By bridging the gap between external threat intelligence and internal system auditing, it empowers security analysts to respond to emerging threats with unprecedented speed and accuracy. Future work aims to expand the system's scope to include more entity types, such as Windows Registry entries, and to leverage deep learning for even more sophisticated behavior extraction.
Summary updated