Skip to content
Open access

An LDA-Enhanced Machine Learning Approach for Efficient SQL Injection Detection from Web Traffic Logs

Sep 2026 · International Journal for Research in Applied Science and Engineering Technology · 0 citations

TL;DR

It is indicated that LDA-based feature reduction can improve the effectiveness and efficiency of machine-learning-based SQLI detection.

Abstract

SQL injection (SQLI) remains a critical web application security threat, while conventional signature-based detection methods face limitations in identifying evolving attack patterns and handling high-dimensional web request data. This study proposes an improved machine learning framework for SQLI detection based on TF-IDF N-grams and Latent Dirichlet Allocation (LDA). HTTP requests from the CSIC-2010 and ECML/PKDD-2007 datasets are processed to extract SQLI-related traffic using SQL keyword-based filtering. TF-IDF trigram features are generated to represent request characteristics, followed by LDA-based dimensionality reduction to obtain a compact latent semantic representation. Support Vector Machine (SVM) and Random Forest (RF) classifiers are employed for classifying malicious and genuine requests. Experimental results demonstrate the effectiveness of the proposed LDA-based approach. On the CSIC-2010 dataset, the SVM and RF models achieve 99.90% and 98.13% accuracy, respectively. On the ECML/PKDD-2007 dataset, the improved framework achieves 98.70% accuracy using SVM and 99.85% using RF, with approximately 99% true-positive rate and mean ROC performance. The findings indicate that LDA-based feature reduction can improve the effectiveness and efficiency of machine-learning-based SQLI detection.

Read PDF

Similar papers

Open access 2026

Investigation of machine learning methods for detecting SQL injections

Introduction. The paper addresses the task of detecting SQL injections in HTTP requests using machine learning methods. The models were trained on a dataset containing over 120,000 HTTP requests, classified into legitimate requests and those containing SQL injections. Each request was represented by a set of features,...

I. V. Azarov, N. V. Kononova, D. Surenkov et al. · 0 citations
Open access Sep 2026

HTTP Anomaly Detection Using Character-Level 3-Gram TF-IDF and Hybrid TF-IDF–Hashing Representations: A Comparative Study of Machine Learning Models

Web applications are frequent targets of cyberattacks such as SQL injection, cross-site scripting, and command injection, creating a need for accurate and computationally efficient anomaly detection systems. While recent approaches increasingly rely on deep learning and transformer-based architectures, these methods of...

Mohinpasha Shaik, Siva Ganesh Varma Paidi, Mohammad Hassanzadeh · 0 citations
Open access Aug 2026

Explainable Hybrid Framework for Zero Day Web Attack Detection Using Anomaly Detection and Classification ModelsThe rise in the usage of web applications has elevated the risk of cyber attacks, specifically zero day web attacks. Zero day web attacks are t

The rise in the usage of web applications has elevated the risk of cyber attacks, specifically zero day web attacks. Zero day web attacks are the unseen and unusual attacks which traditional methods fail to detect. This essay's primary goal is to build a system that detects zero day web attacks efficiently. The propose...

S. Patil, Anita Harsoor · 0 citations
Open access Sep 2026

Design and Implementation of a Machine Learning-Based Malicious URL Detection System

The study provides a conclusion that the machine learning techniques, particularly ensemble learning techniques can be considered an effective and reliable technique to detect malicious URL.

Oludele Adeleke, Jimoh Abdulhakeem Kuranga, Samuel Adeolu Ogunbiyi et al. · 0 citations
Open access Aug 2026

Machine Learning-Based Malware Detection: A Comparative Study of Random Forest, Decision Tree, KNN, and Linear SVM

Random Forest achieves the highest performance with a test accuracy of 96.3%, F1-score of 0.947, and AUC of 0.993, establishing it as the optimal algorithm for static malware detection tasks and establishing it as the optimal algorithm for static malware detection tasks.

Umesh Balami, Ganesh Gautam, Gajendra Sharma · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.