Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cyber_SL

A Python + Next.js lab tool for simulating and studying network and web attacks in a controlled, educational environment. It pairs a set of traffic-generation scripts with a live telemetry dashboard so you can capture before / during / after evidence of an attack's impact on a target you own.

Warning

For authorized lab testing on systems you own or have explicit written permission to test. Running these tools against machines or networks you do not control is illegal in most jurisdictions. You are solely responsible for how you use this software.


What's inside

Component File Role
Attack engine attack.py Core traffic generators (UDP, SYN, ICMP, HTTP, DNS, Slowloris) + CLI
Port scanner resolver.py Resolves a domain to IP(s) and scans common ports
Web backend web_api.py Local HTTP API (127.0.0.1:8777) driving the engine + live ping monitor
Dashboard dashboard-next/ Next.js + Recharts front end with live latency / packet-loss charts
Launcher start.sh Starts the backend and dashboard together

Requirements

  • Python 3.8+ (standard library only — no pip install needed for the Python side)
  • Node.js 18+ and npm (for the dashboard)

Quick start (recommended)

Runs the API backend and the Next.js dashboard together, then opens the browser:

./start.sh

On the first run it installs the dashboard's npm dependencies automatically. Press Ctrl+C to stop both.


Running components individually

Web dashboard (backend + UI)

python web_api.py                 # backend API on :8777
cd dashboard-next && npm run dev   # dashboard on :3000

From the dashboard you can scan ports, start/stop a monitor, launch an attack, and watch the live impact verdict update in real time.

Command line — attacks

python attack.py -t <TARGET_IP> -a <TYPE> [-p PORT] [-s SIZE] [-d DURATION]
Flag Description Default
-t, --target Target IP address (required) —
-a, --attack Attack type (required) — see table below —
-p, --port Target port 80
-s, --size Packet size in bytes / rate 1024
-d, --duration Duration in seconds 30

Example:

python attack.py -t 192.168.8.10 -a udp -p 80 -s 1024 -d 30

Attack types

Type Description
udp UDP flood — random UDP packets to the target port
syn SYN flood — TCP SYN packets to exhaust connection resources
icmp ICMP flood — echo requests (ping flood)
http HTTP flood — repeated HTTP GET requests to a web server
dns DNS amplification — DNS queries to amplify traffic
slowloris Slowloris — incomplete HTTP requests to hold connections open

Command line — reconnaissance

Resolve a domain and scan common ports, or scan an IP directly:

python resolver.py -d example.com     # resolve domain, then scan
python resolver.py -i 192.168.8.10    # scan an IP directly (skips DNS)

Web API reference

The backend (web_api.py) listens on http://127.0.0.1:8777:

Method Endpoint Purpose
GET /api/status Current monitor + attack state, latency/loss series, impact verdict
POST /api/scan Scan common ports on a target IP
POST /api/attack/start Launch an attack (ip, type, port, size, duration)
POST /api/attack/stop Stop the running attack
POST /api/monitor/start Begin pinging the target (1 ping/s)
POST /api/monitor/stop Stop the monitor

Tech stack

  • Backend / tools: Python 3 standard library (socket, http.server, subprocess)
  • Frontend: Next.js 14, React 18, Recharts

Disclaimer

This project is provided for education and authorized security testing only. The authors accept no liability for misuse. Test only what you own or are explicitly permitted to test.

About

A Python + Next.js lab tool for simulating and studying network and web attacks in a controlled educational environment.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages