Runtime Web Validation via Learned Output Templates

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional methods for mitigating Cross-site Scripting (XSS) vulnerabilities in web applications, such as static analysis and sanitization of untrusted data, are difficult to implement effectively and error-prone, leading to prevalent XSS attacks despite existing security measures.

Innovation Solution

A runtime validation apparatus and system that intercepts server requests and responses to apply output validation policies dynamically, comparing response data with predefined templates to ensure compliance and block non-compliant data, thereby preventing XSS attacks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If static analysis and sanitization are used to mitigate XSS vulnerabilities, then security measures are implemented, but implementation is difficult and error-prone

Engineering Contradiction:
ImproveXSS vulnerability mitigationVSAvoidimplementation complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system automatically generates output validation policies by observing and analyzing the web application's own runtime behavior. The training phase captures actual output data during normal operation, and the system autonomously learns the expected output format without requiring manual specification of validation rules, thereby eliminating implementation complexity while maintaining security reliability

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent introduces an intermediary validation layer that sits between the web application and the client. This intermediary automatically validates output data against learned policies before transmission, shielding the application from XSS attacks without requiring modifications to the application code itself, thus resolving the contradiction between security effectiveness and implementation ease

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If output validators are manually applied to prevent XSS vulnerabilities, then validation can be performed, but the process is difficult and error prone

Engineering Contradiction:
ImproveXSS vulnerability preventionVSAvoidvalidation application ease
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The system performs self-service by automatically generating validation policies through observation of the application's runtime output. During the training phase, it captures and analyzes actual output data to learn the expected format, then autonomously creates validation rules without human intervention, making the validation process easy to operate while maintaining high reliability

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs preliminary action by pre-learning the valid output format during a training phase before deployment. This preliminary observation and analysis of normal output data enables the system to establish validation criteria in advance, making subsequent validation operations simple and error-free

Inventive Principle:
Principle #10Preliminary action

3Reliability

If sanitizers are applied to user data to prevent XSS attacks, then dangerous constructs are blocked, but proper placement and ordering is difficult

Engineering Contradiction:
ImproveXSS attack preventionVSAvoidsanitizer placement complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary validation layer that automatically determines the correct placement and ordering of validation operations. The validation policy is applied at the appropriate point in the request-response cycle based on learned patterns, eliminating the complexity of manual sanitizer placement while maintaining effective XSS prevention

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system self-determines the optimal placement and ordering of validation operations by analyzing the application's runtime behavior during training. It automatically identifies where validation should occur in the data flow and configures the validation pipeline accordingly, removing the need for manual configuration while ensuring reliable XSS prevention

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS8959629B2Preserving web document integrity through web template learning
Publication Date: 2015.02.17 SAP SE
  • US8959629B2 patent drawing
  • US8959629B2 patent drawing
  • US8959629B2 patent drawing

AI summary

The embodiments provide a runtime validation apparatus including a runtime interceptor configured to intercept a server request for a requested web resource and a response including response data, and an output validation policy identifier configured to identify an output validation policy from a database storing a plurality of output validation policies based on the requested web resource. The identified output validation policy may represent a template that encompasses allowed responses for the requested web resource. The runtime validation apparatus may further include a validation evaluator configured to compare the response data with the template, and a validation controller configured to permit the response to be transmitted if the response data complies with the template and block the response if at least a portion of the response data does not comply with the template.