Comparison of the Performance of the SQL Injection Detection Model Using CNN, Logistic Regression, Random Forest, Naive Bayes, and Decision Tree

Lila Setiyani, Hanny Hikmayanti Handayani, Wildan Adhitya Geraldine · 2023

Modern application development needs to consider security. In addition, with the increasing threat of cybercrime, software developers must be able to improve the quality of the applications they build. Machine learning has been widely implemented as a model that can increase application sophistication in detecting threats. SQL Injection ranks in the top 10 vulnerabilities in the OWASP framework. The purpose of this research is to find the best machine learning and deep learning models in detecting SQL Injection attacks. In this research, 5 algorithms will be tested, namely CNN, Logistic Regression, Random Forest, Naive Bayes, and Decision Tree. The procedure of this study adopts the AI development life cycle process with stages including project planning, data collection, data preparation, model development and model deployment. In this study, the datasets collected were unbalanced, so the process of data acquisition and preparation became important. To balance the data, the SMOTE technique is used. The results of this study indicate that CNN is the best algorithm model in detecting SQL Injection with an accuracy value of 0.95, compared to Logistic Regression 0.93, Random Forest 0.91, Naive Bayes 0.81 and Decision Tree 0.91.

Read the paper · More papers on PaperTik