IP Library › Granted Patent US 11,374,966
Granted Patent B2
US 11,374,966 · App. 16/218,752 · Granted Jun 28, 2022

Robust and transparent persistence of taint information to enable detection and mitigation of injection attacks

Inventor: Martin Johns (Karlsruhe, DE)
Assignee: SAP SE
H04L63/1466G06F16/221G06F16/245G06F16/248G06F16/252
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,374,966
App. No.
16/218,752
Granted
Jun 28, 2022
Kind
B2
Abstract

Methods, systems, and computer-readable storage media for receiving, by a database connector having a taint extension, a SQL request from an application, sending, by the taint extension, the SQL request to a SQL parser, receiving, by the taint extension, a structural representation of the SQL request from the SQL parser, adding, by the taint extension, taint information corresponding to data within the SQL request to provide an enhanced SQL statement, and transmitting, by the database connector, the enhanced SQL statement to a database for storing the taint information with the data.

Claims (43)

1. A computer-implemented method for persisting taint information, the method being executed by one or more processors and comprising:

receiving, by a database connector having a taint extension, a SQL request in string form from an application, the application being taint-aware to associate taint information with data processed by the application, the database connector provided within an application server that executes the application and enabling communication between the application and a database that is external to the application server, the taint extension provided as a wrapper to the database connector and exclusively executing taint-processing changes in response to received SQL requests;

sending, by the taint extension, the SQL request to a SQL parser, the SQL parser executing external to the application server and the taint extension maintaining an interface to the SQL parser;

receiving, by the taint extension, a structural representation of the SQL request from the SQL parser, the structural representation of the SQL request comprising a parse tree transformed from the SQL request and taint information corresponding to data within the SQL request, the taint information being inserted as child nodes of the parse tree by the SQL parser, each child node having a same ancestor node as child nodes of respective data within the parse tree;

rewriting, by the taint extension, the SQL request based on the structural representation of the SQL request to provide an enhanced SQL statement in string form by adding taint information corresponding to data within the SQL request and maintain maintain a signature in the SQL request;

transmitting, by the database connector, the enhanced SQL statement to the database for storing the taint information with the data;

receiving, by the database connector, a query result;

processing, by the taint extension, the query result to combine taint meta-data with one or more string values to provide a taint-aware query result; and

returning the taint-aware query result to the application.

2. The method of claim 1 , wherein the SQL request comprises a write statement, and in response, unfolding is performed to separate the data and the taint information.

3. The method of claim 1 , wherein the SQL request comprises a read statement, and in response, folding is performed to combine the data and the taint information.

4. The method of claim 1 , wherein the taint extension reserializes the data and the taint information to provide the enhanced SQL query.

5. The method of claim 1 , wherein the taint information is stored within one of shadow tables, and shadow columns within the database.

6. The method of claim 1 , wherein the database connector comprises an application programming interface (API).

7. A non-transitory computer-readable storage medium coupled to one or more processors and having instructions stored thereon which, when executed by the one or more processors, cause the one or more processors to perform operations for persisting taint information, the operations comprising:

receiving, by a database connector having a taint extension, a SQL request in string form from an application, the application being taint-aware to associate taint information with data processed by the application, the database connector provided within an application server that executes the application and enabling communication between the application and a database that is external to the application server, the taint extension provided as a wrapper to the database connector and exclusively executing taint-processing changes in response to received SQL requests;

sending, by the taint extension, the SQL request to a SQL parser, the SQL parser executing external to the application server and the taint extension maintaining an interface to the SQL parser;

receiving, by the taint extension, a structural representation of the SQL request from the SQL parser, the structural representation of the SQL request comprising a parse tree transformed from the SQL request and taint information corresponding to data within the SQL request, the taint information being inserted as child nodes of the parse tree by the SQL parser, each child node having a same ancestor node as child nodes of respective data within the parse tree;

rewriting, by the taint extension, the SQL request based on the structural representation of the SQL request to provide an enhanced SQL statement in string form by adding taint information corresponding to data within the SQL request and maintain maintain a signature in the SQL request;

transmitting, by the database connector, the enhanced SQL statement to the database for storing the taint information with the data,

receiving, by the database connector, a query result;

processing, by the taint extension, the query result to combine taint meta-data with one or more string values to provide a taint-aware query result; and

returning the taint-aware query result to the application.

8. The computer-readable storage medium of claim 7 , wherein the SQL request comprises a write statement, and in response, unfolding is performed to separate the data and the taint information.

9. The computer-readable storage medium of claim 7 , wherein the SQL request comprises a read statement, and in response, folding is performed to combine the data and the taint information.

10. The computer-readable storage medium of claim 7 , wherein the taint extension reserializes the data and the taint information to provide the enhanced SQL query.

11. The computer-readable storage medium of claim 7 , wherein the taint information is stored within one of shadow tables, and shadow columns within the database.

12. The computer-readable storage medium of claim 7 , wherein the database connector comprises an application programming interface (API).

13. A system, comprising:

a computing device; and

a computer-readable storage device coupled to the computing device and having instructions stored thereon which, when executed by the computing device, cause the computing device to perform operations for persisting taint information, the operations comprising:

receiving, by a database connector having a taint extension, a SQL request in string form from an application, the application being taint-aware to associate taint information with data processed by the application, the database connector provided within an application server that executes the application and enabling communication between the application and a database that is external to the application server, the taint extension provided as a wrapper to the database connector and exclusively executing taint-processing changes in response to received SQL requests;

sending, by the taint extension, the SQL request to a SQL parser, the SQL parser executing external to the application server and the taint extension maintaining an interface to the SQL parser;

receiving, by the taint extension, a structural representation of the SQL request from the SQL parser, the structural representation of the SQL request comprising a parse tree transformed from the SQL request and taint information corresponding to data within the SQL request, the taint information being inserted as child nodes of the parse tree by the SQL parser, each child node having a same ancestor node as child nodes of respective data within the parse tree;

rewriting, by the taint extension, the SQL request based on the structural representation of the SQL request to provide an enhanced SQL statement in string form by adding taint information corresponding to data within the SQL request and maintain a signature in the SQL request;

transmitting, by the database connector, the enhanced SQL statement to the database for storing the taint information with the data;

receiving, by the database connector, a query result;

processing, by the taint extension, the query result to combine taint meta-data with one or more string values to provide a taint-aware query result; and

returning the taint-aware query result to the application.

14. The system of claim 13 , wherein the SQL request comprises a write statement, and in response, unfolding is performed to separate the data and the taint information.

15. The system of claim 13 , wherein the SQL request comprises a read statement, and in response, folding is performed to combine the data and the taint information.

16. The system of claim 13 , wherein the taint extension reserializes the data and the taint information to provide the enhanced SQL query.

17. The system of claim 13 , wherein the taint information is stored within one of shadow tables, and shadow columns within the database.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 13, 2018
From: JOHNS, MARTIN
To: SAP SE
Reel/Frame 047771/0833 →
Continuity (1)
Related Publication 20200195686A1 · Jun 18, 2020