IP Library Granted Patent US 12,032,682
Granted Patent B2
US 12,032,682 · App. 17/388,001 · Granted Jul 9, 2024

Systems and methods for improving accuracy in recognizing and neutralizing injection attacks in computer services

Inventor: Kunal Anand (Marina Del Rey, CA)
Assignee: Imperva, Inc.
G06F21/54G06F21/554H04L63/1416H04L63/1466G06F2221/031
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 12,032,682
App. No.
17/388,001
Granted
Jul 9, 2024
Kind
B2
Abstract

Systems and methods for analyzing SQL queries for constraint violations for injection attacks. Tokenizing a SQL query generates a token stream. A parse tree is constructed by iterating over lexical nodes of the token stream. The parse tree is compared to a SQL schema and access configuration for a database in order to analyze the SQL query for constraint violations. Evaluation flaws are also detected. A step-wise, bottom-up approach is employed to walk through the parse tree to detect types and to ascertain from those types whether the condition for SQL execution is static or dynamic. SQL request security engine logic refers to predetermined protective action data and takes the particular type of action specified by the predetermined protective action data. Security is further enhanced by limiting service of requests to requests of one or more specific, accepted data types. Each request is parsed into individual data elements, each an associated key-value pair. If the key is any data element of the request matches a predetermined allowed key, detection and neutralization of any injection attack in the associated value data of the data element is bypassed. A number of patterns that match information to be obscured in logs are established and any matching information is replaced with obscured data. When recording information to the logs, any data whose key is a predetermined masked key is replaced with obscured data.

Claims (44)

1. A method for handing of injection attacks in requests for computer services, the method comprising:

receiving first request data that represents a first service to be provided by a server computer;

parsing first content-type data from the first request data wherein the first content-type data specifies a particular data type of at least a substantive portion of the first request data wherein the substantive portion of the first request data specifies the first service to be provided by the server computer;

determining whether the particular data type is one of one or more predetermined allowed data types based on accessing a list of data types included in protective behavior settings for a query security engine;

upon a condition in which the particular data type is one of the predetermined allowed data types, processing the first request data by performing the first service;

receiving second request data that is distinct from the first request data and that represents a second service to be provided by a server computer that is distinct from the first service;

determining that the second request data includes no content-type data that specifies a particular data type of at least a substantive portion of the second request data wherein the substantive portion of the second request data specifies the second service;

determining whether omission of content-type data from request data is permitted based on accessing an omission flag included in the protective behavior settings for the query security engine, wherein the omission flag indicates whether requests without an explicit data type are allowed; and

upon a condition in which omission of content-type data from request data is permitted, processing the second request data by performing the second service.

2. The method of claim 1 further comprising:

receiving third request data that is distinct from the first request data and the second request data, and that represents a third service to be provided by a server computer and that is distinct from the first service and the second service;

parsing second content-type data from the third request data wherein the second content-type data is distinct from the first content-type data and specifies a particular data type of at least a substantive portion of the third request data wherein the substantive portion of the third request data specifies the third service;

determining whether the particular data type of the third request data is one of the predetermined allowed data types based on accessing the allowed data types included in the protective behavior settings for the query security engine; and

upon a condition in which the particular data type of the third request data is not one of the predetermined allowed data types, refusing to process the third request data and not performing the third service.

3. A set of one or more non-transitory machine-readable storage media storing instructions which, when executed by one or more processors of a computer system, causes the computer system to perform operations for handling injection attacks in requests for computer services, the operations comprising:

receiving first request data that represents a first service to be provided by a server computer;

parsing first content-type data from the first request data wherein the first content-type data specifies a particular data type of at least a substantive portion of the first request data wherein the substantive portion of the first request data specifies the first service to be provided by the server computer;

determining whether the particular data type is one of one or more predetermined allowed data types based on accessing a list of data types included in protective behavior settings for a query security engine;

upon a condition in which the particular data type is one of the predetermined allowed data types, processing the first request data by performing the first service;

