Django REST + PostgreSQL + Django Channels WebSocket + Go Worker
✅ Subsystem 1: User Management - COMPLETED
✅ Subsystem 2: Reconnaissance - COMPLETED
✅ Subsystem 3: Network & Server Analysis - COMPLETED (Just implemented!)
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ │ │ │ │ │
│ React Frontend │◄────►│ Django Backend │◄────►│ Go Worker │
│ │ WSS │ + Channels WS │ HTTP │ Scanner │
│ │ │ │ │ │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│ │
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ PostgreSQL │ │ External Tools │
│ Database │ │ - Subfinder │
│ │ │ - Nmap │
└─────────────────┘ │ - httpx │
└─────────────────┘
- JWT authentication
- Role-based access control (Admin/User)
- User registration & login
- Secure password handling
- Subdomain Enumeration: Subfinder integration
- Live Host Detection: httpx probing
- Endpoint Discovery: Web endpoint crawling
- Technology Fingerprinting: Header & content analysis
- Real-time Updates: WebSocket streaming of results
- Port Scanning: Nmap TCP connect scan with service detection
- SSL/TLS Analysis: Version detection, weak cipher identification
- Certificate Validation: Expiry checks, issuer verification
- Directory Misconfiguration: Sensitive path detection (.git, .env, backups, admin panels)
- Real-time Results: Chunked streaming via WebSocket
- Concurrent Host Probing: 10-50x faster with worker pools
- Multiple IP Support: IPv4 + IPv6 resolution
- HTTP Fallback: Works without httpx using native Go
- Enhanced Error Tracking: Detailed error messages for debugging
- Production-Ready: Robust timeout handling and error recovery
📖 See: Refactoring Guide | Quick Start | Summary
- Python 3.11+
- Go 1.21+
- PostgreSQL 14+
- Node.js 18+ (for frontend)
- Nmap (for network analysis)
cd backend
python -m venv env
source env/bin/activate # or .\env\Scripts\activate on Windows
pip install -r requirements.txt
# Configure database in settings.py
python manage.py migrate
python manage.py createsuperuser
# One-command local startup (auto-starts Redis + Celery worker + Django)
python manage.py devserver
# `runserver` now delegates to `devserver` automatically in this project.
python manage.py runserver
# Optional fallback if you want Django only
# python manage.py runserver --plain-runservercd scanner
go mod download
go run .cd frontend
npm install
npm run dev- Login to the frontend
- Create a scan with a target domain (e.g.,
example.com) - Watch real-time progress via WebSocket
- View results:
- Subdomains discovered
- Live endpoints found
- Open ports detected
- TLS/SSL configuration
- Directory misconfigurations
For each alive host discovered during reconnaissance:
- Top 200 most common ports
- TCP connect scan (safe, non-intrusive)
- Service version detection
- Banner grabbing
- Example output:
80/tcp open http nginx 1.18.0443/tcp open https nginx 1.18.022/tcp open ssh OpenSSH 8.2p1
- Tests TLS 1.0, 1.1, 1.2, 1.3 support
- Identifies weak versions (TLS 1.0, 1.1)
- Certificate validation:
- Expiry date
- Issuer
- Validity status
- Example issues:
weak_tls_version_10certificate_expiring_sooncertificate_expired
Checks for common misconfigurations:
.git/directory exposure.envfile accessibility- Backup directories (
/backup/,/backups/) - Admin panels (
/admin/) - API documentation (
/swagger,/api-docs) - Server status pages (
/server-status,/actuator)
Example findings:
/.git/ → 200 OK → sensitive_file_exposed/.env → 200 OK → sensitive_file_exposed/admin/ → 200 OK → admin_panel_accessible
✅ Detection Only - No exploitation
✅ Non-Intrusive Scanning:
- TCP connect (not SYN scan)
- Limited port range (200 ports)
- Reasonable timeouts
- GET requests only for directories
✅ Configurable Concurrency:
- 10 worker goroutines (adjustable)
- Per-host timeout enforcement
- Graceful error handling
POST /api/accounts/register/- User registrationPOST /api/accounts/login/- JWT loginGET /api/accounts/me/- Current user profile
POST /api/recon/scans/start/- Create new scanGET /api/recon/user/scans/- List user's scansGET /api/recon/user/scans/{id}/- Scan details with results
POST /api/recon/scans/{id}/network/ports/ingest/- Port findingsPOST /api/recon/scans/{id}/network/tls/ingest/- TLS resultsPOST /api/recon/scans/{id}/network/dirs/ingest/- Directory findings
ws://localhost:8000/ws/scans/- Real-time scan updates- Message types:
scan_status- Scan lifecycle eventssubdomains_chunk- Subdomain discoveriesendpoints_chunk- Endpoint discoveriesnetwork_ports_chunk- Port scan results NEWnetwork_tls_result- TLS analysis NEWnetwork_dirs_chunk- Directory findings NEW
- Scan: Scan jobs with status tracking
- Subdomain: Discovered subdomains with IP and liveness
- Endpoint: Discovered web endpoints with fingerprints
- PortScanFinding: Open ports with service details
- TLSScanResult: TLS/SSL configuration per host
- DirectoryFinding: Directory misconfigurations
# Django tests
cd backend
python manage.py test
# Go tests
cd scanner
go test ./... -vrevulnera/
├── backend/ # Django REST API
│ ├── accounts/ # User management
│ ├── reconscan/ # Scan orchestration & results
│ └── revulnera_project/ # Settings
├── scanner/ # Go worker
│ ├── recon/ # Subdomain enumeration
│ ├── endpoints/ # Endpoint discovery
│ ├── network/ # Network analysis (ports, TLS, dirs)
│ └── main.go # HTTP server
├── frontend/ # React UI
└── docs/ # Documentation
Date: January 2026
Files Changed: 8 files
Files Created: 3 files
- ✅ Added 3 new models (
PortScanFinding,TLSScanResult,DirectoryFinding) - ✅ Created 3 serializers
- ✅ Implemented 3 ingestion API endpoints
- ✅ Added WebSocket broadcasting for network results
- ✅ Registered models in Django admin
- ✅ Created migration
0002_network_analysis_models.py
- ✅ Integrated network analysis into scan pipeline
- ✅ Added concurrent host processing (10 workers)
- ✅ Implemented chunked result POSTing
- ✅ Added error handling and resilience
- 📄
NETWORK_ANALYSIS_IMPLEMENTATION.md- Complete technical documentation - 📄
QUICK_START_NETWORK_ANALYSIS.md- Setup and testing guide - 📄
setup_network_analysis.sh- Automated setup script
cd backend
python manage.py migrate reconscanExpected output:
Applying reconscan.0002_network_analysis_models... OK
- Subdomain enumeration: 1-2 minutes
- Endpoint discovery: 3-5 minutes
- Network analysis: 10-15 minutes
- Port scanning: ~5 minutes (200 ports × 100 hosts)
- TLS checking: ~3 minutes
- Directory checking: ~7 minutes
- Concurrent workers (10 goroutines)
- Bulk database inserts
- Chunked WebSocket streaming
- Timeout enforcement
- JWT tokens with expiry
- Password hashing (Django PBKDF2)
- CORS configuration
- CSRF protection
⚠️ Only scan authorized targets⚠️ Respect robots.txt and rate limits⚠️ No exploitation or attacks⚠️ Detection-only approach
- User isolation (scan ownership)
- Database constraints
- Input validation
- Parameterized queries
sudo apt-get install nmap # Ubuntu/Debian
brew install nmap # macOS- Check target domain is valid
- Verify DNS resolution
- Ensure network connectivity
- This is normal if re-running migrations
- Check:
python manage.py showmigrations reconscan
- Ensure Django Channels is running
- Check ALLOWED_HOSTS in settings
- Verify Redis/Channels layer configuration
- Vulnerability correlation with CVE databases
- Automated scheduling & periodic rescans
- PDF/CSV report generation
- Custom wordlists for directory scanning
- Advanced TLS cipher suite analysis
- HTTP security header analysis
- Multi-tenant support
- Email notifications
This is a security research tool. Contributions should:
- Maintain non-intrusive scanning approach
- Add tests for new features
- Update documentation
- Follow existing code patterns
[Add your license here]
- Subfinder: OWASP Amass alternative for subdomain enumeration
- Nmap: Network exploration and security auditing
- httpx: Fast HTTP toolkit
- Django: High-level Python web framework
- Go: Efficient concurrent worker implementation
For issues, questions, or feature requests:
- Check
docs/NETWORK_ANALYSIS_IMPLEMENTATION.mdfor detailed docs - Check
docs/QUICK_START_NETWORK_ANALYSIS.mdfor setup help - Review Django logs:
python manage.py runserveroutput - Review Go logs: Worker console output
Last Updated: January 27, 2026
Version: 1.0.0 (Network Analysis Complete)