SQL Injection Detection via Database Stored Values
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for detecting SQL injection vulnerabilities in web applications are tedious, error-prone, and expensive, as they require manual testing and interpretation of varied webpage responses, making it difficult to ascertain vulnerabilities effectively.
Innovation Solution
The approach involves detecting SQL injection attack vulnerability by storing values invoked by attack functions in a database, where the presence of these values indicates the execution of injected SQL, serving as an audit record of the vulnerability, allowing for automated and efficient detection without disrupting application operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If manual testing and interpretation of webpage responses is used to detect SQL injection vulnerabilities, then detection accuracy can be achieved, but the process becomes tedious, error-prone, and time-consuming
Solution Approach 1:
The database performs self-service by automatically storing values returned from executed SQL statements. The detection system queries these stored values to identify SQL injection vulnerabilities, eliminating the need for manual testing and interpretation of webpage responses.
Solution Approach 2:
The stored values in the database serve as an intermediary between the SQL injection attack and the detection system. Instead of directly analyzing complex webpage responses, the system uses these pre-stored values as a simplified intermediate representation that directly indicates vulnerability presence.
2Difficulty of detecting and measuring
If manual testing methods are used to detect SQL injection vulnerabilities, then detection capability exists, but the process becomes expensive and resource-intensive
Solution Approach 1:
The database server performs self-service by automatically capturing and storing values from executed SQL statements. This eliminates the need for expensive manual testing resources, as the system uses its own existing infrastructure (database storage) to enable automated detection.
Solution Approach 2:
The system creates a copy of the SQL execution results in the form of stored values within the database. These copied values serve as evidence of SQL injection attempts without requiring repeated manual testing or complex analysis of original webpage responses.
3Productivity
If automated detection methods are implemented, then detection efficiency improves, but the system complexity increases
Solution Approach 1:
The database performs self-service by automatically storing values from executed SQL statements. This leverages the existing database infrastructure rather than adding complex external detection systems, thereby improving productivity without significantly increasing overall system complexity.
Solution Approach 2:
The database serves multiple functions: it continues to store normal application data while simultaneously capturing evidence of SQL injection attempts through stored values. This multi-functionality allows automated detection without requiring separate dedicated detection hardware or systems.
Data Source
AI summary
A web application receives a user input with a SQL injection attack string that references a function. The application generates a corresponding statement based on the user input string, which the application sends to a database server. Upon receiving the statement, the database server executes the statement that invokes the referenced function. When invoked, the referenced function stores a value. The presence of the stored value indicates that the database server invoked the function. Storing the value indicative of the function invocation identifies a vulnerability of the web application to SQL injection attacks, since the function reference is introduced solely through user input and function invocation is not intended by the application. This provides proof of SQL injection vulnerability of the application.


