Injection Detection via Statement Risk Element Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
SQL injection attacks are notoriously difficult to detect as they leave no trace and conventional approaches generate high numbers of false positives, making them time-consuming and prone to errors, due to the need for manual verification of individual text elements in SQL queries.
Innovation Solution
A full statement analysis approach is taken where entire text statements are analyzed prior to execution, using predefined restrictions such as whitelists, blacklists, and restricted occurrence whitelists to ensure only allowed elements are executed, with unknown elements being neutralized to prevent malicious functionality.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional approaches analyze individual text elements in SQL queries, then detection coverage is improved, but false positives increase and manual verification time increases
Solution Approach 1:
The patent segments the SQL query analysis into two distinct levels: (1) syntax-level analysis that parses the query structure and identifies individual text elements, and (2) semantic-level analysis that evaluates the meaning and intent of complete query statements. This segmentation allows automated analysis at the element level while requiring manual verification only at the statement level, significantly reducing manual verification time while maintaining detection coverage.
Solution Approach 2:
The patent introduces an intermediary semantic analysis layer that acts as a mediator between individual text elements and the final security determination. This intermediary evaluates the context and meaning of grouped elements, filtering out false positives before they reach manual verification, thus reducing the time burden on analysts while preserving reliable detection.
2Reliability
If entire text statements are analyzed using full statement analysis, then false positives are reduced, but processing complexity increases
Solution Approach 1:
The patent divides the full statement analysis into hierarchical segments: syntax analysis of individual elements, semantic analysis of element groups, and contextual analysis of complete statements. This segmentation reduces processing complexity by breaking down the complex task into manageable, automated stages, requiring manual intervention only at the final evaluation stage.
Solution Approach 2:
The patent performs preliminary syntax and semantic analysis of text statements before they reach manual verification. By pre-processing and filtering statements at automated stages, the system reduces false positives early in the workflow, thereby reducing the burden on manual verification while maintaining analysis depth.
3Reliability
If risk elements are restricted to prevent injection attacks, then security is improved, but developer flexibility decreases
Solution Approach 1:
The patent applies different quality controls to different parts of the query based on their risk profile. Syntax-level elements are analyzed with strict security rules, while semantic-level contexts are evaluated with greater flexibility. This allows risk elements to be restricted where necessary for security while maintaining developer flexibility in legitimate use cases.
Solution Approach 2:
The patent implements dynamic analysis that adapts the level of restriction applied to risk elements based on contextual evaluation. Rather than applying static, uniform restrictions, the system dynamically adjusts security measures based on the semantic meaning and context of each statement, preserving developer flexibility while maintaining security.
Data Source
AI summary
An illustrative injection detection system receives a text statement that includes a set of text elements and implements instructions for performing an operation with respect to a data structure. The system identifies a target risk element count equal to a number of risk elements preapproved to occur within the set of text elements of the text statement. The system also determines a detected risk element count equal to a number of risk elements that occur within the set of text elements of the text statement. If the system detects a violation of a predetermined rule defining an acceptable relationship between the target and detected risk element counts for the text statement, the system triggers an exception condition indicating a risk that the text statement corresponds to an injection attack on the data structure. Corresponding methods and systems are also disclosed.


