Query Filter List Generation for Injection Attack Prevention

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Applications using query languages like SQL remain vulnerable to query language injection attacks due to the complexity of software, despite existing defenses, as they often fail to effectively identify and prevent malicious queries at runtime.

Innovation Solution

A method for generating a query filter list by transforming a set of training queries into a structure that relates predicates and accessed columns, normalizing this structure, and generating a generalized query that is added to the filter list, allowing for the comparison and determination of whether to execute target queries.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If query language injection defenses are implemented, then security against injection attacks is improved, but the complexity of software applications increases

Engineering Contradiction:
Improvesecurity against injection attacksVSAvoidcomplexity of software applications
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system performs preliminary action by transforming and normalizing training queries into a structure before runtime execution. The training queries are pre-processed to create a normalized structure that can be efficiently compared against target queries at runtime, eliminating the need for complex real-time analysis during query execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates a copy of the training queries and transforms them into a normalized structure that serves as a reference model. This copied and transformed structure is then used for comparison against target queries, allowing the system to leverage pre-existing knowledge without adding complexity to the core application logic.

Inventive Principle:
Principle #26Copying

2Measurement precision

If runtime query analysis is performed to detect malicious queries, then detection accuracy is improved, but the time required for query execution increases

Engineering Contradiction:
Improvedetection accuracy of malicious queriesVSAvoidtime required for query execution
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs preliminary transformation and normalization of training queries before runtime. By pre-processing the training data into a normalized structure, the system enables fast comparison against target queries without performing complex analysis during query execution, thus maintaining high detection accuracy while minimizing runtime overhead.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If a comprehensive set of training queries is used to generate the filter list, then the coverage of malicious query patterns is improved, but the size of the query filter list increases

Engineering Contradiction:
Improvecoverage of malicious query patternsVSAvoidsize of query filter list
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The system merges multiple training queries into a unified normalized structure by grouping entries according to accessed columns. This consolidation process combines the coverage of multiple individual queries into a single compact representation, maintaining comprehensive malicious query pattern coverage while significantly reducing the size of the query filter list.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The normalized structure serves as a universal representation that can match multiple different malicious query patterns. By creating a generalized structure from training queries, the system achieves multi-functionality where a single entry in the query filter list can detect multiple variants of malicious queries, reducing the overall number of entries needed.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS12292973B2Query generalization for prevention of injection attacks
Publication Date: 2025.05.06 ORACLE INT CORP
  • US12292973B2 patent drawing
  • US12292973B2 patent drawing
  • US12292973B2 patent drawing

AI summary

A method for generating a query filter list includes obtaining set of training queries, each training query comprising a predicate and one or more accessed columns returned from evaluating the predicate, and transforming the set of training queries into a structure. The structure relates, for an accessed column and a training query, the predicate and a correlation value to the accessed column. The method further includes normalizing the structure into a normalized structure. The normalized structure grouping entries in the structure according to accessed column. The method further includes generating a generalized query from the normalized structure, and adding the generalized query to the query filter list.