Skip to content

burakozcn01/netmap

Repository files navigation

NetMap - Internet Discovery Engine

NetMap is a comprehensive network discovery and intelligence platform that automatically scans the global internet, similar to Shodan. It provides real-time detection of hosts, services, and DNS records across IP ranges with a modern dark-themed web interface.

πŸš€ Features

Automated Scanning

  • Continuous Internet Scanning: Automatically scans internet ranges with configurable frequency
  • Multi-type Scanning: Port scanning (1-65535), service detection, and passive data collection
  • Real-time Processing: Distributed scanning with Celery workers
  • Auto-startup: Begins scanning immediately when deployed

Discovery Capabilities

  • Port Scanning: Masscan integration for high-speed full port discovery
  • Service Detection: Nmap-powered service and version identification
  • DNS Intelligence: Comprehensive DNS record collection and analysis
  • Passive Reconnaissance: WHOIS and geolocation data gathering

Modern Web Interface

  • Dark Theme UI: Clean, minimal dark interface
  • Interactive Dashboard: Live statistics and host discovery tables
  • Advanced Search: Dedicated search page with tabbed results
  • API Documentation: Built-in interactive API documentation
  • Responsive Design: Mobile-friendly layout

Scalable Architecture

  • Docker Compose: Single production-ready containerization
  • PostgreSQL: Robust data storage
  • Elasticsearch: Fast search and analytics
  • Redis: Message brokering and caching
  • Distributed Workers: Horizontal scaling support

πŸ—οΈ Architecture

NetMap
β”œβ”€β”€ Web Application (Django)
β”œβ”€β”€ API Layer (Django REST Framework)
β”œβ”€β”€ Scanner Engine (Masscan + Nmap)
β”œβ”€β”€ Passive Collection (DNS/WHOIS)
β”œβ”€β”€ Celery Workers (Distributed Tasks)
β”œβ”€β”€ PostgreSQL (Data Storage)
β”œβ”€β”€ Elasticsearch (Search & Analytics)
└── Redis (Message Broker)

πŸš€ Quick Start

Prerequisites

  • Docker & Docker Compose
  • 8GB+ RAM recommended
  • Privileged container access (for raw sockets)

Installation

  1. Clone the repository:
git clone https://github.com/burakozcn01/netmap.git
cd netmap
  1. Start the platform:
docker-compose up -d
  1. Access the platform:

Auto-startup Behavior

The system automatically:

  • Initializes the database with critical internet ranges
  • Starts background scan processes for major cloud providers
  • Begins collecting internet intelligence immediately
  • Processes scan queues continuously

πŸ“Š API Endpoints

Core Data

  • GET /api/hosts/ - List discovered hosts
  • GET /api/services/ - List discovered services
  • GET /api/dns-records/ - List DNS records
  • GET /api/scan-results/ - List scan results

Search & Intelligence

  • GET /api/search/?q={query} - Search across all data types
  • GET /stats/ - Live statistics and metrics

Scan Management

  • GET /api/scan-jobs/ - List scan jobs
  • POST /api/scan-jobs/ - Create new scan
  • GET /api/ip-ranges/ - List target IP ranges

🎯 Target Ranges

NetMap includes pre-configured high-value internet ranges:

Critical Infrastructure (24h frequency)

  • Google Public DNS (8.8.8.0/24)
  • Cloudflare DNS (1.1.1.0/24)
  • OpenDNS (208.67.222.0/24)
  • Quad9 DNS (9.9.9.0/24)

Cloud Providers (48h frequency)

  • Amazon CloudFront (13.32.0.0/15)
  • Cloudflare CDN (104.16.0.0/12)
  • Google Cloud Platform (34.64.0.0/10)
  • Microsoft Azure (13.64.0.0/11)

Major Networks (Weekly)

  • AT&T Services, Comcast Cable, Verizon FiOS
  • RIPE European, APNIC Asia Pacific ranges

πŸ”§ Configuration

Environment Variables

# Database
POSTGRES_DB=netmap
POSTGRES_USER=netmap
POSTGRES_PASSWORD=netmap123

# Scanning - Full Port Range
SCAN_RATE_LIMIT=10000
SCAN_THREADS=100
SCAN_TIMEOUT=60

# Services
DEBUG=0
ELASTICSEARCH_URL=http://elasticsearch:9200
REDIS_URL=redis://redis:6379/0

Container Architecture

  • Web: Django application (2 replicas)
  • Worker: Celery workers (5 replicas)
  • Scanner: Privileged scanning containers (3 replicas)
  • Beat: Task scheduler
  • Database: PostgreSQL with 4GB memory
  • Search: Elasticsearch with 6GB memory

πŸ” Scanning Capabilities

Port Scanning

  • Full Range: Scans all ports 1-65535
  • Fast SYN scanning with Masscan
  • TCP/UDP protocol support
  • Rate-limited for responsible discovery

Service Detection

  • Nmap service identification
  • Version detection and banner grabbing
  • Confidence scoring
  • Product and version enumeration

Passive Collection

  • DNS record harvesting
  • WHOIS data collection
  • Hostname resolution
  • Geolocation and organization data

πŸ“ˆ Performance & Scaling

Resource Allocation

  • PostgreSQL: 4GB memory limit, 2GB reservation
  • Elasticsearch: 6GB memory limit, 4GB reservation
  • Redis: 2GB memory with LRU eviction
  • Web Workers: 4 Gunicorn workers per container
  • Scan Workers: 8 concurrent Celery workers

Horizontal Scaling

  • Multiple web replicas with load balancing
  • Distributed Celery workers for parallel scanning
  • Elasticsearch clustering support
  • Redis clustering for high availability

πŸ›‘οΈ Security & Legal

Responsible Scanning

  • Rate limiting to avoid service disruption
  • Respectful scanning practices
  • No exploitation attempts
  • Passive data collection focus

Legal Compliance

  • Use only for authorized networks or public information
  • Respect robots.txt and rate limits
  • Follow local and international laws
  • Educational and research purposes

🌐 Web Interface

Dashboard

  • Live Statistics: Hosts, services, DNS records, scan jobs
  • Recent Discoveries: Latest hosts and services found
  • Quick Actions: Create new scans directly from UI

Search Page

  • Unified Search: Search across hosts, services, and DNS records
  • Tabbed Results: Organized display of search results
  • Real-time Search: Instant results with loading states

API Documentation

  • Interactive Testing: Built-in API testing tool
  • Complete Examples: Request/response samples
  • Endpoint Documentation: Detailed parameter descriptions

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

πŸ“„ License

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

⚠️ Disclaimer

NetMap is designed for security research, network administration, and educational purposes. Users are responsible for ensuring compliance with applicable laws and regulations. Unauthorized scanning of networks you do not own may be illegal in your jurisdiction.

πŸ› Bug Reports

Report issues at: https://github.com/burakozcn01/netmap/issues


NetMap - Mapping the Internet, One Scan at a Time 🌐

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published