Automated Detecting and Repair of Cross-Site Scripting Vulnerabilities

04/03/2018
by   Mahmoud Mohammadi, et al.
0

The best practice to prevent Cross Site Scripting (XSS) attacks is to apply encoders to sanitize untrusted data. To balance security and functionality, encoders should be applied to match the web page context, such as HTML body, JavaScript, and style sheets. A common programming error is the use of a wrong type of encoder to sanitize untrusted data, leaving the application vulnerable. We present a security unit testing approach to detect XSS vulnerabilities caused by improper encoding of untrusted data. Unit tests for the XSS vulnerability are constructed out of each web page and then evaluated by a unit test execution framework. A grammar-based attack generator is devised to automatically generate test inputs. We also propose a vulnerability repair technique that can automatically fix detected vulnerabilities in many situations. Evaluation of this approach has been conducted on an open source medical record application with over 200 web pages written in JSP.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/02/2018

Detecting Cross-Site Scripting Vulnerabilities through Automated Unit Testing

The best practice to prevent Cross Site Scripting (XSS) attacks is to ap...
research
04/02/2018

Automatic Web Security Unit Testing: XSS Vulnerability Detection

Integrating security testing into the workflow of software developers no...
research
03/14/2022

JSRehab: Weaning Common Web Interface Components from JavaScript Addiction

Leveraging JavaScript (JS) for User Interface (UI) interactivity has bee...
research
12/11/2019

Metamorphic Security Testing for Web Systems

Security testing verifies that the data and the resources of software sy...
research
05/15/2023

Time-based Repair for Asynchronous Wait Flaky Tests in Web Testing

Asynchronous waits are one of the most prevalent root causes of flaky te...
research
05/07/2020

Database Traffic Interception for Graybox Detection of Stored and Context-Sensitive XSS

XSS is a security vulnerability that permits injecting malicious code in...
research
04/27/2023

Machine Learning for Detection and Mitigation of Web Vulnerabilities and Web Attacks

Detection and mitigation of critical web vulnerabilities and attacks lik...

Please sign up or login with your details

Forgot password? Click here to reset