Systems and methods for analysis of cross-site scripting vulnerabilities
AssigneeVeracode, Inc.
InventorIsaac M. Dawson
Life of this patent
Estimating the term…
Abstract
A system for detecting XSS vulnerabilities includes determining the context in which a probe supplied as an input to a webpage or an application exists in a script associated with the webpage or application. A payload is generated based on, at least in part, the context such that during execution of the script, an executable code fragment in the payload can escape out of the context in which the probe exists and into a the global context of the script. The payload may include additional characters that prevent the payload from causing errors in the execution of the script.
Claims16
A method of detecting a cross-site scripting (XSS) vulnerability, the method comprising:
- identifying by a processor a script element within which a probe exists;
- analyzing by the processor the script element to determine a context in which the probe exists;
- generating by the processor a payload that is configured to escape out of the context in which the probe exists into a global context of the script where the payload is executable, and that includes at least one character determined according to the context in which the probe exists, the at least one character preventing introduction of errors by the payload during execution of the script, thereby detecting an XSS vulnerability in the script element.
A system comprising:
- a first processor;
- and
- a first memory coupled to the first processor, the first memory comprising instructions which, when executed by a processing unit comprising at least one of the first processor and a second processor, the processing unit being coupled to a memory module comprising at least one of the first memory and a second memory, program the processing unit to:
- identify a script element within which a probe exists;
- analyze the script element to determine a context in which the probe exists;
- generate a payload that is configured to escape out of the context in which the probe exists into a global context of the script where the payload is executable, and that includes at least one character determined according to the context in which the probe exists, the at least one character preventing introduction of errors by the payload during execution of the script, thereby detecting an XSS vulnerability in the script element.
Dependencies are inferred from the claim text.