Skip to main content

Web application firewall using AI

Project description

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

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

  1. Clone the repository:
    git clone https://github.com/chouaibcher/WAF_AI-AI.git
    cd WAF_AI-AI
    

Key Updates:

  • Added SQL Injection detection.
image image

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

waf_ai-0.1.0.tar.gz (166.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

WAF_AI-0.1.0-py3-none-any.whl (166.7 kB view details)

Uploaded Python 3

File details

Details for the file waf_ai-0.1.0.tar.gz.

File metadata

  • Download URL: waf_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 166.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for waf_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ae54f7254d73b208aba62941716afd93185c66d3f2c5588e7f25e4d0cb43ecd1
MD5 7b889c317840d274964989436fb42360
BLAKE2b-256 d09712e76450f27a61dc60ed3b73907473df1b5095c62499695ff45cd81edf38

See more details on using hashes here.

File details

Details for the file WAF_AI-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: WAF_AI-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 166.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for WAF_AI-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8aad978d1d37bfc1c3473b804ff80e10925e8c519aec9e60e4f3b7b4a6c81354
MD5 8fd2cdeda128e4241a7d92b0aee8fdd5
BLAKE2b-256 5935bb7c2754af5cfff432b4999854bb51bd81871720498915da68c13361831d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page