Skip to content

A lightweight, educational Python tool built with Scapy that captures live network traffic and detects suspicious activity in real time.

Notifications You must be signed in to change notification settings

ToastedXi/Simple-Sniffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” Simple Packet Sniffer with Basic Threat Alerts

A lightweight Python based network packet sniffer built with Scapy that monitors live traffic and provides real-time alerts for suspicious activity.

Perfect for learning network security fundamentals and building a hands on cybersecurity portfolio.


๐Ÿ“– About

This tool captures live network packets on a specified interface and displays key details (source/destination IP, ports, protocol, flags).
More importantly, it includes simple but effective detection rules to flag common threats, giving you practical exposure to how SOC analysts monitor and triage network activity.

Built as an educational project to practice packet analysis, scripting detection logic, and understanding real world network threats.

No external dependencies beyond Scapy, just pure Python.


โœจ Features

๐Ÿ“ก Live packet capture and readable summaries
โš ๏ธ Real-time alerts for:

  • Suspiciously long DNS queries (potential DNS tunneling/exfiltration)
  • High volume of SYN packets from a single source (potential port scan or SYN flood)
  • Regular timed connections (potential C2 beaconing)
    ๐Ÿ”‡ Default filter excludes noisy SSH traffic (port 22) for cleaner output on servers
    โŒจ๏ธ Command-line options for interface selection and packet limit
    ๐Ÿง  Easy to extend with new detection rules

๐Ÿง  What I Learned

  • Understanding packet structure and network protocols (IP, TCP, UDP, DNS)
  • Writing detection logic for common threats using timing, volume, and pattern analysis
  • Using Scapy for packet capture and parsing in Python
  • Filtering traffic with BPF to reduce noise in real environments
  • Building clean, readable tools that simulate blue team monitoring workflows
  • Documenting and presenting security projects for a professional portfolio

๐Ÿ–ผ๏ธ Examples & Alerts

Here are real outputs from running the sniffer on a live server:

Normal Traffic Capture

Normal Traffic

Suspicious Long DNS Query Alert (Potential Tunneling)

Long DNS Alert


๐Ÿ›  Requirements

Requirements

  • Python 3.6+
  • Scapy (pip install scapy)
  • Root/admin privileges (required for raw packet capture)

About

A lightweight, educational Python tool built with Scapy that captures live network traffic and detects suspicious activity in real time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages