Sql injection detection using Naïve Bayes classifier: A probabilistic approach for web application security - Lu Zhexi (ITM Web of Conferences)
A pervasive security issue in web applications is database injection, enabling attackers to alter SQL queries in order to get unauthorized access to confidential information. Using the Naive Bayes classifier, a probabilistic model specifically developed for text classification tasks, this work introduces a novel method for detecting SQL injection vulnerabilities.The process begins by collecting and organizing a comprehensive dataset, which includes both harmful and non-malicious SQL queries. Feature extraction is later employed to identify patterns and characteristics commonly associated with SQL injection, such as certain SQL clauses and logical operators. This collection of attributes is employed to generate a feature vector that serves as the input for the Naive Bayes classification algorithms. The classifier is trained using a labeled dataset and then learns to distinguish between benign and malicious requests by assessing their computed probabilities. Conventional measures such as accuracy, precision, recall, and F1-score are employed to assess the model’s ability in correctly identifying SQL while reducing false positive classifications.The present study demonstrates the potential of Naive Bayes in enhancing online application security by providing a methodical and scalable strategy for identifying SQL injection attacks.