Taint Extension for Persistent Injection Attack Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Taint information is irrevocably lost when tainted data is persisted in an application's database, leading to security issues such as stored XSS or second-order code injection, as existing data tainting solutions do not preserve taint information beyond the taint-aware runtime.

Innovation Solution

Implementing a database connector with a taint extension that receives SQL requests, adds taint information to the data, and stores it within the database using shadow columns or tables, ensuring taint information is persisted alongside the data, and restored when retrieved, without requiring changes to the application's code base.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If taint information is not persisted in the database, then the database structure remains simple and compatible with existing applications, but taint information is lost when data leaves the taint-aware runtime

Engineering Contradiction:
Improvetaint informationVSAvoiddatabase structure
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent introduces shadow columns as an intermediary mechanism to store taint information separately from the main data columns. These shadow columns act as mediators that preserve taint metadata without requiring changes to the application's data access patterns or core database structure, thus preventing information loss while minimizing structural complexity

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments the storage of data by separating it into two distinct components: the actual data stored in regular columns and the taint information stored in shadow columns. This segmentation allows taint information to be persisted independently without affecting the main database structure or requiring application code changes

Inventive Principle:
Principle #1Segmentation

2Reliability

If shadow columns are added to store taint information, then taint information can be persisted, but the database schema becomes more complex

Engineering Contradiction:
Improvetaint information persistenceVSAvoiddatabase schema
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

Shadow columns serve as intermediary storage structures that add persistence capability for taint information while maintaining a clear separation from the main data schema. This intermediary layer provides reliability for taint information storage without requiring complex integration with existing database operations or application logic

Inventive Principle:
Principle #24Intermediary (Mediator)

3Loss of information

If the application code base is modified to preserve taint information, then taint information can be maintained, but the ease of operation decreases

Engineering Contradiction:
Improvetaint informationVSAvoidapplication maintenance
Core Design Contradiction:
Loss of informationVSEase of operation

Solution Approach 1:

The system provides self-service functionality by automatically managing taint information persistence through the shadow column mechanism. The taint extension intercepts and processes SQL statements automatically, adding or removing shadow column operations without requiring application developers to manually modify their code to preserve taint information

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The taint extension acts as an intermediary layer between the application and database, automatically handling taint information persistence through shadow columns. This intermediary handles the complexity of taint management transparently, allowing applications to maintain ease of operation while still achieving reliable taint information preservation

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11374966B2Robust and transparent persistence of taint information to enable detection and mitigation of injection attacks
Publication Date: 2022.06.28 SAP SE
  • US11374966B2 patent drawing
  • US11374966B2 patent drawing
  • US11374966B2 patent drawing

AI summary

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.