threat-detection
This skill should be used when the user asks to "analyze logs for threats", "detect suspicious activity", "scan for brute force attempts", "identify injection attacks", or "audit access patterns for anomalies".
What this skill does
# Threat Detection > **Category:** Engineering > **Domain:** Security Operations ## Overview The **Threat Detection** skill provides automated analysis of log files for suspicious patterns including brute force attacks, injection attempts, unusual access patterns, and privilege escalation indicators. It helps security teams triage log data and identify threats before they escalate. ## Quick Start ```bash # Analyze a log file for threat signals python scripts/threat_signal_analyzer.py --file /var/log/auth.log # Analyze with specific threat category python scripts/threat_signal_analyzer.py --file access.log --category injection # JSON output for SIEM integration python scripts/threat_signal_analyzer.py --file auth.log --format json # Set minimum severity python scripts/threat_signal_analyzer.py --file access.log --min-severity high ``` ## Tools Overview ### threat_signal_analyzer.py Analyzes log files for suspicious activity patterns across multiple threat categories. | Feature | Description | |---------|-------------| | Brute force detection | Identifies repeated failed login attempts from same source | | Injection scanning | Detects SQL injection, XSS, command injection in requests | | Access anomalies | Flags unusual access times, forbidden paths, admin probes | | Privilege escalation | Detects sudo abuse, role changes, permission modifications | | Rate analysis | Identifies request flooding and denial-of-service patterns | | IP reputation | Flags known-bad patterns (scanners, bots, TOR indicators) | ## Workflows ### Log Analysis Workflow 1. **Collect** - Gather logs from auth, access, application sources 2. **Analyze** - Run threat_signal_analyzer.py across log files 3. **Triage** - Review critical and high severity findings first 4. **Correlate** - Cross-reference findings across log sources 5. **Respond** - Block IPs, reset credentials, escalate as needed ### Incident Investigation Workflow 1. **Scope** - Identify time window and affected systems 2. **Scan** - Run analyzer on all relevant log files 3. **Timeline** - Build timeline from threat signals 4. **Impact** - Assess what was accessed or modified 5. **Contain** - Block threat actors and patch vulnerabilities ### Continuous Monitoring ```bash # Cron job: analyze auth logs every hour python scripts/threat_signal_analyzer.py --file /var/log/auth.log --format json --min-severity high > /tmp/threat_report.json # CI/CD: scan application logs on deployment python scripts/threat_signal_analyzer.py --file app.log --category injection --format json ``` ## Reference Documentation - [Threat Indicators](references/threat-indicators.md) - Common attack patterns, indicators of compromise, response playbooks ## Common Patterns Quick Reference ### Threat Categories | Category | Signals | Severity | |----------|---------|----------| | Brute force | 5+ failed logins from same IP in 5 min | High | | SQL injection | UNION SELECT, OR 1=1, DROP TABLE in requests | Critical | | XSS | script tags, javascript: URIs, event handlers in input | High | | Path traversal | ../ sequences, /etc/passwd access attempts | High | | Command injection | ; cat /etc/passwd, | nc, backtick usage | Critical | | Admin probing | /admin, /wp-admin, /phpmyadmin access attempts | Medium | | Rate flooding | 100+ requests/minute from single IP | High | ### Severity Levels - **CRITICAL** - Active exploitation attempt (injection, RCE) - **HIGH** - Likely attack in progress (brute force, privilege escalation) - **MEDIUM** - Suspicious activity requiring investigation - **LOW** - Informational, possible false positive ### Response Actions | Severity | Immediate Action | Follow-Up | |----------|-----------------|-----------| | Critical | Block IP, alert SOC | Incident report, forensics | | High | Rate limit, monitor | Review access, check damage | | Medium | Log and monitor | Weekly review | | Low | Log only | Monthly trend analysis |
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.