Dynamic Sanitizer Detection in Static Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Static Application Security Testing (SAST) tools face limitations in detecting sanitizers due to incomplete pre-defined lists, leading to false positives and false negatives, as they cannot identify unknown sanitizers or assess their functionality effectively.

Innovation Solution

The method combines static and dynamic analysis to identify and test potential sanitizers within a sandboxed environment, generating test cases based on sanitizer contexts and executing them to determine their functionality, thereby providing combined results with prioritization for accurate detection.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a pre-defined list of sanitizers is used in SAST tools, then the detection process is simplified and faster, but the completeness and accuracy of sanitizer detection deteriorates due to incomplete lists and inability to identify unknown sanitizers

Engineering Contradiction:
Improvesanitizer detection speedVSAvoidsanitizer detection accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent transitions from a static pre-defined sanitizer list to a dynamic detection approach where sanitizers are identified at runtime through dynamic analysis. The system executes test cases against candidate sanitizers to validate their functionality, allowing the sanitizer list to adapt and grow based on actual program behavior rather than relying on a fixed, pre-computed list.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system enables the program itself to identify its own sanitizers through dynamic analysis and self-testing. By executing test cases generated from static analysis results and observing actual runtime behavior, the system allows the code to demonstrate which functions act as sanitizers, rather than requiring external pre-definition of all possible sanitizers.

Inventive Principle:
Principle #25Self-service

2Loss of time

If a pre-defined list of sanitizers is used, then manual analysis effort is reduced, but false positive and false negative rates increase due to incomplete and coarse-grained information

Engineering Contradiction:
Improvemanual analysis timeVSAvoidfalse positive and false negative rate
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The system performs preliminary static analysis to generate test cases and identify candidate sanitizers before dynamic execution. This preliminary action prepares the testing framework and candidate list in advance, allowing the dynamic analysis phase to focus specifically on validating sanitizer functionality rather than performing complete analysis from scratch.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements a feedback loop where dynamic analysis results are used to validate candidate sanitizers and update the sanitizer list. Test case execution outcomes provide feedback on whether candidate functions actually sanitize data, allowing the system to refine its sanitizer identification accuracy and reduce false positives and negatives in subsequent analyses.

Inventive Principle:
Principle #23Feedback

3Duration of action of moving object

If static analysis alone is used to identify sanitizers, then the analysis process is faster and requires no execution, but the detection capability deteriorates due to inability to assess actual sanitizer functionality

Engineering Contradiction:
Improveanalysis execution timeVSAvoidsanitizer functionality assessment accuracy
Core Design Contradiction:
Duration of action of moving objectVSMeasurement precision

Solution Approach 1:

The patent divides the sanitizer detection process into two distinct segments: static analysis phase that generates test cases and identifies candidate sanitizers without execution, and dynamic analysis phase that executes test cases to validate functionality. This segmentation allows each phase to specialize in its strength while compensating for the other's limitations.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Static analysis performs preliminary work by generating test cases and identifying candidate sanitizers before dynamic execution. This preliminary action prepares the groundwork for dynamic validation, allowing the faster static phase to handle broad identification while the slower dynamic phase focuses on precise functionality verification.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8959646B2Automated detection and validation of sanitizers
Publication Date: 2015.02.17 SAP SE
  • US8959646B2 patent drawing
  • US8959646B2 patent drawing
  • US8959646B2 patent drawing

AI summary

Methods, systems, and computer-readable storage media for analyzing security of dataflows in programs. In some implementations, actions include processing source code using static analysis to: identify one or more dataflows and one or more candidate sanitizers, each candidate sanitizer being associated with a respective dataflow, and provide an executable sub-program for each candidate sanitizer to provide one or more executable sub-programs, processing the one or more executable sub-programs using dynamic analysis to: execute the one or more executable sub-programs, and provide dynamic analysis results, providing combined results based on the static analysis and the dynamic analysis, the combined results including the dynamic analysis results, and assigning a priority to each result in the combined results.