Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dr4x-c0d3r/x4v1er

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ChatGPT Image Jun 26, 2025, 01_01_57 PM

X4V1ER Firewall Documentation

Overview

X4V1ER Firewall is a Python-based network security tool designed to monitor and intercept malicious traffic in real-time. It features both a command-line interface (CLI) and a graphical user interface (GUI), offering automated attack detection, reporting, and IP blocking capabilities.

πŸ”§ Features

  • Real-time traffic monitoring
  • Detection of:
    • Port scanning
    • Brute-force attempts
    • Rate-limiting violations
    • SQL injection (SQLi)
    • Cross-site scripting (XSS)
    • SYN flood attacks
  • Automatic threat blocking with firewall rules
  • HTML report generation
  • Email alerting (Gmail/Outlook/Hotmail)
  • Export to CSV/JSON
  • GUI dashboard for IP management

🏁 Getting Started

  git clone https://github.com/DR4X-c0d3r/x4v1er.git \
  cd x4v1er/ 

Requirements

  • Python 3.x
  • Root/admin privileges
  • Linux or Windows
  • Required libraries:
  pip install scapy colorama tkinter # If you get any error, check if you already installed pip then create virtual env with python
  # create python env
  python3 -m env firewall-env
  # reinstall libraries
  pip install -r requirements; sudo apt install python3-tk #for tkinter
  sudo apt install scapy

Run It From Cmd

  sudo cp firewall.py /usr/bin/x4v1er \
  chmod +x /usr/bin/x4v1er \
  sudo x4v1er -v #version of x4v1er and required root user

Email Configuration

Create a config.json file:

{
  "sender_email": "[email protected]",
  "sender_password": "your_app_password"
}

Use an App Password if using Gmail with 2FA.

πŸš€ Usage

CLI Mode

sudo python3 firewall.py -d 192.168.1.1 -at -st [email protected]

GUI Mode

sudo python3 firewall.py -d 192.168.1.1 -g

πŸ§ͺ Command-Line Options

Option Description
-d, --destination_ip IP to protect
-e, --exclude Comma-separated trusted IPs
-rt, --rate_threshold Max requests per 10s (default: 5)
-pt, --port_threshold Max port attempts (default: 5)
-ft, --fail_threshold Max failed logins (default: 5)
-sw, --scan_window Time window for port scan (default: 60s)
-at, --auto-block Auto block threats
-g, --gui Launch GUI
-i, --iface Network interface
-ex, --export Export attack data to CSV
-js, --json-export Export attack data to JSON
-st, --send-to Email report to address
--mode Detection sensitivity: default/aggressive/realistic
-v, --version Print version
-h, --help Show help

πŸ›‘οΈ Detection Methods

  1. Rate Limiting – N requests per 10 seconds from a single IP
  2. Port Scanning – Multiple ports scanned in short time
  3. Brute Force – Excessive failed login attempts (RST packets)
  4. SYN Flood – SYN packets > 10/sec
  5. SQL Injection – Payload with suspicious SQL keywords
  6. XSS – Malicious HTML/script tags in packet data

🧰 System Components

  • firewall.py: Core logic for packet processing, attack detection, and GUI
  • config.json: Email configuration
  • blocked_ips.txt: Persistent list of blocked IPs
  • reports/: Stores HTML threat reports

πŸ“§ Email Reporting

  • Uses smtplib and email.mime
  • Supported: Gmail, Outlook, Hotmail

πŸ–₯️ GUI Highlights

  • Suspicious IP list
  • Manual and auto-block toggle
  • Export reports
  • Whitelist management
  • Event log display

πŸ” Security Note

  • Run with root or admin privileges
  • Use app passwords for Gmail security

πŸ“‚ Example Report

HTML file includes:

  • IP address
  • Reason for block
  • Timestamp
  • Activity summary

πŸ“¦ Future Improvements

  • IPv6 support
  • Remote dashboards
  • Blacklist integration
  • ML-based detection

πŸ“Έ Screenshots

Exclude Trusted Ips And Export File Csv

exclude_trusted_ips_and_export_file_csv

Gui

gui

Help Menu

help_menu

Modes

modes

Modes 2

modes_2

Scan With Interface And Auto Block

scan_with_interface_and_auto_block

Scan Without Interface

scan_without_interface

Send Report Automatically

send_report_automatically

Thresholds And Export File Json

thresholds_and_export_file_json

Please If Any Problem Happend Tell Me In The Server Channel => https://discord.gg/Hunt3rs

YouTube => https://youtube.com/fr4nc0x1

TryHackMe => https://tryhackme.com/p/DR4X

That's It For Now And I Hope This Tool Makes Your Day Awesome, Remember With Great Power Comes Great Responsibility!

gray0_ctp_on_line

About

X4v1er is a firewall tool that can handle server traffic and block the malicious attacks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages