Introduction
Modeling program behavior is a cornerstone of modern cybersecurity, essential for tasks ranging from intrusion detection to vulnerability research. Traditional approaches often simplify program behavior as a linear sequence of operations, such as system calls. However, this paper argues that a more accurate representation of behavior is a history of computational steps defined by pairs of (function, arguments).
The primary obstacle in this approach is the "input space explosion" caused by program arguments. For instance, a 64-bit integer can take $2^{64}$ possible values. Naively embedding these raw values into a neural network results in massive, sparse vectors that are computationally expensive and difficult to deploy on-device. This paper introduces a novel data embedding scheme that represents program arguments as "Characteristic Values" (CVs) derived from execution paths, coupled with a dual-LSTM architecture for efficient modeling.
The Challenge of Argument Modeling
Standard neural network models struggle with the high dimensionality and noise inherent in program data. Beyond the sheer volume of possible argument values, global variables and "dummy" arguments—data that does not influence program logic—add significant noise. These factors degrade learning performance and lead to models with a memory footprint too large for practical security applications.
Proposed Methodology: Characteristic Value (CV) Embedding
The core innovation of this research is the Characteristic Value (CV) embedding. Instead of attempting to embed the raw value of an argument $x$, the authors represent it by the specific execution path it triggers within a function.
CV Mapping
The CV mapping process clusters the infinite input space into a manageable set of functional behaviors. If two different argument values (e.g., flag=1 and flag=3) result in the identical internal branch sequence within a function, they are mapped to the same CV. This approach naturally filters out "dummy" variables or global variables that do not influence the control flow, effectively performing automated feature selection.
Dual-LSTM Architecture
To process these sequences efficiently, the authors developed a dual-LSTM neural network architecture that mimics the hierarchical nature of software. This architecture splits the task into two specialized sub-networks:
- Function Sub-network (FSN): This layer learns the high-level sequence of function calls and generates a "context vector" representing the program's current logical state.
- State Sub-network (SSN): This layer learns the sequence of CVs (internal state mutations) within the context provided by the FSN.
Rather than simple concatenation, the FSN's context vector initializes the hidden state of the SSN. This ensures that the model distinguishes between identical branch sequences occurring in different functional contexts (e.g., recvmsg vs. mprotect).
Experimental Setup and Datasets
Due to the lack of granular branch-level information in standard datasets, the authors collected three custom datasets:
- N1 (Anomaly Detection): Benign data from MySQL and GNU Screen; attack data from known privilege escalation exploits (e.g., CVE-2016-6663).
- N2 & N3 (Malware Classification): Focused on network-driven behavior and malware samples from VirusTotal, including botnets and miners.
Raw logs were refined into sequences of (Function ID, CV Sequence) pairs for training.
Key Results
The CV-based model demonstrated significant improvements over existing methods:
- Superior Accuracy: In MySQL anomaly detection, the model achieved an AUROC of 1.0000, outperforming baselines like DeePBM (0.9750) and SGNN (0.9341).
- Efficiency and Compression: The model maintained high performance even when significantly compressed. A small version of the N1 model outperformed larger traditional models while requiring a much smaller memory footprint.
- Computational Speed: By processing condensed CV sequences rather than raw bitstreams, the model achieved a drastic reduction in CPU cycles per input.
- Semantic Clustering: t-SNE visualizations confirmed that the embedding layer naturally clusters system calls by their behavior, such as grouping different flags in
recvmsgthat lead to similar wait-states.
Conclusion and Future Work
This research demonstrates that for security modeling, the effect of an argument on control flow is more semantically meaningful than its raw value. The CV embedding scheme allows for massive dimensionality reduction and improved efficiency without sacrificing accuracy.
Future work may address the current requirement for domain knowledge in selecting branch points and the lack of high-granularity public benchmarks. Additionally, efforts to "translate" anomalous CV sequences back into human-readable reports could improve the explainability of the model for security analysts.
Summary updated