haroonawanofficial / XSSInspector-SecurityToolkit-AI-ML

World's first Artificial Intelligence (XSS) Cross Site Scripting powered by Machine Learning with extreme fine-tuning designed to detect Reflected, Stored, DOM, and Blind (XSS) vulnerabilities in servers/apps at RFC design, forms, crawls, and through advanced AI techniques with deep and reinforcement learning, (NLP) and automatic payload generation
19 stars 5 forks source link

XSSInpector Security AI ML

Overview

World's first Artificial Intelligence (XSS) Cross Site Scripting powered by Machine Learning with extreme fine-tuning designed to detect Reflected, Stored, DOM, and Blind (XSS) vulnerabilities in servers/apps at RFC design, forms, crawls, and through advanced AI techniques with deep and reinforcement learning, (NLP) and automatic payload generation.

Creator

Created and designed by Haroon Ahmad Awan.

Requirements

Save the following content as requirements.txt in the root directory of your project:

Essential Libraries

numpy
scipy
scikit-learn
pandas
tensorflow
keras
sqlalchemy
flask
beautifulsoup4
requests
lxml

Create a virtual environment:

python3 -m venv venv

On Windows/Linux/Mac:

source venv/bin/activate
venv\Scripts\activate
pip install -r requirements.txt

Run your project:

python xssscanadv.py

Contact

Features

AI-ML Trained Obfuscation Methods

Known to Unknown

Includes built-in obfuscation methods to automatically check if we successfully bypassed the firewall. Results are then recorded into trained data, enhancing the detection and accuracy of payloads to identify more vulnerabilities.

HTTP Verbs

Fuzz

Built-in HTTP verb tampering to check for vulnerabilities, using known and unknown HTTP verbs.

Machine Learning

Deep Learning Models

Utilizes neural networks to predict vulnerabilities based on complex features.

Model Training and Prediction

Trains models on past scan results and uses them to filter and prioritize URLs for scanning.

Natural Language Processing (NLP)

Content Analysis

Analyzes web page content to identify forms and input fields that could be susceptible to XSS attacks.

Form and Input Extraction

Extracts details of forms and input fields to better target XSS injection points.

Reinforcement Learning

Adaptive Learning

Learns from each scanning attempt to improve payload selection and application over time.

History-Based Adjustments

Adjusts future payload selection based on the success of past attempts.

Automated Payload Generation

Dynamic Payloads

Generates sophisticated XSS payloads dynamically based on the structure of the web page.

Server-Specific Payloads

Provides tailored payloads for different server types (e.g., nginx, apache, IIS).

URL Crawling

Deep Crawling

Fetches additional URLs using CommonCrawl and Wayback Machine to ensure comprehensive coverage.

Targeted Crawling

Focuses on URLs likely to be vulnerable based on predictive models.

Detection of XSS

Blind XSS

Detects blind XSS vulnerabilities and can use custom endpoints to detect real-time blind XSS, training the software for more accuracy in future scans. Types include:

Reflected XSS

Identifies reflected XSS vulnerabilities and their subtypes by analyzing the immediate reflection of payloads. Types include:

Stored XSS

Detects stored XSS vulnerabilities by inspecting whether payloads are saved and executed later within the web application. Types include:

Reporting and Logging

Database Logging

Logs all scan results in a SQLite database for easy access and analysis.

How to View Logged Database

Go to https://inloop.github.io/sqlite-viewer/# and import the .db file to see what's going on after you have finished scanning with success and failure ratios(intended for expert users only)

HTML Reports

Generates detailed HTML reports summarizing the scan results and vulnerabilities found.

Multi-Threading

Concurrent Scanning

Utilizes multi-threading to scan multiple URLs simultaneously, improving scanning speed and efficiency.

Usage

Crawl the target website for URLs

python xssscanadv.py -d http://testphp.vulnweb.com --crawl

Target website for URLs with Report

python xssscanadv.py -d http://testphp.vulnweb.com --crawl --report report.html

Crawling URLs for scanning

python xssscanadv.py -l crawled_urls.txt -t 100 --duration 3600 -s --mode autounderstand --use-model --report report.html

Quickly extract and clean URLs from the Wayback Machine, Common Crawl

python xssscanadv.py -d http://testphp.vulnweb.com --extractquick

Use the cleaned URLs for scanning

python xssscanadv.py -l testphp_vulnweb_com_cleaned_urls.txt -t 100 --duration 3600 -s --mode autounderstand --use-model --report report.html

Use the cleaned URLs with domain for scanning with Aritificial Intelligence and Machine Learning Mode

python xssscanadv.py -d domain testphp.vulnweb.com -l testphp_vulnweb_com_cleaned_urls.txt -t 100 --duration 3600 -s --mode autounderstand --use-model --report report.html

Perform a deep crawl using CommonCrawl and Wayback Machine

python xssscanadv.py -d http://testphp.vulnweb.com --deepcrawl --report myreport.html

Use the deep crawled URLs for scanning

python xssscanadv.py -l found_links.txt -t 100 --duration 3600 -s --mode autounderstand --use-model --report report.html

Screenshots

AI-ML XSS Pic1 AI-ML XSS Pic2

Training for Machine Learning

Trained model is ready to use with --mode autounderstand for Artificial Intelligence

AI-ML XSS Pic4

High Accuracy and Low Loss Indicating Effective Learning

View model or evaluate model training and performance