Analysis of SQL Injection and Cross-Site Scripting (XSS) Attacks on Web Server Logs Using Machine Learning
Indonesian Journal of Artificial Intelligence and Data Mining · 03.01.2026 · 8 (3) · 788-799
DOI: 10.24014/ijaidm.v8i3.38397 ↗Kurz gefasst
Fachartikel in der Zeitschrift Indonesian Journal of Artificial Intelligence and Data Mining, online erschienen am 03.01.2026. Verfasst von Adi Septian und 1 weiteren Autor:innen. Die Arbeit nennt 20 Literaturangaben.
Abstract (Originalsprache)
The increasing complexity of cyber threats requires accurate detection systems to identify attack patterns on web servers. This study aims to detect SQL Injection and Cross-Site Scripting (XSS) attacks in Nginx access logs using machine learning algorithms. Log data were processed through regular expressions for parsing and labeling, resulting in 1,650,615 samples. Data imbalance was addressed using a combination of ADASYN and Random Undersampling. Two algorithms, Random Forest and Support Vector Machine (SVM), were compared based on accuracy, precision, recall, F1-score, and ROC curve metrics. The results show that Random Forest achieved the best performance with 99.92% accuracy, 99.94% F1-score, and 0.9994 AUC, while SVM obtained an accuracy of 96.45%. The combination of resampling and ensemble learning significantly enhances the effectiveness of log-based attack detection, providing a promising foundation for the development of adaptive Intrusion Detection Systems (IDS) in web server environments.
Zitieren
APA
Septian, A., & Rahman, A. A. (2026). Analysis of SQL Injection and Cross-Site Scripting (XSS) Attacks on Web Server Logs Using Machine Learning. Indonesian Journal of Artificial Intelligence and Data Mining, 8(3), 788-799. https://doi.org/10.24014/ijaidm.v8i3.38397
Vancouver
Septian A, Rahman AA. Analysis of SQL Injection and Cross-Site Scripting (XSS) Attacks on Web Server Logs Using Machine Learning. Indonesian Journal of Artificial Intelligence and Data Mining. 2026;8(3):788-799. doi:10.24014/ijaidm.v8i3.38397
BibTeX
@article{Septian2026,
author = {Septian, Adi and Rahman, Atep Aulia},
title = {Analysis of SQL Injection and Cross-Site Scripting (XSS) Attacks on Web Server Logs Using Machine Learning},
journal = {Indonesian Journal of Artificial Intelligence and Data Mining},
year = {2026},
volume = {8},
number = {3},
pages = {788--799},
doi = {10.24014/ijaidm.v8i3.38397}
}
EUVIMED