Skip to content

Latest commit

 

History

History
71 lines (46 loc) · 1.59 KB

File metadata and controls

71 lines (46 loc) · 1.59 KB

Python DoS Detection Script

A lightweight, real‑time network monitoring tool designed to detect potential Denial‑of‑Service (DoS) activity by analyzing live traffic patterns on a specified network interface. Built with Python and Scapy, this script helps identify abnormal packet rates, repeated source targeting, and other indicators commonly associated with DoS attempts.


Overview

This script continuously inspects incoming packets and tracks:

  • Sudden spikes in packet volume
  • Repeated requests from the same source
  • Potential SYN/UDP/ICMP flood behavior
  • Basic anomaly patterns associated with DoS attacks

It is intended for learning, experimentation, and defensive monitoring on networks you own or have explicit permission to analyze.


Features

  • Real‑time packet capture and inspection
  • Threshold‑based DoS detection logic
  • Source IP tracking and event counting
  • Console alerts when suspicious activity is detected
  • Simple, readable Python code for customization

Requirements

  • Python 3.x
  • Scapy

Install dependencies:

pip install scapy

Usage

sudo python3 DoSDetectionScript.py -i <interface>

OR

sudo python3 DoSDetectionScript.py

Using no interface will default to your current connection.


Examples:

sudo python3 DoSDetectionScript.py -i eth0
sudo python3 DoSDetectionScript.py

License

Python DoS Detection Script © 2026 by The-R34per is licensed under CC BY-SA 4.0. To view a copy of this license, visit https://creativecommons.org/licenses/by-sa/4.0/