SQL Injection Detection via Data Flow Graph Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Database applications are vulnerable to SQL injection threats due to unintended SQL commands being executed, which can compromise database integrity, and existing methods fail to effectively detect and address these vulnerabilities.
Innovation Solution
A vulnerability analysis tool constructs a data flow graph to identify paths from user input nodes to command construction nodes, utilizing metadata and dependency models to detect and report vulnerable sites within the application, allowing for local changes to prevent SQL injection threats.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If text concatenation is used to construct SQL commands, then the application is easier to implement and modify, but the application becomes vulnerable to SQL injection threats
Solution Approach 1:
The patent introduces an intermediary vulnerability analysis tool that acts as a mediator between the application code and the database. This tool analyzes the data flow graph to identify vulnerable sites where user input reaches SQL command construction, and recommends using SQL binding mechanisms instead of text concatenation, thereby eliminating the security vulnerability while preserving ease of implementation.
Solution Approach 2:
The patent replaces the mechanical text concatenation approach with SQL binding mechanisms. Instead of manually constructing SQL commands by concatenating strings (which is vulnerable), the system uses parameterized queries where user input is bound to placeholders, automatically preventing SQL injection while maintaining the same functional capability.
2Measurement precision
If comprehensive vulnerability analysis is performed across the entire application, then all vulnerable sites can be detected, but the analysis complexity and time increase significantly
Solution Approach 1:
The patent segments the application into modular units (procedures, functions, modules) and represents their relationships through a dependency graph. The vulnerability analysis tool then segments the analysis by identifying specific data flow paths from user input nodes to SQL command construction nodes, rather than analyzing the entire application monolithically. This reduces complexity while maintaining comprehensive detection.
Solution Approach 2:
The patent extracts only the critical information needed for vulnerability analysis from the application code, specifically the data flow relationships between user input and SQL command construction. By extracting and representing only these essential dependencies in a data flow graph, the tool achieves comprehensive vulnerability detection without the complexity of analyzing all application details.
3Object-affected harmful factors
If local changes are made at vulnerable sites to prevent SQL injection, then the security is improved, but the application code requires modification and testing
Solution Approach 1:
The patent enables the application to self-diagnose security vulnerabilities through automated vulnerability analysis. The tool automatically identifies vulnerable sites, analyzes the data flow paths, and generates recommendations for remediation. This self-service approach reduces the effort required for developers to identify and fix SQL injection vulnerabilities, as the system performs the complex analysis work automatically.
Data Source
AI summary
A vulnerability analysis tool is provided for identifying SQL injection threats. The tool is able to take advantage of the fact that the code for many database applications is located in modules stored within a database. The tool constructs a data flow graph based on all, or a specified subset, of the application code within the database. The tool identifies, within the data flow graph, the nodes that represent values used to construct SQL commands. Paths to those nodes are analyzed to determine whether any SQL injection threats exist.


