Introduction
The rapid proliferation of computer viruses, fueled by "virus development kits," presents a significant challenge for cybersecurity. These kits allow even novice users to generate countless variants of a single malicious program. Traditional signature-based detection, which relies on specific byte sequences, fails against these variants. Furthermore, structural metrics like graph edit distance are easily defeated; a simple swap of independent code blocks can radically alter a program's control flow graph (CFG) while leaving its behavior unchanged.
This paper, presented at TACAS 2006, proposes a shift from structural to behavioral analysis. The authors introduce quantitative simulation and bisimulation, metrics that assign a numerical value between 0 and 1 to the behavioral similarity of two programs represented as graphs.
Quantitative Behavioral Metrics
The framework is built upon Labeled Transition Systems (LTS), where nodes represent program states and edges represent actions or labels.
The authors propose several key innovations to move beyond binary logic:
- Quantitative Simulation ($q$-simulation): Unlike traditional simulation, $q$-simulation uses a "discount factor" ($p$) to weight immediate similarities more heavily than those far in the future.
- Aggregate Measures: To increase resilience against minor, irrelevant differences, the paper suggests "aggregate" measures that average similarities across paths, rather than "extremal" measures where a single mismatch can zero out the score.
- Weak Simulation: This handles "stuttering"—meaningless extra steps—by treating them as "gaps" with associated penalties, similar to sequence alignment in bioinformatics.
Computing these metrics is reduced to known mathematical problems: asymmetric similarity (simulation) is solved via Linear Programming, while symmetric similarity (bisimulation) is modeled as a perfect-information stochastic game.
Insights: Structure vs. Behavior
The core insight of the research is the demonstration that structural similarity is a poor proxy for behavioral identity. In the context of malware, hackers can easily change the structure of a program without altering its malicious payload.
As shown in the figure above, two graphs can have a high edit distance but be behaviorally identical (bisimilar). By focusing on the sequence of actions rather than the layout of the CFG, the proposed metrics correctly identify these programs as identical. The similarity score is essentially the "value" of a game where a challenger tries to find a behavior in one graph that a simulator cannot match in the other.
Key Results and Complexity
The authors prove that the $q$-simulation measure is well-defined and converges to a unique solution (a fixed point of a contraction mapping). While computing exact bisimulation values can be computationally intensive, the paper provides a polynomial-time approximation algorithm capable of reaching any desired level of precision. This makes the approach feasible for real-world malware analysis.
Conclusion and Future Directions
While promising, the approach currently relies on heuristic choices for parameters like the discount factor and gap penalties. Future work could leverage machine learning to optimize these parameters based on known virus families. Additionally, moving from global graph comparison to identifying "hotspots" of similarity could help detect shared malicious payloads across different delivery mechanisms.
One trade-off for the robustness of aggregate scoring is that these measures do not always satisfy the triangle inequality, meaning they are not formal "distance metrics" in the mathematical sense. However, their effectiveness in identifying malware variants suggests this is a worthwhile compromise for practical security applications.
Summary updated