Machine Learning-Driven Detection of Cross-Site Scripting Attacks

Author:

Alhamyani Rahmah1,Alshammari Majid1ORCID

Affiliation:

1. College of Computer and Information Technology, Taif University, Taif 26571, Saudi Arabia

Abstract

The ever-growing web application landscape, fueled by technological advancements, introduces new vulnerabilities to cyberattacks. Cross-site scripting (XSS) attacks pose a significant threat, exploiting the difficulty of distinguishing between benign and malicious scripts within web applications. Traditional detection methods struggle with high false-positive (FP) and false-negative (FN) rates. This research proposes a novel machine learning (ML)-based approach for robust XSS attack detection. We evaluate various models including Random Forest (RF), Logistic Regression (LR), Support Vector Machines (SVMs), Decision Trees (DTs), Extreme Gradient Boosting (XGBoost), Multi-Layer Perceptron (MLP), Convolutional Neural Networks (CNNs), Artificial Neural Networks (ANNs), and ensemble learning. The models are trained on a real-world dataset categorized into benign and malicious traffic, incorporating feature selection methods like Information Gain (IG) and Analysis of Variance (ANOVA) for optimal performance. Our findings reveal exceptional accuracy, with the RF model achieving 99.78% and ensemble models exceeding 99.64%. These results surpass existing methods, demonstrating the effectiveness of the proposed approach in securing web applications while minimizing FPs and FNs. This research offers a significant contribution to the field of web application security by providing a highly accurate and robust ML-based solution for XSS attack detection.

Funder

Taif University

Publisher

MDPI AG

Reference45 articles.

1. Sotnik, S., Shakurova, T., and Lyashenko, V. (2024, June 13). Development Features Web-Applications. Available online: www.ijeais.org/ijaar.

2. Cross-site Scripting Attack Detection Using Machine Learning with Hybrid Features;Prasetio;J. Infotel,2021

3. Survey on JavaScript security policies and their enforcement mechanisms in a web browser;Bielova;J. Log. Algebr. Program.,2013

4. Machine learning in cybersecurity: A comprehensive survey;Dasgupta;J. Def. Model. Simul.,2022

5. Chaudhari, G.R., and Vaidya, M.V. (2024, June 13). A Survey on Security and Vulnerabilities of Web Application. Available online: www.ijcsit.com.

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3