
Hunt Smarter, Hunt Harder
Professional Active Directory Security Analysis and Threat Detection Platform
Transform Windows authentication logs into actionable security insights with advanced threat detection and interactive visualizations
ADTrapper is a comprehensive security analysis platform designed for cybersecurity professionals to analyze Windows Active Directory authentication logs. The platform provides advanced threat detection, anomaly analysis, and interactive visualizations to help identify and investigate security incidents.
git clone https://github.com/MHaggis/ADTrapper.git
cd ADTrapper
# Copy the example environment file
cp env.example .env
# (Optional) Generate a secure password for production
# echo "POSTGRES_PASSWORD=$(openssl rand -base64 32)" >> .env
# Option 1: Use the deployment script (recommended)
./deploy.sh
# Option 2: Manual startup
docker compose up -d
docker compose exec -T database psql -U postgres < supabase/migrations/0001_simple_setup.sql
No authentication required - start uploading logs immediately!
Use the included PowerShell script to collect authentication logs. Run as Administrator for full access:
# Show help and all options
Get-Help .\capture.ps1 -Detailed
# Basic collection (last 24 hours)
.\capture.ps1
# Extended collection with AD enrichment
.\capture.ps1 -Hours 48 -EnrichWithAD
# Include AD CS certificate events (for ADCS attack detection)
.\capture.ps1 -ADCS -EnrichWithAD
# Full collection with raw CA database analysis (CA servers only)
# WARNING: This stops the Certificate Authority service temporarily!
.\capture.ps1 -ADCS -RawDatabase -EnrichWithAD
# Export as CSV instead of JSON
.\capture.ps1 -Hours 24 -Format csv -OutputPath C:\Logs\events.csv
Authentication Events:
AD CS Events (with -ADCS):
SMB Events:
ADTrapper supports SharpHound data for comprehensive AD analysis:
SharpHound.exe -c All -d YOURDOMAIN.COM --outputdirectory C:\Temp\
Upload the generated ZIP file to ADTrapper for automatic analysis.
# View status
docker compose ps
# View logs
docker compose logs -f app
docker compose logs -f database
# Restart services
docker compose restart
# Stop services
docker compose down
# Fresh deployment (WARNING: deletes all data)
./deploy-fresh.sh
# Backup
docker compose exec database pg_dump -U postgres postgres > backup.sql
# Restore
docker compose exec -T database psql -U postgres postgres < backup.sql
See env.example for all available options:
Database tables not found (500 errors):
docker compose exec -T database psql -U postgres < supabase/migrations/0001_simple_setup.sql
Port conflicts:
lsof -i :3000
lsof -i :54325
Application not responding:
docker compose logs app
docker compose restart
For production deployments:
POSTGRES_PASSWORD in your .env fileWe welcome contributions:
Apache License 2.0 - see LICENSE file
Built by security professionals, for security professionals
ADTrapper - Advancing Active Directory Security Analysis
| Flag | Description |
|---|
-Hours | Time range to collect (default: 24, max: 8760) |
-OutputPath | Output file path (default: .\adtrapper_events.json) |
-Format | Output format: json or csv |
-EnrichWithAD | Add user context (department, groups, privileges) |
-ADCS | Collect AD CS events for certificate attack detection |
-RawDatabase | Deep ESC1 analysis via CA database (requires confirmation) |
| Variable | Default | Description |
|---|
POSTGRES_PASSWORD | postgres | Database password |
NEXT_PUBLIC_SUPABASE_URL | http://localhost:3001 | REST API URL |
NEXT_PUBLIC_APP_URL | http://localhost:3000 | Application URL |
NODE_ENV | development | Environment mode |