IP Library Granted Patent US 11,620,119
Granted Patent B2
US 11,620,119 · App. 16/817,550 · Granted Apr 4, 2023

Function summarization via type inference

Inventors: Andrew Ralph Calvano (Draper, UT); Timothy Bryant (Indialantic, FL)
Assignee: RAYTHEON COMPANY
G06F8/437G06F8/75G06F11/3604G06F16/24
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,620,119
App. No.
16/817,550
Granted
Apr 4, 2023
Kind
B2
Abstract

A system and method for function summarization. In some embodiments, the method includes: identifying a basic function called by a first function, the first function having a signature; determining a first type, the first type being a type of an argument of the basic function or a type of a return value of the basic function; and propagating the first type, to determine a first portion of the signature of the first function.

Claims (58)

1. A method, performed by one or more processors, for function summarization in an object code to determine malicious portions or vulnerabilities in the object code, the method comprising:

disassembling the object code by a disassembler software tool;

identifying a first function from the object code, the first function to be summarized having a signature;

analyzing the first function to determine whether the first function performs a call to a library function or to a system function;

creating a call graph of the first function representing a caller/callee relationships between functions in the object code, wherein the call graph incudes a root node corresponding to the first function, a second node corresponding to each function called by the first function;

converting the code of the first function to a single static assignment (SSA) form;

computing points to sets and abstract memory locations for the SSA form;

creating a data flow graph encoding one or more basic blocks, connected by edges, wherein a define location in the dataflow graph corresponds to a location in the object code where the SSA form or abstract memory location was defined or assigned, and a use location corresponding to a location of the SSA form or an abstract memory location that was used;

traversing over the data flow graph starting from a define location to propagate types to determine a type of one or more arguments or one or more return values of the first function to be summarized and obtain a portion of the signature of the first function, wherein

when the first function to be summarized, in calling a library function, passes a first variable as an argument to the library function, a type of the first variable is inferred from a type that the library function requires for the argument it receives, which is inferred from a known signature of the library function required for the argument it receives, which is inferred from a known signature of the library function, wherein the type of the first variable, in the first function is inferred from a subsequent use of the first variable as an argument passed to the library function, and wherein

when the first function to be summarized, in calling a library function, receives a third variable as a return value from the library function, a type of the third variable, which is defined by the call to the library function, is inferred from a type that the library function returns, which is inferred from the known signature of the library function, wherein the type of the third variable, in the first function is inferred from a previously occurring definition of the third variable as a return value returned by a library function;

determining a summary of the first function, based on the portion of the signature of the first function; and

executing a static analysis on the summary of the first function to determine malicious portions or vulnerabilities in the object code.

2. The method of claim 1 , wherein the propagating of the first type comprises propagating the first type based on object code.

3. The method of claim 1 , comprising determining the entire signature of the first function, the determining of the entire signature of the first function comprising the propagating of the first type, to determine the first portion of the signature of the first function.

4. The method of claim 3 , further comprising determining, based on the entire signature of the first function, a summary of the first function,

wherein the determining of the summary comprises looking up the entire signature in a summarization database.

5. The method of claim 1 , wherein the basic function is a library function.

6. The method of claim 1 , wherein the first type is a type of an argument of the basic function.

7. The method of claim 6 , further comprising:

determining a second type, the second type being a type of a return variable of the basic function; and

propagating the second type, to determine a second portion of the signature of the first function.

8. The method of claim 7 , wherein:

the propagating of the first type comprises propagating the first type backward, and

the first portion of the signature comprises a type of an argument of the first function.

9. The method of claim 7 , wherein:

the propagating of the second type comprises propagating the second type forward, and

the second portion of the signature comprises a type of a return value of the first function.

10. The method of claim 9 , wherein:

the propagating of the first type further comprises propagating the first type forward, and

the first portion of the signature further comprises a type of a return value of the first function.

11. The method of claim 10 , wherein:

the propagating of the second type further comprises propagating the first type backward, and

