Detecting Cross-Site Scripting Vulnerabilities through Automated Unit Testing
Mahmoud Mohammadi,Bill Chu,Heather Richter Lipford +2 more
- pp 364-373
Reads0
Chats0
TLDR
In this paper, a grammar-based attack generator is used to automatically generate test inputs to detect XSS vulnerabilities caused by improper encoding of untrusted data, and a security unit testing approach is presented.Abstract:
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 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 automatically constructed out of each web page and then evaluated by a unit test execution framework. A grammar-based attack generator is used to automatically generate test inputs. We evaluate our approach on a large open source medical records application, demonstrating that we can detect many 0-day XSS vulnerabilities with very low false positives, and that the grammar-based attack generator has better test coverage than industry best practices.read more
Citations
More filters
Journal ArticleDOI
MLPXSS: An Integrated XSS-Based Attack Detection Scheme in Web Applications Using Multilayer Perceptron Technique
TL;DR: A robust artificial neural network-based multilayer perceptron (MLP) scheme integrated with the dynamic feature extractor has the potentials to be applied for XSS-based attack detection in either the client-side or the server-side.
Proceedings ArticleDOI
DeepXSS: Cross Site Scripting Detection Based on Deep Learning
TL;DR: Experimental results show that the proposed XSS detection model based on deep learning achieves a precision rate of 99.5% and a recall rate of 97.9% in real dataset, which means that the novel approach can effectively identify XSS attacks.
Journal ArticleDOI
A survey of detection methods for XSS attacks
TL;DR: This survey focuses on studying comprehensively, the detection methods available in the literature for XSS attack, and presents a list of tools that support detection of XSS attacks.
Journal ArticleDOI
RLXSS: Optimizing XSS Detection Model to Defend Against Adversarial Attacks Based on Reinforcement Learning
TL;DR: Experimental results show that the proposed RLXSS model can successfully mine adversarial samples that escape black-box and white-box detection and retain aggressive features, which indicates that the model can improve the ability of the detection model to defend against attacks.
Journal ArticleDOI
XGBXSS: An Extreme Gradient Boosting Detection Framework for Cross-Site Scripting Attacks Based on Hybrid Feature Selection Approach and Parameters Optimization
TL;DR: This study proposes XGBXSS, a novel web-based XSS attack detection framework based on an ensemble-learning technique using the Extreme Gradient Boosting algorithm (XGboost) with extreme parameters optimization approach, and an enhanced feature extraction method is presented to extract the most useful features from the developed dataset.
References
More filters
Proceedings ArticleDOI
Saner: Composing Static and Dynamic Analysis to Validate Sanitization in Web Applications
Davide Balzarotti,Marco Cova,Viktoria Felmetsger,Nenad Jovanovic,Engin Kirda,Christopher Kruegel,Giovanni Vigna +6 more
TL;DR: This paper combines static and dynamic analysis techniques to identify faulty sanitization procedures that can be bypassed by an attacker, and is able to identify several novel vulnerabilities that stem from erroneous sanitized procedures.
Proceedings ArticleDOI
Static detection of cross-site scripting vulnerabilities
Gary Wassermann,Zhendong Su +1 more
TL;DR: This paper presents a static analysis for finding XSS vulnerabilities that directly addresses weak or absent input validation, and implements the approach and provides an extensive evaluation that finds both known and unknown vulnerabilities in real-world web applications.
Proceedings ArticleDOI
Automatic creation of SQL Injection and cross-site scripting attacks
TL;DR: This work presents a technique for finding security vulnerabilities in Web applications by analyzing the input to the application to access or modify user data and execute malicious code.
Proceedings ArticleDOI
Taint-based directed whitebox fuzzing
TL;DR: The results indicate that the new directed fuzzing technique can effectively expose errors located deep within large programs, especially appropriate for testing programs that have complex, highly structured input file formats.
Proceedings ArticleDOI
State of the Art: Automated Black-Box Web Application Vulnerability Testing
TL;DR: In this article, the state-of-the-art of black-box web application vulnerability scanners is evaluated using a custom web application vulnerable to known and projected vulnerabilities, and previous versions of widely used web applications containing known vulnerabilities.
Related Papers (5)
Automated removal of cross site scripting vulnerabilities in web applications
Lwin Khin Shar,Hee Beng Kuan Tan +1 more
XSS-SAFE: A Server-Side Approach to Detect and Mitigate Cross-Site Scripting (XSS) Attacks in JavaScript Code
Shashank Gupta,Brij B. Gupta +1 more