Performance Comparison of Multiple Classification Models used for Detection of SQL Injection Attacks
Abstract
In the interconnected world, SQL injection attacks pose numerous significant threats to web applications as they open doors for unauthorised access to sensitive data and illegal manipulations. Detecting and preventing these attacks is essential for ensuring the security of web applications. While there have been numerous studies on using machine learning to detect SQL injection attacks, there is a lack of comprehensive analysis comparing the performance of different classification models. This research aims to evaluate and compare the effectiveness of various classification models, including KNN, Decision Trees, Support Vector Machines (SVMs), Naïve Bayes, and Neural Networks, in detecting SQL injection attacks. Using a Kaggle dataset with 30919 cases, the study employed an 80%:20% split ratio for training and testing. Data preprocessing was conducted to clean the data by addressing missing values, reducing noise, resolving inconsistencies, and eliminating outliers. The results showed that CNN achieved the highest accuracy (96.55%), with a good balance between precision (98.92%) and recall (91.71%). By evaluating and comparing different classification models’ performances, this paper contributes towards enhancing the security of web applications against SQL injection attacks and advances the research contributions in cybersecurity and machine learning domains. The study's results thus strengthen cybersecurity practices, upgrade defence strategies, and empower organisations to proactively defend their systems against evolving threats by creating a better-secured digital environment for web applications and databases.
Keywords:Machine Learning, Performance Evaluation, SQL Injection Attacks, Cyber Security, Web Applications, Databases