6.1 KiB
6.1 KiB
Active Security Monitoring - Quick Reference
Access
URL: http://localhost:12345/security/intelligence
Permissions Required:
- View:
security.view_audit - Manage:
security.manage - Admin role required
Features
1. Threat Score
- Real-time threat level (0-100)
- Color-coded: Green (0-19), Yellow (20-49), Orange (50-79), Red (80-100)
- Auto-updates every 60 seconds
2. Anomaly Detection
8 Detection Algorithms:
- Brute Force Attacks (10 failures in 10 min)
- Account Enumeration (5 usernames in 5 min)
- Privilege Escalation (3 attempts in 30 min)
- Anomalous Access (off-hours 2-5 AM)
- Suspicious IPs (100+ requests in 60 min)
- Data Exfiltration (5 downloads in 30 min)
- Session Anomalies (5+ IPs in 24 hours)
- Rate Limit Abuse (5 blocks in 15 min)
3. Real-time Alerts
6 Default Rules:
- RULE-BRUTE-FORCE (Critical, 10min cooldown)
- RULE-PRIVILEGE-ESC (Critical, 5min cooldown)
- RULE-DATA-EXFIL (High, 15min cooldown)
- RULE-THREAT-CRITICAL (Critical, 30min cooldown)
- RULE-SUSPICIOUS-IP (High, 20min cooldown)
- RULE-SESSION-ANOMALY (Medium, 30min cooldown)
4. Log Integrity
- SHA-256 HMAC signatures on all logs
- Tamper detection via "Verify Integrity" button
- Cryptographic validation of log authenticity
5. Threat Intelligence
- Malicious IP addresses
- Compromised user accounts
- Attack patterns and indicators
- Occurrence tracking
API Endpoints
# Query logs
GET /api/siem/logs?limit=50&source=authentication
# Verify integrity
POST /api/siem/logs/verify
# Get statistics
GET /api/siem/statistics?timeRange=24
# Export logs
GET /api/siem/export?format=csv
# Get anomalies
GET /api/siem/anomalies?status=open&severity=critical
# Resolve anomaly
POST /api/siem/anomalies/:id/resolve
Body: { "notes": "Resolved description" }
# Get alerts
GET /api/siem/alerts?status=active
# Acknowledge alert
POST /api/siem/alerts/:id/acknowledge
# Resolve alert
POST /api/siem/alerts/:id/resolve
Body: { "notes": "Resolution details" }
# Get threats
GET /api/siem/threats?level=high
# Dashboard data
GET /api/siem/dashboard
Configuration
Environment Variables
# Required: Log signature secret (32+ characters)
LOG_SIGNATURE_SECRET=your-secret-key-here
# Generate with:
openssl rand -hex 32
Database Tables
aggregated_logs- Central log repository (with signatures)security_anomalies- Detected anomaliesthreat_intelligence- Known threatssecurity_alerts- Active alertsalert_rules- Alert configurations
Log Sources
- authentication (Critical, 365 days) - Login/logout events
- authorization (High, 365 days) - Permission checks
- security_audit (Critical, 365 days) - Security events
- application (Medium, 90 days) - App logs
- system (High, 180 days) - System events
- access (Low, 30 days) - Access logs
Usage Examples
View Recent Alerts
- Navigate to
/security/intelligence - Click "Alerts" tab
- Review active alerts
- Click "Acknowledge" for each alert
- Click eye icon to view details
- Add resolution notes and click "Resolve"
Check Log Integrity
- Click "Verify Integrity" button
- Wait for verification to complete
- Green notification = All logs valid
- Red notification = Tampering detected
Export Logs for Analysis
- Click "Export" button
- Logs download as CSV
- Open in Excel/spreadsheet software
- Analyze patterns and trends
Resolve Anomalies
- Navigate to "Anomalies" tab
- Click eye icon on anomaly
- Review details and pattern data
- Add resolution notes
- Click "Resolve" button
Monitor Threat Score
- Green (0-19): Normal operations
- Yellow (20-49): Elevated activity - monitor
- Orange (50-79): High activity - investigate
- Red (80-100): Critical - immediate action
Troubleshooting
High Threat Score
Problem: Threat score above 80 Solution:
- Review open anomalies
- Resolve false positives
- Investigate critical alerts
- Check for active attacks
No Data Appearing
Problem: Dashboard shows no logs/anomalies Solution:
- Check user permissions (
security.view_audit) - Verify backend is running:
docker logs streamflow - Check browser console for errors
- Try manual refresh
Log Tampering Detected
Problem: "Integrity Compromised" warning Solution:
- Export tampered logs immediately
- Review forensic evidence
- Restore from backup if needed
- Investigate root cause
- Rotate
LOG_SIGNATURE_SECRET
Container Won't Start
Problem: Docker container restarting Solution:
- Check logs:
docker compose logs --tail=100 - Verify
LOG_SIGNATURE_SECRETis set - Check database permissions
- Rebuild:
docker compose up -d --build
Performance
- Auto-refresh: 60 seconds
- Analysis cycle: 60 seconds
- Buffer size: 100 log entries
- Flush interval: 5 seconds
- Query limit: 100 entries (max 1000)
Security Best Practices
-
Rotate Secrets Regularly
- Rotate
LOG_SIGNATURE_SECRETquarterly - Update all active logs after rotation
- Rotate
-
Review Alerts Daily
- Check threat score each morning
- Acknowledge/resolve alerts promptly
- Investigate critical anomalies immediately
-
Export Logs Weekly
- Backup to external SIEM
- Archive for compliance
- Long-term analysis
-
Monitor Trends
- Track anomaly patterns
- Identify repeat offenders
- Adjust thresholds as needed
-
Maintain Clean Data
- Resolve false positives
- Update alert rules
- Clean up old logs (automatic)
Compliance Mapping
- PCI-DSS Req 10: Log aggregation, daily review, retention
- HIPAA § 164.312(b): Audit controls, activity examination
- SOX Section 404: IT controls, audit trails
- GDPR Article 32: Security monitoring, incident detection
- CWE-778: Comprehensive logging implementation
- CWE-532: Sensitive data protection in logs
Support
For issues or questions:
- Check documentation:
/docs/SIEM_IMPLEMENTATION.md - Review backend logs:
docker logs streamflow - Verify API responses: Browser network tab
- Check permissions: User RBAC settings
Version
- Implementation: December 2024
- Version: 1.0.0
- Status: Production Ready ✅