receiving second request data that is distinct from the first request data and that represents a second service to be provided by a server computer that is distinct from the first service;

determining that the second request data includes no content-type data that specifies a particular data type of at least a substantive portion of the second request data wherein the substantive portion of the second request data specifies the second service;

determining whether omission of content-type data from request data is permitted based on accessing an omission flag included in the protective behavior settings for the query security engine, wherein the omission flag indicates whether requests without an explicit data type are allowed; and

upon a condition in which omission of content-type data from request data is permitted, processing the second request data by performing the second service.

4. The set of one or more non-transitory machine-readable storage media of claim 3 , wherein the operations further comprise:

receiving third request data that is distinct from the first request data and the second request data, and that represents a third service to be provided by a server computer and that is distinct from the first service and the second service;

parsing second content-type data from the third request data wherein the second content-type data is distinct from the first content-type data and specifies a particular data type of at least a substantive portion of the third request data wherein the substantive portion of the third request data specifies the third service;

determining whether the particular data type of the third request data is one of the predetermined allowed data types based on accessing the allowed data types included in the protective behavior settings for the query security engine; and

upon a condition in which the particular data type of the third request data is not one of the predetermined allowed data types, refusing to process the third request data and not performing the third service.

5. A computing system to handle injection attacks in requests for computer services, the computer system comprising:

one or more processors; and

a non-transitory machine-readable storage medium having instructions stored therein, which when executed by the one or more processors, causes the computing system to:

receive first request data that represents a first service to be provided by a server computer;

parse first content-type data from the first request data wherein the first content-type data specifies a particular data type of at least a substantive portion of the first request data wherein the substantive portion of the first request data specifies the first service to be provided by the server computer;

determine whether the particular data type is one of one or more predetermined allowed data types based on accessing a list of data types included in protective behavior settings for a query security engine;

upon a condition in which the particular data type is one of the predetermined allowed data types, process the first request data by performing the first service;

receive second request data that is distinct from the first request data and that represents a second service to be provided by a server computer that is distinct from the first service;

determine that the second request data includes no content-type data that specifies a particular data type of at least a substantive portion of the second request data wherein the substantive portion of the second request data specifies the second service;

determine whether omission of content-type data from request data is permitted based on accessing an omission flag included in the protective behavior settings for the query security engine, wherein the omission flag indicates whether requests without an explicit data type are allowed; and

upon a condition in which omission of content-type data from request data is permitted, process the second request data by performing the second service.

6. The computing system of claim 5 , wherein the instructions, when executed by the one or more processors, further causes the computing system to:

receive third request data that is distinct from the first request data and the second request data, and that represents a third service to be provided by a server computer and that is distinct from the first service and the second service;

parse second content-type data from the third request data wherein the second content-type data is distinct from the first content-type data and specifies a particular data type of at least a substantive portion of the third request data wherein the substantive portion of the third request data specifies the third service;

determine whether the particular data type of the third request data is one of the predetermined allowed data types based on accessing the allowed data types included in the protective behavior settings for the query security engine; and

upon a condition in which the particular data type of the third request data is not one of the predetermined allowed data types, refuse to process the third request data and not performing the third service.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 2, 2022
From: PREVOTY, INC.
To: IMPERVA, INC.
Reel/Frame 059786/0372 →
CHANGE OF ASSIGNEE ADDRESS Recorded Feb 23, 2022
From: PREVOTY, INC.
To: PREVOTY, INC.
Reel/Frame 059353/0953 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 5, 2021
From: ANAND, KUNAL
To: PREVOTY, INC.
Reel/Frame 058038/0132 →
Continuity (6)
Division 16015980 · Jun 22, 2018
Continuation In Part 15268510 · Sep 16, 2016
Continuation In Part 14599978 · Jan 19, 2015
Provisional Application 62220903 · Sep 18, 2015
Provisional Application 61929474 · Jan 20, 2014
Related Publication 20220019658A1 · Jan 20, 2022