IP Library Granted Patent US 9,081,961
Granted Patent B2
US 9,081,961 · App. 13/156,971 · Granted Jul 14, 2015

System and method for analyzing malicious code using a static analyzer

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 9,081,961
App. No.
13/156,971
Granted
Jul 14, 2015
Kind
B2
Abstract

Analyzing computer code using a tree is described. For example, a client device generates a data request for retrieving data from a non-trusted entity via a network. A gateway is communicatively coupled to the client device and to the network. The gateway is configured to receive computer code from the non-trusted entity via the network. The gateway builds a tree representing the computer code. The tree has one or more nodes. A node of the tree represents a statement from the computer code. The gateway analyzes the statement to identify symbol data. The symbol data describes a name of the variable and the value of the variable. The gateway stores the symbol data in a symbol table.

Claims (67)

1. A computer-implemented method comprising:

parsing, via a processor, computer code received from a non-trusted entity via a network, the computer code received by a gateway when sent by the non-trusted entity to a client device in response to a request from the client device;

transforming, via the processor, the parsed computer code into an abstract syntax tree, the abstract syntax tree containing a first node having a statement from the parsed computer code;

analyzing, via the processor, the statement in the first node to determine if the statement contains a user-defined function;

in response to determining that the statement in the first node does not contain the user-defined function, executing the statement; and

determining the computer code is malicious by comparing a result of the execution of the statement in the first node to a set of rules denoting malicious behavior.

2. The computer-implemented method according to claim 1 , wherein analyzing the statement in the first node to determine if the statement contains theuser-defined function further comprises:

identifying a variable contained in the first node;

identifying symbol data describing the variable, the symbol data including a name of the variable and a value associated with the variable; and

storing the symbol data in a symbol table.

3. The computer-implemented method according to claim 2 , further comprising:

determining context data associated with the statement, the context data describing a scope of the statement;

caching the context data in a context table; and

associating the context data in the context table with corresponding symbol data in the symbol table.

4. The computer-implemented method according to claim 1 , further comprising:

determining if the first node includes a probe function; and

in response to determining that the first node does not include the probe function, inserting the probe function in the first node.

5. The computer-implemented method according to claim 1 , further comprising:

determining if the statement in the first node is a simple statement, the simple statement being a statement having a basic language operator applied to a variable and a function code associated with a standard library of a programming language of the computer code.

6. The computer-implemented method according to claim 2 , wherein executing the statement further comprises:

detecting induced changes to the symbol data after executing the statement; and

updating the symbol table to reflect the induced changes to the symbol data.

7. The computer-implemented method according to claim 1 , further comprising, in response to determining that the computer code is malicious, blocking the computer code.

8. A tangible computer readable storage device or storage disc comprising instructions that, when executed, cause a gateway device to at least:

parse computer code received from a non-trusted entity via a network, the computer code received by the gateway when sent by the non-trusted entity to a client device in response to a request from the client device;

generate an abstract syntax tree from the parsed computer code, the abstract syntax tree containing a first node having a statement from the parsed computer code;

determine if the statement in the first node contains a user-defined function;

in response to determining that the statement in the first node does not contain the user-defined function, executing the statement; and

determine the computer code is malicious by comparing a result of the execution of the statement in the first node to a set of rules denoting malicious behavior.

9. The tangible computer readable storage device or storage disc of claim 8 , wherein the instructions further cause the gateway device to:

identify a variable contained in the first node;

identify symbol data describing the variable, the symbol data including a name of the variable and a value associated with the variable; and

store the symbol data in a symbol table.

10. The tangible computer readable storage device or storage disc of claim 8 , wherein the instructions further cause the gateway device to:

determine context data associated with the statement, the context data describing a scope of the statement;

cache the context data in a context table; and

associate the context data in the context table with corresponding symbol data in the symbol table.

11. The tangible computer readable storage device or storage disc of claim 8 , wherein the instructions further cause the gateway device to:

determine if the first node includes a probe function; and

in response to determining that the first node does not include the probe function, inserting the probe function in the first node.

12. The tangible computer readable storage device or storage disc of claim 8 , wherein the instructions further cause the gateway device to determine if the statement in the first node is a simple statement, the simple statement being a statement having a basic language operator applied to a variable and a function code associated with a standard library of a programming language of the computer code.

13. The tangible computer readable storage device or storage disc of claim 9 , wherein the instructions further cause the gateway device to:

detect induced changes to the symbol data after executing the statement; and

update the symbol table to reflect the induced changes to the symbol data.

14. The tangible computer readable storage device or storage disc of claim 8 , wherein the instructions further cause the gateway device to, in response to the determination that the computer code is malicious, block the computer code.

