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!
_version_ 1825206587463041024
author Lu Zhexi
author_facet Lu Zhexi
author_sort Lu Zhexi
collection DOAJ
description 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.
format Article
id doaj-art-b3a2f52c52494e15a9201dca145cf9ae
institution Kabale University
issn 2271-2097
language English
publishDate 2025-01-01
publisher EDP Sciences
record_format Article
series ITM Web of Conferences
spelling doaj-art-b3a2f52c52494e15a9201dca145cf9ae2025-02-07T08:21:11ZengEDP SciencesITM Web of Conferences2271-20972025-01-01700401610.1051/itmconf/20257004016itmconf_dai2024_04016Sql injection detection using Naïve Bayes classifier: A probabilistic approach for web application securityLu Zhexi0Department of Computer Science, University of IdahoA 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.https://www.itm-conferences.org/articles/itmconf/pdf/2025/01/itmconf_dai2024_04016.pdf
spellingShingle Lu Zhexi
Sql injection detection using Naïve Bayes classifier: A probabilistic approach for web application security
ITM Web of Conferences
title Sql injection detection using Naïve Bayes classifier: A probabilistic approach for web application security
title_full Sql injection detection using Naïve Bayes classifier: A probabilistic approach for web application security
title_fullStr Sql injection detection using Naïve Bayes classifier: A probabilistic approach for web application security
title_full_unstemmed Sql injection detection using Naïve Bayes classifier: A probabilistic approach for web application security
title_short Sql injection detection using Naïve Bayes classifier: A probabilistic approach for web application security
title_sort sql injection detection using naive bayes classifier a probabilistic approach for web application security
url https://www.itm-conferences.org/articles/itmconf/pdf/2025/01/itmconf_dai2024_04016.pdf
work_keys_str_mv AT luzhexi sqlinjectiondetectionusingnaivebayesclassifieraprobabilisticapproachforwebapplicationsecurity