Implementasi Middleware Deteksi SQL Injection Berbasis Multinomial Naïve Bayes dan Validasi Ketahanan Terhadap SQLMap - Malik Syafi'i; Arip Solehudin; Purwantoro Purwantoro (IKRA-ITH Informatika : Jurnal Komputer dan Informatika, 2026)
This research aims to develop an automated detection and blocking middleware for SQL Injection (SQLi) attacks using the Multinomial Naïve Bayes (MNB) algorithm integrated into a Flask-based web application. Unlike previous studies focusing on static model accuracy or system performance comparisons, this study emphasizes the full application of the Knowledge Discovery in Databases (KDD) methodology to build an active defense model and empirically validate its resilience against automated exploitation tools. The model was trained using the public RbSQLi dataset through stages of selection, Regex Abstraction-based text preprocessing, TF-IDF transformation, and internal evaluation. Test results show that the model achieved 100% accuracy, precision, recall, and F1-Score on isolated test data. Operational validation using black-box penetration testing with SQLMap proved that the middleware successfully blocked all major attack vectors (Error-based, Union-based, Boolean-blind, Time-blind, and Stacked Queries), thereby changing the target parameter status from vulnerable (injectable) to safe (not injectable). These findings confirm that the KDD approach with the MNB algorithm can produce an effective application security layer in neutralizing automated SQLi threats without requiring complex computational architectures.