15. A device comprising:

a memory; and

a processor configured to:

parse computer code received from a non-trusted entity via a network, the computer code received by a gateway when sent by the non-trusted entity to a client device in response to a request from the client device;

transform the parsed computer code into an abstract syntax tree, the abstract syntax tree containing a first node having a statement from the parsed computer code;

analyze the statement in the first node to determine if the statement contains a user-defined function;

in response to determining that the statement in the first node does not contain the user-defined function, executing the statement; and

determine the computer code is malicious by comparing a result of the execution of the statement in the first node to a set of rules denoting malicious behavior.

16. The device of claim 15 , wherein the processor is further configured to:

identify a variable contained in the first node;

identify symbol data describing the variable, the symbol data including a name of the variable and a value associated with the variable; and

store the symbol data in a symbol table.

17. The device of claim 16 , wherein the processor is further configured to:

determine context data associated with the statement, the context data describing a scope of the statement;

cache the context data in a context table; and

associate the context data in the context table with corresponding symbol data in the symbol table.

18. The device of claim 16 , wherein the processor is further configured to:

determine if the statement in the first node is a simple statement, the simple statement being a statement having a basic language operator applied to a variable and a function code associated with a standard library of a programming language of the computer code.

19. The device of claim 16 , wherein the processor is further configured to:

detect induced changes to the symbol data after executing the statement; and

update the symbol table to reflect the induced changes to the symbol data.

20. The device of claim 16 , wherein the processor is further configured to, in response to the determination that the computer code is malicious, block the computer code.

Assignments (14)
SECURITY INTEREST Recorded Feb 18, 2026
From: TRUSTWAVE HOLDINGS, INC.; STROZ FRIEDBERG INC.; STROZ FRIEDBERG, LLC
To: AT&T ENTERPRISES, LLC
Reel/Frame 073824/0146 →
SECURITY INTEREST Recorded Jan 30, 2026
From: TRUSTWAVE HOLDINGS, INC.; STROZ FRIEDBERG INC.; STROZ FRIEDBERG, LLC
To: ANKURA TRUST COMPANY, LLC
Reel/Frame 073649/0743 →
RELEASE OF SECURITY INTEREST RECORDED AT REEL/FRAME 071508/0540 Recorded Aug 18, 2025
From: LEVELBLUE, LLC
To: TRUSTWAVE HOLDINGS, INC.
Reel/Frame 072510/0679 →
SECURITY INTEREST Recorded Jun 24, 2025
From: TRUSTWAVE HOLDINGS, INC.
To: LEVELBLUE, LLC
Reel/Frame 071508/0540 →
RELEASE OF SECURITY INTEREST RECORDED AT REEL/FRAME 070952/0452 Recorded Jun 24, 2025
From: STG V, L.P.; STG VI, L.P.
To: TRUSTWAVE HOLDINGS, INC.
Reel/Frame 071723/0263 →
SECURITY INTEREST Recorded Apr 25, 2025
From: TRUSTWAVE HOLDINGS, INC.
To: STG V, L.P.; STG VI, L.P.
Reel/Frame 070952/0452 →
SECURITY INTEREST Recorded Oct 22, 2024
From: TRUSTWAVE HOLDINGS, INC.
To: CYBEREASON INC.
Reel/Frame 068974/0691 →
SECURITY INTEREST Recorded Sep 12, 2024
From: TRUSTWAVE HOLDINGS, INC.
To: CYBEREASON INC.
Reel/Frame 068572/0937 →
MERGER Recorded Feb 14, 2024
From: TW SECURITY CORP.
To: TRUSTWAVE HOLDINGS, INC.
Reel/Frame 066584/0338 →
SECURITY INTEREST Recorded Feb 14, 2024
From: TRUSTWAVE HOLDINGS, INC.
To: SINGTEL ENTERPRISE SECURITY (US), INC.
Reel/Frame 066584/0330 →
MERGER Recorded Mar 12, 2015
From: M86 SECURITY, INC.
To: TRUSTWAVE HOLDINGS, INC.
Reel/Frame 035147/0632 →
SECURITY AGREEMENT Recorded Aug 30, 2012
From: TRUSTWAVE HOLDINGS, INC.; TW SECURITY CORP.
To: WELLS FARGO CAPITAL FINANCE, LLC, AS AGENT
Reel/Frame 028885/0090 →
MERGER Recorded Aug 9, 2012
From: M86 SECURITY, INC.
To: TW SECURITY CORP.
Reel/Frame 028761/0156 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 9, 2011
From: YERMAKOV, ALEXANDER; KAPLAN, MARK
To: M86 SECURITY, INC.
Reel/Frame 026420/0262 →