Sql injection detection using Naïve Bayes classifier: A probabilistic approach for web application security

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 intro...

Full description

Saved in:
Bibliographic Details
Main Author: Lu Zhexi
Format: Article
Language:English
Published: EDP Sciences 2025-01-01
Series:ITM Web of Conferences
Online Access:https://www.itm-conferences.org/articles/itmconf/pdf/2025/01/itmconf_dai2024_04016.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary: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.
ISSN:2271-2097