Skip to content

A mini AI-powered system that analyzes simulated TCP/IP traffic, detects suspicious activity, and performs self-healing actions like IP blocking and alerting. Includes traffic visualization and SYN-flood detection.

Notifications You must be signed in to change notification settings

ananyavrm04/TCP-Self-Healing-Traffic-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🚦 TCP Self-Healing Traffic Analyzer

A mini project that simulates TCP/IP network traffic, detects anomalies like SYN flooding and high-frequency packets from suspicious IPs, and performs self-healing actions such as IP blocking and mock alerting. Built to showcase system-level AI, anomaly detection, and basic cybersecurity response.

πŸš€ Features

  • πŸ“¦ Simulates TCP packet logs using Python
  • πŸ” Detects suspicious behavior using rule-based logic
  • ⚠ Detects SYN-flood attempts based on TCP flag patterns
  • πŸ›‘οΈ Auto-blocks IPs and generates mock alerts
  • πŸ“Š Visualizes traffic per IP over time using Matplotlib
  • 🧠 Logs blocked IPs for future tracking

πŸ› οΈ Tech Stack

  • Python (pandas, numpy)
  • Matplotlib (for traffic plots)
  • Rule-based anomaly detection
  • Simulated TCP/IP packet data

πŸ“ Files

  • tcp_analyzer.ipynb – Main notebook with full logic
  • blocked_ips_log.csv – IPs flagged from basic anomaly logic
  • final_blocked_ips_log.csv – Final list including SYN-flag patterns
  • Traffic plot image (optional)

πŸ“ˆ Sample Output

  • High-traffic IPs flagged if they send >100 packets
  • IPs with >30 SYN packets also flagged
  • IPs are "blocked" and an admin is alerted in simulation
  • Time-based traffic chart for visual monitoring

πŸ’‘ Why It Stands Out

Unlike typical Python projects, this one mimics a lightweight intrusion detection system (IDS) using AI-inspired logic, showing a deep understanding of network behavior, cybersecurity, and automated response. No web frontend or cloud needed β€” fully backend-engineered and AI-focused.

πŸ“Œ How to Run

  1. Open tcp_analyzer.ipynb in Google Colab or Jupyter
  2. Run all cells step-by-step
  3. Customize IP patterns, thresholds, or traffic behavior if needed
  4. View alerts, blocked IP logs, and traffic charts

πŸ” Disclaimer

This is a simulation project β€” it does not interact with real network traffic or modify firewalls. Intended for educational and showcase purposes only.

About

A mini AI-powered system that analyzes simulated TCP/IP traffic, detects suspicious activity, and performs self-healing actions like IP blocking and alerting. Includes traffic visualization and SYN-flood detection.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published