Presented at the 2018 Network and Distributed System Security Symposium (NDSS), this research explores the intersection of adversarial machine learning and software forensics. The study demonstrates how automated binary rewriting can be used to "anonymize" or "forge" the authorship of binary programs, effectively bypassing state-of-the-art identification systems.
The Challenge of Binary Authorship
Binary code authorship attribution is the process of identifying the creator of compiled software based on "stylistic fingerprints" left in the machine code. This is a critical tool for malware forensics and plagiarism detection. While machine learning (ML) has proven highly effective at this task, this paper investigates whether an attacker can intentionally hide their style or impersonate another author.
The primary challenge is that binary code is "brittle." Unlike computer vision, where minor pixel changes can deceive an AI without altering the image's appearance to a human, flipping a single bit in software can cause a program to crash or lose its original functionality. The researchers needed a method to perturb stylistic features without breaking the software's logic.
The Adversarial Framework
The authors developed an end-to-end attack framework consisting of two main phases: feature vector modification and input binary modification.
1. Feature Vector Modification
The system uses a "substitute" neural network to identify which features (such as specific machine instructions or function calls) most influence the classifier's decision. They adapted standard adversarial techniques like the Carlini & Wagner (CW) attack and Projected Gradient Descent (PGD). A key innovation is the Feature Correlation Analysis, which ensures that changing one feature also updates its "logical neighbors," maintaining a realistic feature set.
2. Input Binary Modification
Once the target features are identified, the framework uses Dyninst (a binary rewriting tool) to modify the file. They developed several clever primitives:
- Injection: Adding new, non-functional code sections or "dead" functions containing desired stylistic features.
- Removal/Obfuscation: Swapping instructions for semantically equivalent ones or splitting address loads into multiple steps to hide them from disassembly tools like radare2.
Experimental Results
The study utilized a dataset from Google Code Jam (GCJ), focusing on C++ solutions from 30 to 100 different authors. They tested their framework against a state-of-the-art attribution method that uses disassemblers (NDISASM and radare2) to extract features for a Random Forest classifier.
- Untargeted Success: The attack achieved a 96% success rate in making the classifier misidentify the author.
- Targeted Success: Impersonating a specific author proved more difficult but still achieved a 46% success rate.
- Efficiency: On average, the authors only needed to modify approximately 10 features to trigger a misclassification.
- Robustness: The modified binaries remained fully functional, proving that stealthy authorship evasion is a practical threat.
Key Insights and Limitations
A major finding is that classifiers rely heavily on "low-hanging fruit"—features that are easy to change, such as specific library function calls. Furthermore, the attack is effective because it tricks the underlying disassembly tools; by using "non-loadable" sections, attackers can feed junk features to tools like NDISASM while the actual OS loader ignores them.
However, the authors acknowledge limitations. Their current strategies struggle with complex features like Control Flow Graphs (CFG), which are harder to modify without breaking the program. While adversarial re-training (including modified binaries in the training set) is a possible defense, the researchers note that a determined attacker will likely continue to find new ways to bypass updated models in an ongoing security arms race.
Summary updated