A Comparative Study of Machine Learning and Large Language Models for SQL and NoSQL Injection Vulnerability Detection

2025

Жабық қол жеткізу Метадеректер (CSL-JSON)
DOI 10.1109/sist61657.2025.11139190
Деректер сенімділігі 70 орташа
Бұл баға қалай есептеледі

Ол жазбаның өзінің тексерілетін белгілерінен құралады: мақаланың DOI-і бар ма, оның деректерін қанша тәуелсіз дереккөз растады, міндетті өрістер толтырылған ба және соңғы растау қаншалықты жаңа. Дереккөздер арасындағы алшақтық пен идентификатордың болмауы бағаны төмендетеді. 80-нен бастап мән жазбаның қосымша тексерусіз жарияланғанын, 60-тан 79-ға дейін — оның сенімділігі төмен күйде жарияланғанын және қолмен тексеру ұсынылатынын білдіреді. Редактор қолмен тексерген жазбаны қайта есептеу 90-нан төмен түсірмейді. Бұл — мақаланың өзіне емес, ол туралы деректерімізге берілген баға.

Аңдатпа

The exponential growth of data in relational (SQL) and non-relational (NoSQL) databases has led to an increase in injection attacks, ranking them among the top cybersecurity threats. This study evaluates the effectiveness of machine learning (ML) models and large language models (LLMs) in detecting SQL and NoSQL injection vulnerabilities in source code. We train and compare various ML models—including Logistic Regression, Naïve Bayes, Decision Tree, K-Nearest Neighbors, Random Forest, Multilayer Perceptron (MLP), and Convolutional Neural Networks (CNN)—against a fine-tuned GPT-4o-mini-202407-18 model using both prompt engineering and supervised learning techniques. Our results demonstrate that the Random Forest model achieves 99% accuracy in detecting SQL injection vulnerabilities, while the fine-tuned LLM achieves 97% accuracy in detecting NoSQL injection vulnerabilities. These findings indicate that ML models and LLMs are not mutually exclusive; rather, they excel in different aspects of injection vulnerability detection. The research suggests a hybrid approach that leverages both ML and LLMs for more comprehensive security automation. By providing an open-source NoSQL injection dataset and benchmarking results, this study contributes to the automation of vulnerability detection in the software development lifecycle. The datasets used in this study are publicly available on GitHub.