DonWatcher is a modern, containerized web-based dashboard for monitoring the health and security of your Active Directory environment. It supports multiple security assessment tools (PingCastle, Locksmith, Domain Analysis) and provides a unified interface for visualizing trends, tracking findings, and managing security risks across your infrastructure.
- Multi-Tool Support: Supports PingCastle XML, Locksmith JSON/CSV, and Domain Analysis JSON reports with automatic tool detection
- Multi-File Upload: NEW - Upload multiple security reports simultaneously with progress tracking and individual status reporting
- Unified Dashboard: Single interface for all security tools with tool-specific badges and severity indicators
- Advanced Risk Management: Enhanced accepted risk system with expiration dates, reasoning, and tool-aware filtering
- Group Monitoring: Track privileged AD group memberships and detect changes over time
- Agent Framework: Automated data collection agents for continuous monitoring (Domain Scanner included)
- Historical Analysis: Trend charts and recurring findings analysis across all supported tools
- Enhanced Alerting: Rich webhook notifications with tool context and detailed finding metadata
- Debug & Diagnostics: Built-in debug dashboard for system monitoring and troubleshooting
- Automated Migrations: Database migrations run automatically on startup with version tracking
- Health Checks: Comprehensive database health monitoring with
/api/healthendpoints - Risk Caching: LRU cache with TTL for risk calculations reduces database load
- Containerized Deployment: Production-ready Docker setup with PostgreSQL database
- Responsive Design: Mobile-friendly interface with enhanced filtering and sorting capabilities
- Robust Error Handling: Comprehensive error reporting and user-friendly error states
DonWatcher uses a modern three-container architecture with a React frontend:
DonWatcher/
βββ π README.md # This file
βββ π PROJECT_STRUCTURE.md # Detailed project organization
βββ π requirements.txt # Python dependencies (backend)
βββ π docker-compose.yml # Multi-container orchestration
β
βββ π frontend/ # React Frontend Application
β βββ π Dockerfile # Frontend container definition
β βββ π package.json # Node.js dependencies
β βββ π src/ # React source code
β βββ π components/ # Reusable UI components
β βββ π pages/ # Page components
β βββ π services/ # API client
β
βββ π backend/ # Backend Docker configuration
β βββ π Dockerfile # Backend container definition
β
βββ π server/ # FastAPI Backend Application
β βββ π main.py # FastAPI application entry point
β βββ π models.py # Pydantic data models
β βββ π parsers/ # Multi-format security tool parsers
β βββ π routers/ # API route modules
β
βββ π client/ # Client Components (remote machines)
β βββ π DonWatcher-DomainScanner.ps1 # PowerShell domain scanner
β βββ π DonWatcher-Config.json # Scanner configuration
β βββ π agents/ # Legacy Python agents
β
βββ π migrations/ # Database Schema Migrations
β βββ π init_db.sql # Initial schema
β βββ π migration_*.sql # Incremental migrations
β
βββ π tests/ # Unit tests and test data
β
βββ π docs/ # Project documentation
βββ π Technical_Overview.md # Technical documentation
βββ π api/ # API reference documentation
βββ π implementation/ # Phase implementation details
For detailed information about the project structure, see PROJECT_STRUCTURE.md.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Docker Network β
βββββββββββββββββββ¬ββββββββββββββββββ¬ββββββββββββββββββββββββββ€
β π Frontend β π Backend β π PostgreSQL β
β React + Vite β FastAPI β Database β
β Port: 3000 β Port: 8080 β Port: 5432 β
βββββββββββββββββββ΄ββββββββββββββββββ΄ββββββββββββββββββββββββββ
- React 18 with TypeScript
- Vite for fast development with hot-reload
- Tailwind CSS with custom dark cyber theme
- React Query for server state management
- Recharts for beautiful data visualizations
- FastAPI: REST API with automatic documentation
- PostgreSQL: Robust data persistence
- Parser Framework: Extensible system for multiple security tools
- PowerShell Script: Standalone domain scanner for Windows machines
- Python Agents: Extensible agent framework for custom integrations
# Clone the repository
git clone https://github.com/rival420/Donwatcher.git
cd Donwatcher
# Start the full stack (Frontend + Backend + PostgreSQL)
docker compose up -d
# Wait for services to start (about 30-60 seconds)
# Check that all services are running
docker compose ps
# View logs to ensure everything started correctly
docker compose logs -f
# Access the dashboard
# Frontend: http://localhost:3000
# Backend API: http://localhost:8080- Access the Dashboard: Navigate to http://localhost:3000
- Upload Your First Report: Go to "Upload" and drag a security report file (XML, JSON, or CSV)
- Configure Alerts: Visit "Settings" to set up webhook notifications
- Review Results: Check the main dashboard for visualizations and trends
# Stop all services
docker compose down
# Stop and remove all data (including database)
docker compose down -vBoth frontend and backend support hot-reload during development. Changes to source files are automatically detected and applied without restarting containers:
# Start with logs visible
docker compose up
# Or run in background and watch logs
docker compose up -d && docker compose logs -f- Frontend Dashboard: http://localhost:3000
- Backend API: http://localhost:8080/api
- API Documentation: http://localhost:8080/docs
- Health Check: http://localhost:8080/api/health
- Format: XML reports
- Features: Domain health scoring, risk categorization, trend analysis
- Use Case: Comprehensive AD security assessment
- Format: JSON/CSV reports
- Features: ADCS configuration analysis, certificate template security
- Use Case: PKI and certificate authority security
- Format: JSON reports (
domain_analysisand newdomain_group_members) - Features: Privileged group monitoring, membership tracking, member acceptance workflow, integrated risk assessment
- Phase 3 Capabilities: Global risk integration with PingCastle, real-time risk updates, comprehensive risk visualization
- Phase 2 Capabilities: Member management modal, bulk operations, mobile-responsive interface
- Phase 1 Capabilities: Individual member accept/deny, enhanced member data (type, enabled status), risk scoring based on unaccepted members
- Use Case: Comprehensive AD group management with enterprise risk assessment and compliance reporting
- Domain Scanner Agent: PowerShell-based AD group membership collection
- Standalone PowerShell Script:
DonWatcher-DomainScanner.ps1for Windows domain-joined machines - Extensible Framework: Easy to add new data collection agents
- Health Monitoring: Built-in agent status monitoring and connection testing
- Multi-Tool Security Monitoring: Centralized dashboard for all your AD security tools with multi-file upload support
- Batch Report Processing: Upload multiple security reports simultaneously for efficient data ingestion
- Privileged Access Management: Track and alert on changes to critical AD groups
- Remote Domain Scanning: Deploy PowerShell scripts on domain controllers for automated data collection
- Certificate Authority Security: Monitor ADCS configurations and detect misconfigurations
- Risk Trend Analysis: Historical analysis across all security tools with unified severity mapping
- Compliance Reporting: Generate comprehensive security reports across multiple assessment tools
- Team Collaboration: Shared risk acceptance and finding management across security teams
- Automated Monitoring: Agent-based continuous data collection and alerting
- System Diagnostics: Built-in debug tools for troubleshooting and system health monitoring
DonWatcher includes a standalone PowerShell script for automated domain scanning from Windows domain-joined machines.
The client/DonWatcher-DomainScanner.ps1 script can be deployed on domain controllers or any domain-joined Windows machine to automatically collect and send domain analysis data to your DonWatcher instance.
- Configurable: JSON configuration file for easy customization
- Privileged Group Monitoring: Scans Domain Admins, Enterprise Admins, and other critical groups
- Domain Information: Collects domain/forest functional levels, DC count, user/computer counts
- Flexible Deployment: Can run manually, via scheduled tasks, or Group Policy
- Connection Testing: Built-in connectivity verification to DonWatcher
- Comprehensive Logging: Detailed logging with configurable verbosity
# Download the client components to a domain-joined Windows machine
# Ensure Active Directory PowerShell module is installed
# Basic usage - will create default config file
.\client\DonWatcher-DomainScanner.ps1 -DonWatcherUrl "http://your-donwatcher:8080"
# Test connection only
.\client\DonWatcher-DomainScanner.ps1 -DonWatcherUrl "http://your-donwatcher:8080" -TestConnection
# Use custom configuration file
.\client\DonWatcher-DomainScanner.ps1 -ConfigFile "custom-config.json" -VerboseThe script uses client/DonWatcher-Config.json for configuration:
{
"DonWatcherUrl": "http://localhost:8080",
"PrivilegedGroups": [
"Domain Admins",
"Enterprise Admins",
"Schema Admins"
],
"MaxUsers": 5000,
"MaxComputers": 5000,
"TimeoutSeconds": 300
}- Windows PowerShell 5.1+ or PowerShell Core 6+
- Active Directory PowerShell module (
RSAT-AD-PowerShell) - Domain-joined machine with appropriate permissions
- Network connectivity to DonWatcher instance
For automated scanning, create a scheduled task:
$Action = New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-File C:\Scripts\DonWatcher-DomainScanner.ps1"
$Trigger = New-ScheduledTaskTrigger -Daily -At "02:00AM"
$Principal = New-ScheduledTaskPrincipal -UserId "DOMAIN\ServiceAccount" -LogonType Password
Register-ScheduledTask -TaskName "DonWatcher Domain Scan" -Action $Action -Trigger $Trigger -Principal $Principal- Technical Overview: docs/Technical_Overview.md - Comprehensive technical documentation
- API Documentation: Available at
/docswhen running the application - Contributing Guidelines: See technical overview for coding conventions and extensibility
Phase 3 - Risk Score Integration:
- Global Risk Framework: Complementary integration of PingCastle + domain group risks
- Enhanced Risk Visualization: Rich dashboard with component attribution and trending
- Real-time Risk Updates: Automatic recalculation on membership changes
- Cross-Domain Comparison: Enterprise-wide risk assessment and benchmarking
- Performance Optimized: Sub-second risk calculations with intelligent caching
Phase 2 - Frontend Enhancement:
- Member Management Modal: Comprehensive interface with bulk operations
- Enhanced Group Tiles: Rich visual indicators with acceptance status
- Mobile-First Design: Full functionality across all devices
- Advanced Filtering: Smart search and categorization tools
Phase 1 - Backend Foundation:
- Domain Group Management: Complete member acceptance workflow with individual accept/deny controls
- Enhanced Parser: Dual format support for legacy and new domain scanner JSON formats
- New API Endpoints: 11 new REST endpoints for group and risk management
- Risk Score Enhancement: Risk calculations based only on unaccepted members
- Member Detail Tracking: Enhanced member data including type, enabled status, and SID
- Multi-File Upload: Upload multiple security reports simultaneously with progress tracking
- Debug Dashboard: Real-time system monitoring and API health checks at
/debug - Enhanced Error Handling: Comprehensive error reporting and troubleshooting tools
- Improved HTML Correlation: Better matching logic for PingCastle HTML reports
- Fixed UUID Conversion: Resolved PostgreSQL UUID to string conversion issues
- Fixed Middleware Errors: Improved exception handling to prevent cascade errors
- Fixed Import Handling: Graceful fallback when advanced features aren't available
- Fixed Docker Compose: Removed obsolete version attribute causing warnings
- Fixed HTML Upload Correlation: Enhanced file matching with multiple strategies
- Fixed Reports Display: Proper error handling and data loading in UI tables
- Fixed Analysis Page Errors: Enhanced null checking and safe property access in recurring findings table
- Fixed Frontend Data Safety: Robust error handling for missing or undefined data properties
- Fixed Modal Interactions: Safe DOM element access in risk acceptance modals
- Progress indicators for multi-file uploads
- Enhanced tool badges and severity indicators
- Better error states and user feedback
- Debug page for real-time system diagnostics
- Console log capture for troubleshooting
Please read the Technical Overview for detailed information about:
- Architecture and design patterns
- Coding conventions and standards
- Adding new security tools and parsers
- Extending the agent framework
- Database schema and migrations
- Debug and troubleshooting procedures
This project is licensed under the terms specified in the LICENSE file.
If you encounter issues, follow these steps:
- Check System Status: Visit http://localhost:3000/settings for system status
- Verify Services: Run
docker compose psto ensure all containers are running - Check Logs: View container logs with
docker compose logs -f
# Check container logs for errors
docker compose logs frontend
docker compose logs backend
docker compose logs postgres
# If port conflict, modify docker-compose.yml:
# frontend ports: "3001:3000" # Use port 3001 instead
# backend ports: "8081:8080" # Use port 8081 instead# Restart the database container
docker compose restart postgres
# Check database logs
docker compose logs postgres
# If persistent issues, reset the database
docker compose down -v && docker compose up -d# Check frontend container logs
docker compose logs frontend
# Rebuild frontend container
docker compose up --build frontend- File Size: Default limit is 10MB. Check file size and adjust
MAX_UPLOAD_SIZEif needed - File Format: Supported formats are XML, JSON, and CSV
- Browser Errors: Check browser console (F12) for detailed error messages
- CORS Issues: Ensure backend CORS_ORIGINS includes the frontend URL
- No Findings: Check that your report format matches supported tools (PingCastle, Locksmith, Domain Analysis)
- Parsing Errors: Check backend logs for parser errors
- Missing Data: Ensure uploaded files contain valid security data
- Empty Pages: Hard refresh the browser (Ctrl+F5) to clear cache
- JavaScript Errors: Check browser console and ensure API is accessible
- Missing Charts: Verify that reports have been successfully uploaded
- Settings Page: System status is shown on the Settings page
- Backend API Health: Check http://localhost:8080/api/health
- Browser Console: Press F12 and check the Console tab for frontend errors
- Docker Logs: Use
docker compose logsto view detailed container logs
- Large Files: For files >5MB, upload individually
- Frequent Uploads: Consider using the PowerShell agent for automated data collection
- Database Size: Manage data retention in Settings
DonWatcher v3.0 - Now with modern React frontend, Docker-based development, and dark cyber theme!