Afrin, Sadia2025-07-182025-07-182025-07-17https://hdl.handle.net/10222/85220SQL injection (SQLi) exploits vulnerabilities in an application’s input validation logic to manipulate backend SQL queries, allowing attackers to bypass authentication, extract sensitive data, or corrupt databases. Despite decades of research and the emergence of modern web frameworks with built-in safeguards, SQLI remains on the OWASP Top 10 list, demonstrating its persistent relevance and evolving sophistication. While more research has been conducted on detecting traditional SQLi attacks, relatively less attention has been given to identifying adversarial variants designed to evade standard defenses. Traditional detection approaches, such as signature-based filtering and rule-based systems, fall short against novel or advanced adversarial SQLi attacks because they rely on predefined patterns that cannot generalize to unseen payloads. This thesis proposes an alternative approach by leveraging generative modeling for SQLi detection. The results suggest that generative models paired with Word2Vec embeddings show impressive performance.enSQL Injection AttacksGenerative ModelingAnomaly DetectionSQL Protection Using Generative Modeling for Anomaly Detection