Google patents malware scanner that maps software call patterns
Google describes a method for scanning software packages by mapping how their internal functions call one another. The system creates a searchable index of these call patterns to quickly find code that behaves like known malware.
In the filing’s own words
This document describes systems and techniques for indexing binaries of a software package and detecting potentially harmful code within the software package using API-call n-grams. A computing device generates API-call graphs from binaries. The computing device computes n-grams from the API-call graphs and adds them to an inverted index, which maps the n-grams to a respective identifier. The computing device identifies, using a signature that represents the behavior of the potentially harmful code, a set of candidate API-call graphs. The computing device can then compare, using a matching algorithm, the set of candidate API-call graphs to a non-deterministic finite automaton representation of the potentially harmful code. In this way, the described systems and techniques can use API-call n-grams to efficiently identify whether the software package includes a file that matches the behavior of potentially harmful code.
What exactly they claim (claim 1)
1. A method comprising: generating API-call graphs from binaries of a software package, wherein generating the API-call graphs comprises converting control flow graphs of the binaries into directed acyclic graphs by condensing mutually recursive functions into nodes; computing n-grams of a customizable length from the API-call graphs, wherein computing the n-grams comprises: merging nodes of each API-call graph that are connected by epsilon transitions to form an acyclic graph, topologically ordering the nodes of the acyclic graph, and recursively annotating each node with arrays of n-grams representing sequences of API calls along paths in the acyclic graph; adding the n-grams to an inverted index that maps each of the n-grams to a respective identifier of the API-call graphs to enable locating of individual API-call graphs; identifying, from among the API-call graphs based on the n-grams, a set of candidate API-call graphs that match a signature, the signature comprising a set of n-grams that represents a sequence of calls and is represented as a non-deterministic finite automaton (NFA) with epsilon-moves, the signature representing behavior of potentially harmful code; retrieving the set of candidate API-call graphs from the inverted index; comparing, using a matching algorithm, the set of candidate API-call graphs to the NFA representing the behavior of potentially harmful code by computing, for each candidate API-call graph, a synchronized product automaton whose set of states is the cartesian product of the states of the NFA and the states of the candidate API-call graph, and whose transitions comprise: (i) epsilon moves for either automaton, and (ii) synchronized transitions on matching input symbols; and determining, via a graph traversal of the synchronized product automaton, whether any candidate API-call graph matches the behavior of potentially harmful code, and in response to a match, indicating that the software package potentially contains harmful code.
Facts
- Company
- Google (Google LLC)
- Official title
- Indexing software packages and detecting malicious or potentially harmful code using API-call n-grams
- Patent number
- US12743506B2
- Application number
- 18031443
- Filed
- Oct 12, 2020
- Granted
- Sep 22, 2026
- Inventors
- 1
- Claims
- 18
Classified under
G06F 21/554 Physics & computingG06F 9/547 Physics & computingG06F 16/9024 Physics & computingG06F 21/563 Physics & computingG06F 21/564 Physics & computingG06F 2221/033 Physics & computingMore from Google in Security & privacy
- Google patents privacy score for third-party apps Sep 22, 2026
- Google patents phone feature to disable unknown trackers Oct 8, 2026
- Google patents local face recognition for smart home cameras Sep 10, 2026
- Google patents system that finds and fills in email verification codes Sep 17, 2026
- Google patents AI agents that automatically investigate network security threats Oct 8, 2026
Summaries are simplified from the filing’s own abstract and first claim. A patent filing is not a product announcement.
Patent data and drawings: U.S. Patent and Trademark Office (USPTO). Nebula is not affiliated with or endorsed by the USPTO.