Skip to content

bbhavya-jain/Network-traffic-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Network Traffic Simulation using Scapy

Overview

This project demonstrates the generation of network traffic in a controlled lab environment using Python and Scapy. It includes:

  • TCP SYN packet burst simulation
  • UDP traffic generation with random payloads
  • Use of randomized IPs and ports to mimic real-world traffic patterns

The project is strictly designed for educational and cybersecurity lab use only.

Disclaimer

This project must only be executed in:

  • Isolated virtual environments (e.g., Kali Linux + Metasploitable)
  • Authorized lab setups

Unauthorized use on public networks is illegal.

Technologies Used

  • Python 3
  • Scapy
  • Kali Linux (recommended)
  • VirtualBox / VMware

Project Structure

├── syn_burst_simulation.py ├── udp_traffic_generator.py └── README.md

Features

1. TCP SYN Burst Simulation

  • Generates TCP SYN packets
  • Randomizes source IP and port
  • Simulates traffic bursts with delay control

2. UDP Traffic Generator

  • Sends UDP packets with random payload
  • Uses randomized ports and IP addresses
  • Helps in traffic pattern observation

File Descriptions

syn_burst_simulation.py

  • Simulates TCP SYN packet flow

  • Useful for understanding:

    • TCP handshake behavior
    • Traffic burst patterns

udp_traffic_generator.py

  • Generates UDP packets continuously

  • Includes random payload generation

  • Useful for:

    • Network monitoring
    • Flow analysis

How to Run

Step 1: Install Dependencies

pip install scapy

Step 2: Run SYN Simulation

python syn_burst_simulation.py

Step 3: Run UDP Generator

python udp_traffic_generator.py

Example Use Case

  • Cybersecurity lab testing
  • Network traffic analysis
  • IDS/IPS testing
  • Packet flow observation

Key Concepts Covered

  • Packet crafting
  • TCP/UDP protocols
  • Traffic simulation
  • Network flow behavior

Future Improvements

  • Integration with CICIDS2017 dataset features
  • Flow-based feature extraction
  • ML model integration for attack detection
  • Real-time visualization dashboard

Author

Bhavya Jain

Contribution

Feel free to fork and improve the project for educational purposes.

About

SYN and UDP traffic simulation using Scapy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages