IP Library Granted Patent US 8,528,095
Granted Patent B2
US 8,528,095 · App. 12/825,293 · Granted Sep 3, 2013

Injection context based static analysis of computer software applications

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 8,528,095
App. No.
12/825,293
Granted
Sep 3, 2013
Kind
B2
Abstract

Embodiments of the invention generally relate to injection context based static analysis of computer software applications. Embodiments of the invention may include selecting a sink within a computer software application, tracing a character output stream leading to the sink within the computer software application, determining an injection context of the character output stream at the sink, where the injection context is predefined in association with a state of the character output stream at the sink, identifying any actions that have been predefined in association with the identified injection context, and providing a report of the actions.

Claims (48)

1. A computer system for injection context based static analysis of computer software applications, comprising:

a sink selector configured to select a sink within a computer software application of the computer system, the sink comprising one or more lines of computer code within the computer software application, the one or more lines of code being bound to external data comprising a character output stream received from a data source that is external to the computer system, wherein said sink selector is configured to identify a sink type associated with said sink, the sink type comprising one of hypertext markup language (HTML), structured query language (SQL), and cross-site scripting;

an output stream tracer configured to:

based on selection of the sink, trace the character output stream leading to said sink within said computer software application; and

determine an injection context of said character output stream at said sink, wherein said injection context has a predefined association with a state of said character output stream at said sink; and

a context action identifier configured to:

identify one or more actions that are associated with said determined injection context; and

provide a report including the identified one or more actions,

wherein said sink selector, output stream tracer, and context action identifier are implemented in at least one of: a) computer hardware, and b) computer software embodied in a physically-tangible computer-readable storage medium.

2. The system according to claim 1 wherein said output stream tracer is configured to determine said injection context by:

selecting an automaton that has been predefined for a sink type with which said sink is associated, the sink type comprising one of hypertext markup language (HTML), structured query language (SQL), and cross-site scripting; and

traversing said automaton by testing a plurality of characters in said character output stream in view of at least one transition condition predefined for said automaton.

3. The system according to claim 2 wherein said testing begins at the origin of said character output stream.

4. The system according to claim 2 wherein said testing ends with a last character in said character output stream at said sink.

5. The system according to claim 1 wherein said one or more actions include suggesting a predefined code sanitizer to protect against code injection attacks that exploit said identified injection context.

6. The system according to claim 1 wherein said one or more actions include suggesting the use of one or more predefined remediation actions to protect against code injection attacks that use the identified injection context.

7. The system according to claim 1 wherein said one or more actions include suggesting the use of one or more predefined exploits and payload characteristics for testing vulnerability of an application to code injection attacks that use the identified injection context.

8. The system according to claim 1 wherein said report identifies said sink, indicates a sink type, the sink type comprising one of hypertext markup language (HTML), structured query language (SQL), and cross-site scripting, associated with said sink, indicates said identified injection context, and enumerates said identified actions.

9. A method for injection context based static analysis of computer software applications, the method comprising:

selecting a sink within a computer software application of a computer system, the sink comprising one or more lines of computer code within the computer software application, the one or more lines of code being bound to external data comprising a character output stream received from a data source that is external to the computer system;

identifying a sink type associated with said sink, the sink type comprising one of hypertext markup language (HTML), structured query language (SQL), and cross-site scripting;

based on selection of the sink, tracing the character output stream leading to said sink within said computer software application;

determining an injection context of said character output stream at said sink, wherein said injection context has a predefined association with a state of said character output stream at said sink;

identifying one or more actions that are associated with said identified injection context; and

providing a report of said one or more actions.

10. The method according to claim 9 wherein determining the injection context comprises:

selecting an automaton that has been predefined for a sink type with which said sink is associated, the sink type comprising one of hypertext markup language (HTML), structured query language (SQL), and cross-site scripting; and

traversing said automaton by testing a plurality of characters in said character output stream in view of at least one transition condition predefined for said automaton.

11. The method according to claim 10 wherein said testing begins at the origin of said character output stream.

12. The method according to claim 10 wherein said testing ends with a last character in said character output stream at said sink.

13. The method according to claim 9 wherein identifying one or more actions comprises:

identifying one or more actions that include suggesting the use of a predefined code sanitizer to protect against code injection attacks that exploit said identified injection context.

14. The method according to claim 9 wherein identifying one or more actions comprises:

identifying one or more actions that include suggesting the use of one or more predefined remediation actions to protect against code injection attacks that use the identified injection context.

15. The method according to claim 9 wherein identifying one or more actions comprises:

identifying one or more actions that include suggesting the use of one or more predefined exploits and payload characteristics for testing vulnerability of an application to code injection attacks that use the identified injection context.

16. The method according to claim 9 wherein providing the report of said one or more actions comprises:

providing said report identifying said sink, indicating a sink type, the sink type comprising one of hypertext markup language (HTML), structured query language (SQL), and cross-site scripting, associated with said sink, indicating said identified injection context, and enumerating said identified actions.

17. A computer program product for injection context based static analysis of computer software applications, the computer program product comprising:

a computer-readable storage medium; and

computer-readable program code embodied in said computer-readable storage medium, wherein said computer-readable program code is configured to:

select a sink within a computer software application of a computer system, the sink comprising one or more lines of computer code within the computer software application, the one or more lines of code being bound to external data comprising a character output stream received from a data source that is external to the computer system;

identify a sink type associated with said sink, the sink type comprising one of hypertext markup language (HTML), structured query language (SQL), and cross-site scripting;

based on selection of the sink, trace the character output stream leading to said sink within said computer software application;

determine an injection context of said character output stream at said sink, wherein said injection context has a predefined association with a state of said character output stream at said sink;

identify one or more actions associated with said identified injection context; and

provide a report of said one or more actions.

18. The system according to claim 1 , wherein the sink comprises one or more lines of computer code configured to print the character output stream to a display of the computer system.

Assignments (1)
CONVEYOR IS ASSIGNING UNDIVIDED 50% INTEREST Recorded Nov 8, 2017
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: SERVICENOW, INC.; INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 044413/0124 →