the second portion of the signature further comprises a type of an argument of the first function.

12. The method of claim 10 , wherein the combination of the first portion of the signature and the second portion of the signature is the entire signature.

13. The method of claim 1 , wherein the first portion of the signature is the entire signature.

14. The method of claim 1 , further comprising:

identifying the first function as a function called by a second function;

determining a second type, the second type being a type of an argument of the first function or a type of a return value of the first function; and

propagating the second type, to determine a first portion of the signature of the second function.

15. The method of claim 14 , further comprising determining, based on the portion of the signature of the second function, a summary of the second function.

16. The method of claim 14 , comprising determining the entire signature of the second function, the determining of the entire signature of the second function comprising the propagating of the second type, to determine the first portion of the signature of the second function.

17. A system for function summarization in an object code to determine malicious portions or vulnerabilities in the object code, the system comprising a processing circuit and a memory, the memory storing instructions that, when executed by the processing circuit, cause the processing circuit to:

disassemble the object code by a disassembler software tool;

identify first function from the object code, the first function to be summarized having a signature;

analyze the first function to determine whether the first function performs a call to a library function or to a system function;

create a call graph of the first function representing a caller/callee relationships between functions in the object code, wherein the call graph incudes a root node corresponding to the first function, a second node corresponding to each function called by the first function;

convert the code of the first function to a single static assignment (SSA) form;

compute points-to sets and abstract memory locations for the SSA form;

create a data flow graph encoding one or more basic blocks, connected by edges, wherein a define location in the dataflow graph corresponds to a location in the object code where the SSA form or abstract memory location was defined or assigned, and a use location corresponding to a location of the SSA form or an abstract memory location that was used;

traverse over the data flow graph starting from a define location to propagate types to determine a type of one or more arguments or one or more return values of the first function to be summarized and obtain a portion of the signature of the first function, wherein

when the first function to be summarized, in calling a library function, passes a first variable as an argument to the library function, a type of the first variable is inferred from a type that the library function requires for the argument it receives, which is inferred from a known signature of the library function required for the argument it receives, which is inferred from a known signature of the library function, wherein the type of the first variable, in the first function is inferred from a subsequent use of the first variable as an argument passed to the library function, and wherein

when the first function to be summarized, in calling a library function, receives a third variable as a return value from the library function, a type of the third variable, which is defined by the call to the library function, is inferred from a type that the library function returns, which is inferred from the known signature of the library function, wherein the type of the third variable, in the first function is inferred from a previously occurring definition of the third variable as a return value returned by a library function;

determine a summary of the first function, based on the portion of the signature of the first function; and

execute a static analysis on the summary of the first function to determine malicious portions or vulnerabilities in the object code.

18. The system of claim 17 , wherein the propagating of the first type comprises propagating the first type based on object code.

19. The system of claim 18 , comprising determining the entire signature of the first function; and further comprising determining the summary of the first function by looking up the entire signature in a summarization database,

the determining of the entire signature of the first function comprising the propagating of the first type, to determine the first portion of the signature of the first function.

Assignments (4)
CHANGE OF NAME Recorded Jul 3, 2024
From: COLUMBUS BUYER LLC
To: NIGHTWING GROUP, LLC
Reel/Frame 068106/0251 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 2, 2024
From: RAYTHEON COMPANY
To: COLUMBUS BUYER LLC
Reel/Frame 068233/0420 →
SECURITY INTEREST Recorded Apr 1, 2024
From: COLUMBUS BUYER LLC; RAYTHEON BLACKBIRD TECHNOLOGIES, INC.; RAYTHEON FOREGROUND SECURITY, INC.
To: WELLS FARGO BANK, N.A., AS COLLATERAL AGENT
Reel/Frame 066960/0411 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 10, 2020
From: CALVANO, ANDREW R.; BRYANT, TIMOTHY
To: RAYTHEON COMPANY
Reel/Frame 052896/0201 →