threat-hunting
Proactively detect and respond to advanced cyber threats using forensic tools and analytics in enterprise environments.
What this skill does
## threat-hunting
### Purpose
This skill enables proactive detection and response to advanced cyber threats in enterprise environments using forensic tools and analytics. It focuses on identifying anomalies, investigating incidents, and mitigating risks through data-driven methods.
### When to Use
Use this skill during active threat investigations, such as unusual network traffic, endpoint anomalies, or post-breach analysis. Apply it in blue-team operations like monitoring for indicators of compromise (IOCs), conducting regular hunts in large-scale networks, or integrating with SIEM systems for real-time alerts.
### Key Capabilities
- Analyze memory dumps with Volatility to detect malware processes.
- Parse network logs using Zeek for identifying suspicious connections.
- Query Elasticsearch for threat patterns via custom queries.
- Generate timelines from forensic artifacts using tools like Plaso.
- Automate threat correlation with Sigma rules for log analysis.
### Usage Patterns
Start by collecting data from endpoints or networks, then apply analytics to identify threats. For example, use a pipeline: ingest logs → run queries → correlate events → respond. Always scope hunts to specific IOCs or time windows. If integrating with automation, wrap commands in scripts that handle input validation and output parsing. For multi-step hunts, chain tools like Zeek for capture and Elasticsearch for indexing.
### Common Commands/API
Use these commands for threat hunting tasks. Set environment variables for authentication, e.g., export `$ELASTICSEARCH_API_KEY` for API access.
- **Volatility for memory forensics**:
`volatility -f memory.dump --profile=Win7SP1x64 pslist`
This lists processes; add `-o output.json` to save results.
- **Zeek for network analysis**:
`zeek -r capture.pcap policy/scripts`
Follow with `zeek-cut conn.log | grep "suspicious_ip"` to filter logs.
- **Elasticsearch API for log queries**:
Use endpoint: `POST https://es.example.com/_search` with body:
`{ "query": { "match": { "message": "malware" } } }`
Authenticate via header: `Authorization: Bearer $ELASTICSEARCH_API_KEY`.
- **Plaso for timeline generation**:
`log2timeline.py --storage-file timeline.plaso /path/to/logs`
Then query: `psort.py -w output.csv timeline.plaso`.
Config formats: Use JSON for Elasticsearch queries (e.g., above) or INI for Zeek policies (e.g., `[site] interface=eth0`).
### Integration Notes
Integrate this skill with other blue-team tools by piping outputs, e.g., Zeek logs to Elasticsearch via Logstash. For API integrations, use `$ELASTICSEARCH_API_KEY` in scripts:
```bash
curl -H "Authorization: Bearer $ELASTICSEARCH_API_KEY" -X POST https://es.example.com/_ingest/pipeline
```
Ensure tools share formats like JSON for data exchange. If using containers, mount volumes for forensic data access, e.g., Docker run with `-v /host/logs:/container/logs`. Test integrations in a sandbox to avoid disrupting production environments.
### Error Handling
Check for common errors like invalid profiles in Volatility (e.g., if `--profile` mismatches, output "Error: No suitable profile found"; retry with `volatility --info` to list options). For API calls, handle 4xx/5xx responses:
```python
import requests; response = requests.post(url, headers={'Authorization': f'Bearer {os.environ.get("ELASTICSEARCH_API_KEY")}'}); if response.status_code != 200: raise ValueError(response.text)
```
In scripts, use try-catch for file not found errors, e.g., in Zeek: check if pcap exists before processing. Log errors to a file with timestamps for auditing.
### Concrete Usage Examples
1. **Detect malware in a memory dump**:
First, export `$VOLATILITY_PATH=/path/to/volatility`. Run: `volatility -f suspect.dump --profile=Linuxx64x64 pslist | grep "suspicious_process"`. If matches found, alert via script: `echo "Threat detected" >> alert.log`.
2. **Hunt for network anomalies**:
Capture traffic with Zeek: `zeek -i eth0 -C`. Then query: `zeek-cut conn.log | awk '$3 == "192.168.1.100" {print}'`. Integrate with Elasticsearch: `curl -H "Authorization: Bearer $ELASTICSEARCH_API_KEY" -d '{"query":{"match":{"source_ip":"192.168.1.100"}}}' https://es.example.com/_search`.
### Graph Relationships
- Related to: blue-team (cluster), as it shares tools for defensive operations.
- Connected via tags: threat-hunting (direct match), cybersecurity (overlaps with detection skills), blue-team (cluster linkage).
- Links to: Other blue-team skills like "incident-response" for follow-up actions, and "forensics-analysis" for deeper data examination.
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.