Automatic Binary Code Understanding
AssigneeMicrosoft Technology Licensing, LLC
InventorsWeiwei YANG, Xin JIN, Jonathan Karl LARSON, Michael T. WALKER, Dustin Richard FRAZE
Life of this patent
Estimating the term…
Abstract
The description relates to automated binary code summarization. In one example, a binary code summarization tool receives binary code and combines the received binary code with natural language in a prompt for a large language model (LLM). The binary code summarization tool receives a semantic summarization from the LLM relating to the received binary code and evaluates the new semantic summarization for malicious functionality in the received binary code.
Claims21
1-20. (canceled)
A device-implemented method comprising:
- receiving binary code provided in one or more executable files;
- retrieving a selected prompt, the selected prompt having been obtained based at least on a corresponding comprehension quality metric for an interpretation task relating to other binary code provided in one or more other executable files;
- inputting a representation of the binary code to a generative language model with the selected prompt, the selected prompt instructing the generative language model to generate a semantic summarization of the binary code;
- receiving the generated semantic summarization of the binary code from the generative language model, the semantic summarization being generated by the generative language model by evaluating the binary code according to the selected prompt, wherein the selected prompt adapts the generative language model via in-context learning to capture semantics of the binary code;
- and
- outputting data characterizing functionality of the binary code based at least on the generated semantic summarization.
A system, comprising:
- storage hardware configured to store computer-readable instructions;
- and
- a processor configured to execute the computer-readable instructions, wherein, when executed, the computer-readable instructions cause the processor to:
- receive binary code provided in one or more executable files;
- retrieve a selected prompt, the selected prompt having been obtained based at least on a corresponding comprehension quality metric for an interpretation task relating to other binary code provided in one or more other executable files;
- input a representation of the binary code to a generative language model with the selected prompt, the selected prompt instructing the generative language model to generate a semantic summarization of the binary code;
- receive the generated semantic summarization of the binary code from the generative language model, the semantic summarization being generated by the generative language model by evaluating the binary code according to the selected prompt, wherein the selected prompt adapts the generative language model via in-context learning to capture semantics of the binary code;
- and
- output data characterizing functionality of the binary code based at least on the generated semantic summarization.
A hardware computer-readable storage device storing computer-readable instructions which, when executed, by processing hardware, cause the processing hardware to perform acts comprising:
- receiving binary code provided in one or more executable files;
- retrieving a selected prompt, the selected prompt having been obtained based at least on a corresponding comprehension quality metric for an interpretation task relating to other binary code provided in one or more other executable files;
- inputting a representation of the binary code to a generative language model with the selected prompt, the selected prompt instructing the generative language model to generate a semantic summarization of the binary code;
- receiving the generated semantic summarization of the binary code from the generative language model, the semantic summarization being generated by the generative language model by evaluating the binary code according to the selected prompt, wherein the selected prompt adapts the generative language model via in-context learning to capture semantics of the binary code;
- and
- outputting data characterizing functionality of the binary code based at least on the generated semantic summarization.
Dependencies are inferred from the claim text.