SQL Injection Detection via Data Flow Graph Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveease of implementationVSAvoidSQL injection vulnerability
Core Design Contradiction:
Ease of manufactureVSObject-affected harmful factors

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

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

Engineering Contradiction:
Improvevulnerability detection completenessVSAvoidanalysis complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #2Taking out (Extraction)

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

Engineering Contradiction:
ImproveSQL injection preventionVSAvoidcode modification effort
Core Design Contradiction:
Object-affected harmful factorsVSEase of repair

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.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS7860842B2Mechanism to detect and analyze SQL injection threats
Publication Date: 2010.12.28 ORACLE INT CORP
  • US7860842B2 patent drawing
  • US7860842B2 patent drawing
  • US7860842B2 patent drawing

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.