String Sanitizer Modeling via Finite Automata
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing sanitizer functions are insufficient in protecting against cross-site scripting (XSS) attacks, as they may not adequately prevent code injection exploits and lack effective verification methods.
Innovation Solution
A computer system and method that utilizes deterministic finite automata to evaluate string sanitizer functions by generating graphs and automata to determine vulnerabilities, identifying intersections with exploit automata to assess potential code injection risks.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If hand-written sanitizer functions are used to protect against XSS attacks, then security protection is provided, but the sanitizer functions may not provide sufficient security and lack verification capability
Solution Approach 1:
The patent replaces manual, ad-hoc sanitizer function writing with an automated system that uses formal methods (finite automata) to generate and verify sanitizers. This substitution of mechanical/manual processes with automated computational methods resolves the contradiction by providing both high reliability through formal verification and reduced complexity through automation.
Solution Approach 2:
The system performs self-verification by automatically generating finite automata representations of sanitizer functions and intersecting them with exploit automata to detect vulnerabilities. This self-service capability eliminates the need for external manual verification while ensuring security, resolving the contradiction between reliability and complexity.
2Reliability
If manual sanitizer functions are written to escape or delete characters, then some security protection is achieved, but verification of protection effectiveness is insufficient
Solution Approach 1:
The patent replaces difficult manual vulnerability detection with automated finite automata intersection operations. The system automatically verifies sanitizer effectiveness by computing the intersection of sanitizer automata with exploit automata, providing reliable security verification without manual analysis difficulty.
Solution Approach 2:
The patent introduces finite automata as an intermediary representation between the sanitizer function and the verification process. This intermediary enables automated, reliable verification by transforming sanitizer logic into a formal mathematical structure that can be systematically analyzed through intersection operations with exploit automata.
3Ease of manufacture
If sanitizer functions are written by hand to protect against code injection, then implementation is straightforward, but the functions may not cover all XSS payloads
Solution Approach 1:
The patent performs preliminary action by automatically generating sanitizer functions through finite automata construction before deployment. This pre-computation ensures comprehensive XSS protection coverage by systematically analyzing all possible input strings, while the generated sanitizers can be directly implemented without manual coding effort.
Solution Approach 2:
The patent replaces manual sanitizer implementation with automated finite automata-based generation. This substitution maintains ease of deployment while dramatically improving protection coverage by ensuring all XSS payloads are accounted for through formal mathematical analysis of the sanitizer's behavior.
Data Source
AI summary
Code injection is a type of security vulnerability in which an attacker injects client-side scripts modifying the content being delivered. A sanitizer function may provide defense against such attacks by removing certain characters (e.g., characters causing state transitions in HTML). A string sanitizer may be modeled in order to determine its effectiveness by obtaining data flow information indicating string operations that used an input string or information derived therefrom, including a string sanitizer function. A deterministic finite automata representing string values of the output parameter may be generated based on a graph generated from the data flow information, where the automata accepts possible output string values of the sanitizer. It can be determined whether there is a non-empty intersection between the automata for the sanitizer output and an automata representing a security exploit, which would indicate that the sanitizer function is vulnerable to the exploit.


