Automated Synthesis of Semantic Malware Signatures using Maximum Satisfiability

Yu Feng, Osbert Bastani, Ruben Martins, Isil Dillig, Saswat Anand

TL;DR

ASTROID is a new tool that automatically generates "semantic signatures" for Android malware families using as few as two samples. By framing signature generation as a Maximum Satisfiability (MaxSAT) problem, it identifies the most suspicious shared behaviors across apps, creating detectors that are more accurate than manual signatures and more resilient to obfuscation than traditional machine learning models.

What Problem Does This Paper Address?

Malware detection usually falls into two camps: signature-based and learning-based.

  • Signature-based methods (like your standard antivirus) look for specific patterns. They are easy for humans to understand but usually require security experts to spend weeks manually reverse-engineering code to write a single signature.
  • Learning-based methods use machine learning to classify apps. While they are automatic, they are often "black boxes" (hard to explain why an app was flagged) and require massive amounts of training data—a major problem for new or rare malware families.

The authors address this "data hunger" and "interpretability gap." They wanted a way to automatically create human-readable signatures from just a handful of examples, specifically for the Android ecosystem where inter-component communication (how different parts of an app talk to each other) is the primary vector for malicious behavior.

Methods

The core of the paper is a technique called Automated Synthesis of Semantic Malware Signatures.

  1. Graph Representation: The authors represent apps as Inter-component Call Graphs (ICCGs). These graphs don't just show which component calls another; they include "semantic metadata" like data-flow (e.g., "Device ID flows to Internet") and sensitive API calls (e.g., "sendSMS").
  2. The MSCS Problem: To find a signature, the tool looks for a Maximally Suspicious Common Subgraph (MSCS). This is a pattern that appears in all provided malware samples (the "common" part) but contains the most "suspicious" features (the "maximal" part).
  3. MaxSAT Reduction: Finding this subgraph is computationally hard. The authors solve it by reducing it to a Maximum Satisfiability (MaxSAT) problem. They use hard constraints to ensure the signature is a valid subgraph present in all samples and soft constraints to maximize the "suspiciousness score" based on how rarely those features appear in benign apps.
  4. Approximate Matching: Instead of looking for an exact match (which obfuscation can easily break), ASTROID calculates a similarity score. If a new app contains 80% of a known malware's signature, it’s flagged as an obfuscated variant.

Datasets

The researchers evaluated ASTROID using several high-profile sources:

  • Android Malware Genome Project: A standard benchmark containing 1,260 malware samples across 49 families.
  • Google Play Store: A corpus of 10,495 apps used to test for false positives and to hunt for "zero-day" (previously unknown) malware.
  • Symantec & McAfee Samples: 160 malware samples used specifically to test the tool's ability to detect malware it hadn't seen signatures for yet.

Key Insights and Ideas

  • Suspiciousness is Relative: The authors don't just look for common code; they weight features by their rarity. If a data flow from "SubscriberID to Internet" appears in 0.1% of benign apps but 100% of your malware samples, it’s a much stronger signal than a common "Activity" transition.
  • Lexicographical Optimization: Not all suspicious behaviors are equal. The authors prioritize Intent filters (how apps trigger) over API calls, which are prioritized over data-flows. This hierarchy helps the MaxSAT solver find the most meaningful malicious patterns first.
  • Interpretability as a Feature: Because the output is a graph of components and flows, a human analyst can look at an ASTROID signature and immediately see how the malware works (e.g., "This receiver waits for a BOOT_COMPLETED signal, then starts a service that leaks the IMEI").

Key Results

  • Better than Humans: ASTROID’s automatically generated signatures achieved 93.8% accuracy, outperforming manually written signatures (90%) used in previous state-of-the-art research.
  • Few-Shot Success: The tool reaches high accuracy with just 2 to 5 samples, whereas traditional ML models like DREBIN struggle significantly in small-sample scenarios.
  • Zero-Day Detection: By using approximate matching, ASTROID found 22 instances of zero-day malware on the Google Play Store that were not flagged by existing tools at the time.
  • Obfuscation Resilience: While standard "exact" matching tools saw their detection rates drop to 61% when faced with obfuscated code (like renamed variables or dummy components), ASTROID’s approximate matching maintained a 94.3% detection rate.

Limitations and Future Work

  • Static Analysis Dependencies: ASTROID relies on the precision of the underlying static analysis tool (APPOSCOPY). If the tool can't correctly resolve a complex call graph or a dynamic code load, the signature quality suffers.
  • The "Two-Sample" Minimum: While much better than needing thousands of samples, the tool still requires at least two representative samples to find a "common" subgraph.
  • Initial Database: The effectiveness of zero-day detection depends on having a diverse initial database of known malware families to compare against.
  • Future Directions: The authors suggest that improving the underlying static analysis to handle dynamic payloads (apps that download their malicious code after installation) would be a logical next step.

Summary updated

BibTeX
@inproceedings{feng2017automated,
  author = {Yu Feng and Osbert Bastani and Ruben Martins and Isil Dillig and Saswat Anand},
  title = {{Automated Synthesis of Semantic Malware Signatures using Maximum Satisfiability}},
  booktitle = {NDSS},
  year = {2017},
}
Figure