WAF_AI-AI: Web Application Firewall with Artificial Intelligence
Overview
This repository contains a Web Application Firewall (WAF_AI) that integrates Artificial Intelligence to detect and mitigate security threats in real-time. The system utilizes pre-trained models to analyze HTTP traffic and automatically block potentially malicious requests.
Features
- Real-Time Threat Detection: The system monitors incoming HTTP requests and detects SQL Injection, XSS, and other malicious patterns in real-time.
- Machine Learning Integration: Pre-trained models are used for detecting attacks based on patterns within URL paths and query parameters.
- Extendable Framework: The system can easily be extended to detect additional threats, such as command injection, file inclusion attacks, and more.
Technologies Used
- Flask: A lightweight Python web framework used for building the WAF_AI application.
- Python: Core programming language for the backend logic and model implementation.
- Machine Learning Models: Pre-trained models for detecting SQL Injection and XSS, built using algorithms such as Random Forest, SVM, and Logistic Regression.
- Joblib: Used for loading machine learning models efficiently.
- HTML/CSS: Used for creating and styling the response page.
- Jinja2 Templates: Templating engine for dynamically rendering HTML content.
Threat Detection
Current Threats Detected
- SQL Injection: This attack occurs when attackers inject malicious SQL code into a query, often leading to data leakage or unauthorized access to the database.
Getting Started
Prerequisites
- Python 3.x: Install Python if you don't have it.
- Flask: Install Flask using
pip install flask. - Joblib: Install Joblib using
pip install joblib. - Scikit-learn: Install scikit-learn if you plan to train your own models (
pip install scikit-learn).
Running the Application
- Clone the repository:
git clone https://github.com/chouaibcher/WAF_AI-AI.git cd WAF_AI-AI
Key Updates:
- Added SQL Injection detection.
Used Dataset :
If you reuse it, please mention us to avoid any problems
https://www.kaggle.com/datasets/chouaibcher/sql-injection-dataset
Contributing
We welcome contributions to improve this project! If you'd like to help, please refer to the CONTRIBUTING.md file for guidelines on how to contribute.
Don’t Hesitate to Contribute! If you have ideas for new features or improvements, feel free to fork the repository, make your changes, and submit a pull request.
Your help is highly appreciated in making this project better
Metadata
Release files for WAF-AI 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| waf_ai-0.1.0.tar.gz | 166.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| WAF_AI-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 333.2 kB
Release files / waf_ai-0.1.0.tar.gz
| Download URL | waf_ai-0.1.0.tar.gz |
|---|---|
| Size | 166.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae54f7254d73b208aba62941716afd93185c66d3f2c5588e7f25e4d0cb43ecd1
|
|
BLAKE2b-256 checksum How to use checksums |
d09712e76450f27a61dc60ed3b73907473df1b5095c62499695ff45cd81edf38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.20
|
Release files / WAF_AI-0.1.0-py3-none-any.whl
| Download URL | WAF_AI-0.1.0-py3-none-any.whl |
|---|---|
| Size | 166.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8aad978d1d37bfc1c3473b804ff80e10925e8c519aec9e60e4f3b7b4a6c81354
|
|
BLAKE2b-256 checksum How to use checksums |
5935bb7c2754af5cfff432b4999854bb51bd81871720498915da68c13361831d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.20
|