Skip to content

KuRo0x/Net-Mapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ NetMapper

Professional Network Discovery & Security Monitoring Tool

NetMapper is a real-time network device discovery and monitoring system built with Python. It provides passive and active network scanning capabilities with an intuitive web-based dashboard for visualizing network topology and detecting unauthorized devices.


✨ Features

  • πŸ” Active Network Scanning - ARP-based device discovery across your local network
  • πŸ“‘ Passive Traffic Monitoring - Real-time packet sniffing for automatic device detection
  • 🎯 Device Tracking - Persistent device identification via MAC addresses
  • 🚨 Alert System - Automatic alerts for new or suspicious devices
  • πŸ“Š Web Dashboard - Beautiful, responsive interface for network visualization
  • πŸ’Ύ SQLite Database - Lightweight, serverless data persistence

πŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • Windows, Linux, or macOS
  • Administrator/root privileges (for network scanning)

Installation

  1. Clone or download the repository

    cd Net-Mapper
  2. Create a virtual environment

    python -m venv .venv
    .venv\Scripts\activate  # Windows
    source .venv/bin/activate  # Linux/Mac
  3. Install dependencies

    pip install -r requirements.txt
  4. Start the application

    python run.py
  5. Open your browser

    http://localhost:5000
    

πŸ“ Project Structure

Net-Mapper/
β”œβ”€β”€ πŸ“‚ core/                    # Core functionality
β”‚   β”œβ”€β”€ discovery.py            # Active network scanning (ARP)
β”‚   β”œβ”€β”€ passive_sniffer.py      # Passive traffic monitoring
β”‚   β”œβ”€β”€ correlation_engine.py   # Device tracking & DB sync
β”‚   └── __init__.py
β”‚
β”œβ”€β”€ πŸ“‚ db/                      # Database layer
β”‚   β”œβ”€β”€ database.py             # SQLAlchemy models
β”‚   └── __init__.py
β”‚
β”œβ”€β”€ πŸ“‚ web/                     # Web interface
β”‚   β”œβ”€β”€ app.py                  # Flask application
β”‚   β”œβ”€β”€ routes.py               # API routes
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ templates/             # HTML templates
β”‚   β”‚   └── dashboard.html
β”‚   └── static/                # Static assets
β”‚       β”œβ”€β”€ css/
β”‚       β”œβ”€β”€ js/
β”‚       └── img/
β”‚
β”œβ”€β”€ πŸ“‚ scripts/                 # Utility scripts
β”‚   β”œβ”€β”€ quick_scan.py          # Quick network scan tool
β”‚   └── start_monitor.py       # Start passive monitoring
β”‚
β”œβ”€β”€ πŸ“‚ docs/                    # Documentation
β”‚   β”œβ”€β”€ INSTALLATION.md         # Installation guide
β”‚   └── API.md                  # API documentation
β”‚
β”œβ”€β”€ πŸ“‚ data/                    # Database storage (auto-generated)
β”‚   └── netmapper.db
β”‚
β”œβ”€β”€ πŸ“„ run.py                   # Application entry point
β”œβ”€β”€ πŸ“„ config.py                # Configuration settings
β”œβ”€β”€ πŸ“„ setup.py                 # Package installation script
β”œβ”€β”€ πŸ“„ requirements.txt         # Python dependencies
β”œβ”€β”€ πŸ“„ LICENSE                  # MIT License
β”œβ”€β”€ πŸ“„ .gitignore               # Git ignore rules
└── πŸ“„ README.md                # This file

🎯 Usage

Start the Dashboard

python run.py

Access the dashboard at: http://localhost:5000

Quick Network Scan (Requires Admin)

Windows:

# Run PowerShell as Administrator
python scripts\quick_scan.py

Linux/Mac:

sudo python scripts/quick_scan.py

Start Passive Monitoring (Requires Admin)

Windows:

# Run PowerShell as Administrator
python scripts\start_monitor.py

Linux/Mac:

sudo python scripts/start_monitor.py

Advanced Usage

See API Documentation for programmatic usage and Installation Guide for detailed setup instructions.


πŸ”’ Security Considerations

⚠️ Important:

  • NetMapper requires administrator/root privileges for raw packet access
  • Only use on networks you own or have permission to monitor
  • This tool is for educational and authorized security auditing only
  • Unauthorized network scanning may be illegal in your jurisdiction

πŸ› οΈ Configuration

Database Location

The SQLite database is stored in data/netmapper.db. To change the location, edit web/app.py:

db_path = os.path.join(basedir, '..', 'data', 'netmapper.db')

Port Configuration

Default port is 5000. To change it, edit run.py:

app.run(debug=True, port=5000, host='0.0.0.0')

πŸ“Š Dashboard Features

The web dashboard provides:

  • Device Overview - Total device count and active alerts
  • Alert Feed - Real-time notifications for new devices
  • Device Table - Comprehensive list with:
    • IP Address
    • MAC Address
    • Trust Level (NEW/KNOWN/SUSPICIOUS)
    • First & Last Seen timestamps

πŸ”§ Technology Stack

  • Backend: Python 3.8+, Flask 3.1
  • Database: SQLite with SQLAlchemy ORM
  • Network: Scapy for packet manipulation
  • Frontend: HTML5, CSS3 (no external frameworks)

πŸ“ Database Schema

Devices Table

  • id - Primary key
  • mac_address - Unique device identifier
  • ip_address - Current IP (may change)
  • hostname - Device name (if available)
  • vendor - MAC vendor lookup
  • trust_level - new/known/suspicious
  • is_active - Current status
  • first_seen - Initial detection timestamp
  • last_seen - Most recent activity

Alerts Table

  • id - Primary key
  • device_id - Foreign key to devices
  • alert_type - Alert category
  • message - Alert description
  • timestamp - When alert was generated
  • resolved - Resolution status

🀝 Contributing

This is an educational project. Feel free to fork and modify for your needs.


πŸ“„ License

This project is for educational purposes. Use responsibly and ethically.


⚠️ Troubleshooting

"Permission Denied" Error

  • Solution: Run as Administrator (Windows) or use sudo (Linux/Mac)

No Devices Found

  • Solution: Ensure you're running with admin privileges and firewall isn't blocking

Dashboard Shows 404

  • Solution: Make sure run.py is executed from the project root directory

Module Import Errors

  • Solution: Activate virtual environment and reinstall dependencies

πŸ“ž Support

For issues or questions, please check the troubleshooting section above.


Built with πŸ”’ for network security education

About

Network Discovery & Security Monitoring Tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors