Machine Learning Based XSS Attacks Detection Method

Korrawit Santithanmanan, Khwunta Kirimasthong, Tossapon Boongoen

Research output: Chapter in Book/Report/Conference proceedingConference Proceeding (Non-Journal item)

Abstract

Cross-Site Scripting (XSS) attacks pose a significant threat to web applications by allowing the attacker to use the XSS to inject malicious code, typically JavaScript, and send it to other users in the form of a URL to identify which URLs are malicious. The attackers inject and execute arbitrary code within a user's browser, potentially leading to unauthorized access and data theft. Therefore, the objective of this paper is to propose machine learning-based methods for detecting XSS attacks focusing on URLs that follow domain names were non-alphanumeric characters that can appear in Javascript by using k-NN, Decision Tree, SVM, and Gaussian Naive Bayes classification model. This information aids in selecting the most suitable model for real-world deployment, ensuring efficient and reliable detection of XSS attacks in web applications. By training the models on a diverse dataset containing both benign and malicious scripts, they learn to differentiate between safe and malicious code, enhancing the accuracy of detection to find the best model for detecting websites that will inject scripts or 33 non-alphanumeric characters and characters that can appear in Javascript that possibly steal sensitive information about victims. The evaluation results reveal the performance of each model in terms of its ability to identify and classify malicious URLs accurately.
Original languageEnglish
Title of host publicationADVANCES IN COMPUTATIONAL INTELLIGENCE SYSTEMS, UKCI 2023
EditorsP Jenkins, P Grace, L Yang, S Prajapat, N Naik
Place of PublicationGEWERBESTRASSE 11, CHAM, CH-6330, SWITZERLAND
PublisherSpringer Nature
Pages418-429
Number of pages12
Volume1453
ISBN (Print)978-3-031-47507-8; 978-3-031-47508-5
DOIs
Publication statusPublished - 2024

Publication series

NameAdvances in Intelligent Systems and Computing
PublisherSPRINGER INTERNATIONAL PUBLISHING AG

Keywords

  • Cross-site scripting
  • XSS attack
  • Machine learning
  • k-NN
  • Decision tree
  • SVM
  • Gaussian naive bayes

Fingerprint

Dive into the research topics of 'Machine Learning Based XSS Attacks Detection Method'. Together they form a unique fingerprint.

Cite this