Abstract
The vast majority of work on comparing program similarities to detect software piracy either assumes the availability of the program source code or performs a complicated source program transformation to embed carefully designed signatures into the binary code. In this paper, we propose a new approach to detecting program similarities that requires neither the availability of the program source nor complicated compile-time watermarking techniques. Furthermore, our framework is resistant to standard attacks such as code obfuscation. Our approach exploits the observation that the sequence of system calls performed by a program execution provides a strong signature of the program semantics or functionality, thereby using the inherent properties of a program to identify it. By statistically analyzing sequences of system calls, the relative similarities and differences of program regions can be automatically determined. We present several case studies showing the applicability of our framework in pinpointing pirated segments and demonstrate strong consistency between the output of our framework and that of Moss.
Introduction
Software piracy detection is a significant challenge when source code is unavailable. Traditional tools like Moss are effective for source-level comparison but fail against compiled binaries. Static binary comparison is equally problematic because different compilers, optimization levels, and obfuscation techniques can make identical logic appear completely different at the file level. This research proposes a workaround: analyzing a program's dynamic behavior rather than its static structure. By treating system call sequences as "intrinsic watermarks," we can identify shared codebases between binaries even under heavy obfuscation.
Methodology: SIS and SDS
The framework captures two primary data streams during execution: the System call ID Sequence (SIS) and the System call stack Depth Sequence (SDS). The SIS provides a chronological list of OS interactions, while the SDS records the function call stack depth at the moment each system call is triggered. These sequences form a semantic signature that is difficult to alter without compromising the program's core functionality.
The Valley Concept and Structural Mapping
A key innovation in this framework is the identification of "valleys" within the SDS. A valley typically corresponds to the boundaries of a subroutine. By measuring these valleys, the framework can reconstruct a dynamic subroutine call graph, mapping the program's execution hierarchy. This allows the tool to match not just which calls are made, but the structural context in which they occur.
To compare two sequences, the framework utilizes $n$-gram analysis combined with a Bayesian aggregation approach. This method weights different $n$-gram lengths based on the observed distribution of valley widths, ultimately producing a cosine similarity score between 0 and 1.
Experimental Results
The framework was evaluated using 10 versions of the GNU Compiler Collection (GCC), Intel’s C++ Compiler (ICC), and multiple Java Virtual Machines (JVMs). Using "Hello World" programs as inputs to isolate core compiler behavior, the researchers found:
- Version Consistency: Similarity scores perfectly matched versioning history; for instance, GCC 3.3.0 was significantly more similar to GCC 3.3.2 than to GCC 4.0.3.
- Cross-Vendor Distinction: The tool correctly identified near-zero similarity between compilers from different vendors (GCC vs. ICC), proving it detects implementation logic rather than just the general task of compiling.
- Moss Validation: When tested against programs where source code was available, the dynamic similarity scores showed strong consistency with Moss results.
- Local Pinpointing: Beyond global scores, the framework can identify specific "hot" regions of similarity, allowing investigators to pinpoint exactly which subroutines were likely stolen.
Conclusion
By focusing on the dynamic interface between a program and the operating system, this approach provides a robust, obfuscation-resistant method for detecting software similarity. While limited to code that is actually executed during a trace, the use of system calls as an intrinsic watermark offers a powerful new tool for software forensics and piracy detection.
Summary updated