← Back to Volume 47, Issue 2 Contents
ANOMALY DETRECTION FOR WEB ATTACK PREVENTION: ANALYZING WEB ACCESS LOGS FOR THREAT MITIGATION
Swati Chaudhari1, Archana Thakur2, Alpana Rajan3
1 Raja Ramanna Centre for Advanced Technology, Department of Atomic Energy, Govt. of India, Indore, M.P., India
2 School of Computer Science & Information Technology, Devi Ahilya Vishwavidyalaya, Indore, M.P., India
3 Raja Ramanna Centre for Advanced Technology, Department of Atomic Energy, Govt. of India, Indore, M.P., India
Volume: 47Issue: 2Pages: 427–439Year: 2025ISSN: 0970-5120
⬇ Download Full PDF
Abstract
With the increasing sophistication of cyber threats, web applications are prime targets for attackers seeking to exploit vulnerabilities. Traditional signature-based security solutions struggle to detect novel and evolving attack patterns. This paper presents an anomaly detection approach for web attack detection and mitigation by analyzing web access logs. Using machine learning techniques, we identify deviations from normal traffic patterns that may indicate potential threats such as SQL injection, cross-site scripting (XSS), and Local File Inclusion (LFI) and Directory Traversal attacks.
We conducted a study on a real-world dataset comprising 50 million HTTP requests collected over three months from a real world web application platform. By leveraging an unsupervised machine learning model, we detected 5% anomalous requests, of which 85% were confirmed as actual attacks through manual verification and cross-referencing with intrusion detection system (IDS) logs. Notably, our model identified previously undetected zero-day threats, including 400+ directory traversal attacks, 156 stealthy SQL injection attempts and 150 bot-driven credential stuffing incidents. The proposed system enhances real-time threat detection and response, improving web security by proactively identifying and mitigating attacks before they cause significant damage. Experimental results demonstrate 87% precision, 92% recall and 93.94% accuracy in detecting anomalies, offering a scalable and adaptive solution for modern web security challenges.
Keywords: Web Attack, Machine Learning, Anomaly detection, web log
MSC 2020: 68M25, 68M11, 68M10
How to Cite
Swati Chaudhari, Archana Thakur, Alpana Rajan, ANOMALY DETRECTION FOR WEB ATTACK PREVENTION: ANALYZING WEB ACCESS LOGS FOR THREAT MITIGATION, Journal of the Indian Academy of Mathematics, 47(2) (2025), 427–439.
References
- Roesch, M. (1999): Snort: Lightweight Intrusion Detection for Networks, In Proceedings of LISA '99.
- Open Information Security Foundation (2010): Suricata: The Next Generation IDS/IPS.
- Sommer, R., & Paxson, V. (2010): Outside the Closed World: On Using Machine Learning for Network Intrusion Detection, IEEE Symposium on Security and Privacy.
- Canali, D., Cova, M., & Vigna, G. (2011): Detecting Web-Based Attacks Through Machine Learning, Proceedings of RAID.
- Pan, L., He, J., & Wei, L. (2020): Deep Learning for Web Attack Detection: A Convolutional Neural Network Approach, IEEE Transactions on Information Forensics and Security.
- Shams, R., & Rizaner, A. (2018): Anomaly-Based Web Attack Detection Using Isolation Forest, Journal of Cyber Security and Mobility.
- Krügel, C., Vigna, G., & Robertson, W. (2005): Anomaly Detection for Web-Based Attacks, ACM Transactions on Information and System Security.
- Mirsky, Y., Doitshman, T., & Shabtai, A. (2021): Autoencoder-Based Anomaly Detection for Web Security, IEEE Transactions on Cybersecurity.
- Ma, Z., Li, X., & Wang, P. (2022): Large-Scale Anomaly Detection in Web Traffic: A Case Study on E-commerce Security, Proceedings of Annual Computer Security Applications Conference (ACSAC), Association for Computing Machinery.
- Chandola, V., Banerjee, A., & Kumar, V. (2009): Anomaly Detection: A Survey, ACM Computing Surveys.
- Demirel, D. Y. and Sandikkaya, M. T. (2023): Web Based Anomaly Detection Using Zero-Shot Learning With CNN, IEEE Access, vol. 11, pp. 91511–91525, doi: 10.1109/ACCESS.2023.3303845.
- Rahul Kale & Vrizlynn L. L. Thing (2023): Few-shot Weakly-supervised Cybersecurity Anomaly Detection, Computers and Security, Vol. 130, No. C, doi.org/10.1016/j.cose.2023.103194.
- Rayavarapu, S. M., Prasanthi, T. S., Rao, G. S. & Kumar, G. S. (2023): Generative Adversarial Networks for Anomaly Detection in Cyber Security: A Review, 4th International Conference on Electronics and Sustainable Communication Systems (ICESC), Coimbatore, India, pp. 662–666, doi: 10.1109/ICESC57686.2023.10193331.
- Eljon Harlicaj (2021): Anomaly Detection of Web-Based Attacks in Microservices, Master's thesis, Aalto University - School of Science, EURECOM.
- Katurde, A. D. (2024): SecureSense: AI/ML Based Anomaly Detection Tool, International Conference on Intelligent Systems for Cybersecurity (ISCS), Gurugram, India, pp. 1–6, doi: 10.1109/ISCS61804.2024.10581060.
- AbuseIPDB: A project dedicated to helping combat the spread of hackers, spammers, and abusive activity on the internet, https://www.abuseipdb.com/account/api
- Tomas Sureda, Juan-Ramón Bermejo Higuera, Juan-Ramón Bermejo Higuera, José-Javier Martínez Herraiz & Juan-Antonio Sicilia Montalvo (2020): Prevention and Fighting against Web Attacks through Anomaly Detection Technology: A Systematic Review, Sustainability, 12(12), 4945, https://doi.org/10.3390/su12124945.
- Kumar, R., Arora, N., Gera, T., Jain, A. & Thakur, D. (2022): Empirical Methods, Anomaly Detection and Preventive Measures of Web Attacks, 10th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions) (ICRITO), Noida, India, pp. 1–5, doi: 10.1109/ICRITO56286.2022.9964908.
- Giovanni Vigna, Fredrik Valeur, Davide Balzarotti, William Robertson, Christopher Kruegel & Engin Kirda (2009): Reducing errors in the anomaly-based detection of web-based attacks through the combined analysis of web requests and SQL queries, Journal of Computer Security, 17, 305–329, DOI: 10.3233/JCS-2009-0321.
- Christopher Kruegel, Giovanni Vigna (2003): Anomaly Detection of Web-Based Attacks, Proceedings of the 10th ACM Conference on Computer and Communications Security.
- Zhang, S., Li, B., Li, J., Zhang, M. & Chen, Y. (2015): A Novel Anomaly Detection Approach for Mitigating Web-Based Attacks Against Clouds, IEEE 2nd International Conference on Cyber Security and Cloud Computing, New York, NY, USA, pp. 289–294, doi: 10.1109/CSCloud.2015.46.
- Almourish, M. H., Abduljalil, O. A. I. & Alawi, A. E. B. (2022): Anomaly-Based Web Attacks Detection Using Machine Learning, Proceedings of 2nd International Conference on Smart Computing and Cyber Security. SMARTCYBER 2021. Lecture Notes in Networks and Systems, vol. 395, Springer, Singapore, https://doi.org/10.1007/978-981-16-9480-6_29.
- Udi Aharon, Revital Marbel, Ran Dubin, Amit Dvir & Chen Hajaj (2024): Few-Shot API Attack Detection: Overcoming Data Scarcity with GAN-Inspired Learning, https://arxiv.org/abs/2405.11258.
- Tikam Alma, Manik Lal Das (2020): Web Application Attack Detection using Deep Learning, https://arxiv.org/abs/2011.03181.
- Mohammed Abo Sen (2024): Attention-GAN for Anomaly Detection: A Cutting-Edge Approach to Cybersecurity Threat Management, https://arxiv.org/abs/2402.15945.
© Journal of the Indian Academy of Mathematics