Skip to content

AktI-Tech/network-guardian

Repository files navigation

🛡️ Network Guardian

A blazing-fast, production-ready network security monitoring tool built with Rust. Detects threats in real-time using advanced threat detection algorithms.

Rust License Status

🚀 Features

Network Guardian includes 6 advanced threat detection methods:

ARP Spoofing Detection - Monitor IP-MAC mapping changes
DNS Spoofing Detection - Validate DNS response authenticity
MITM Attack Detection - Identify suspicious SSL/TLS certificates
Rogue Access Point Detection - Find fake WiFi networks
Traffic Anomaly Detection - Detect DDoS and data exfiltration patterns
Connection Quality Monitoring - Detect latency and packet loss issues

📋 Requirements

  • Rust 1.93.0+ - Install Rust
  • Windows/Linux/macOS - Cross-platform support
  • Administrator/Root privileges (for network monitoring)

Optional: For Phase 2 Features

  • Npcap (Windows) - Download
  • libpcap-dev (Linux) - sudo apt-get install libpcap-dev

⚙️ Installation

Clone the Repository

git clone https://github.com/yourusername/network-guardian.git
cd network-guardian

Build from Source

# Release build (optimized)
cargo build --release

# Debug build
cargo build

Run

# Using cargo
cargo run --release

# Direct executable (Windows)
.\target\release\network_guardian.exe

# Direct executable (Linux/macOS)
./target/release/network_guardian

🔧 Project Structure

network-guardian/
├── Cargo.toml                    # Project manifest
├── Cargo.lock                    # Dependency lock file
├── README.md                     # This file
├── .gitignore                    # Git ignore rules
│
├── src/
│   ├── main.rs                   # Entry point
│   ├── models.rs                 # Data structures
│   ├── network_monitor.rs        # Network monitoring module
│   ├── threat_detection.rs       # Threat detection algorithms
│   ├── ui.rs                     # Dashboard (Phase 2)
│   ├── daemon.rs                 # Daemon service
│   └── utils.rs                  # Utility functions
│
├── target/
│   └── release/
│       └── network_guardian      # Compiled binary
│
└── docs/
    └── ARCHITECTURE.md           # Technical documentation

📊 Project Statistics

Metric Value
Lines of Code 400+
Modules 7
Threat Methods 6
Dependencies 13
Binary Size 1.6 MB
Build Time ~40 seconds
Compiler Warnings 0

🛠️ Tech Stack

Technology Purpose
Rust Systems programming language
Tokio 1.35 Async runtime
serde Serialization/deserialization
chrono Timestamp handling
log/env_logger Logging framework
crossbeam Concurrent data structures

📖 Usage

Basic Usage

use network_guardian::threat_detection::ThreatDetector;

// Create detector
let mut detector = ThreatDetector::new();

// Check for threats
let threat = detector.detect_arp_spoofing(
    "192.168.1.1".parse().unwrap(),
    "00:11:22:33:44:55".to_string()
);

if let Some(alert) = threat {
    println!("🚨 Threat detected: {}", alert.description);
}

Enable Debug Logging

RUST_LOG=debug cargo run --release

Run Tests

cargo test

🔍 Threat Detection Examples

ARP Spoofing

Monitors ARP table for IP-MAC mapping changes that indicate potential spoofing attacks.

DNS Spoofing

Validates DNS responses against a cache to detect anomalous domain-to-IP resolutions.

MITM Detection

Flags suspicious SSL/TLS certificates with invalid issuers.

Rogue Access Points

Identifies suspicious WiFi networks with suspicious characteristics (weak encryption, odd SSIDs).

Traffic Anomalies

Uses baseline analysis to detect traffic spikes (5x baseline = alert).

Connection Quality

Monitors latency (>500ms) and packet loss (>10%) for degradation.

🚀 Roadmap

Phase 2 (Q1 2026)

  • Live packet capture with libpcap
  • Real-time GUI dashboard
  • Desktop notifications
  • SQLite threat logging
  • Windows Event Log integration

Phase 3 (Q2 2026)

  • Machine learning threat classification
  • Threat intelligence feed integration
  • REST API for remote monitoring
  • Multi-interface support

Phase 4 (Q3 2026)

  • Cloud threat dashboard
  • Mobile app companion
  • Advanced reporting
  • Threat prediction engine

🤝 Contributing

Contributions are welcome! Please feel free to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 Code Standards

  • Follow Rust naming conventions
  • Include doc comments for public APIs
  • Add tests for new features
  • Run cargo fmt before committing
  • Ensure cargo clippy passes

🐛 Bug Reports

Found a bug? Please open an Issue with:

  • Description of the bug
  • Steps to reproduce
  • Expected behavior
  • Actual behavior
  • System info (OS, Rust version)

📄 License

This project is licensed under the MIT License - see LICENSE file for details.

🙏 Acknowledgments

  • Built with ❤️ using Rust
  • Powered by GitHub Copilot CLI
  • Security research inspired by industry best practices

📞 Support

  • Documentation - See docs/ folder
  • Issues - GitHub Issues tracker
  • Discussions - GitHub Discussions
  • Email - akttechpublish***@gmail.com

Built with Rust 🦀 | Secured with ❤️ | Powered by AI 🚀

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages