/forensics-ioc
Extract indicators of compromise (IOCs) from forensic findings, enrich them with threat intelligence lookups, and map them to STIX 2.1 observables. Produces a structured IOC register suitable for detection rule generation, MISP import, or threat intelligence sharing.
Usage
/forensics-ioc <findings-path> [options]
Arguments
| Argument |
Required |
Description |
| findings-path |
Yes |
Path to findings directory or specific finding file |
| --enrich |
No |
Perform threat intelligence enrichment lookups |
| --stix |
No |
Generate STIX 2.1 bundle alongside IOC register |
| --output |
No |
Output path (default: .aiwg/forensics/ioc/ioc-register.md) |
| --format |
No |
Output format: markdown (default), json, stix, misp |
| --types |
No |
IOC types to extract: ip, domain, hash, url, email, all (default: all) |
| --confidence |
No |
Minimum confidence threshold for inclusion: low, medium, high (default: low) |
| --no-private |
No |
Exclude RFC-1918 and loopback addresses |
Behavior
When invoked, this command:
Scan Findings for Observables
- Read all finding documents in the specified path
- Parse timeline artifacts, triage summaries, and analysis outputs
- Extract raw observable strings matching IOC patterns
IOC Extraction by Type
| Type |
Sources |
Pattern |
| IPv4/IPv6 |
Network analysis, auth logs, connections |
Address notation |
| Domain/FQDN |
DNS queries, connection targets, configs |
Domain pattern |
| File hash (MD5/SHA1/SHA256) |
Acquisition checksums, malware artifacts |
Hex string |
| URL |
Web logs, process command lines, configs |
HTTP/HTTPS URL |
| Email address |
Auth logs, user accounts |
Email pattern |
| File path |
Persistence findings, process analysis |
Suspicious paths |
| Process name |
Triage process list, persistence |
Masquerading names |
| User agent |
Web logs |
Browser/tool strings |
Deduplication and Normalization
- Remove duplicate IOCs of the same type and value
- Normalize IP addresses (strip ports, consolidate subnets)
- Lowercase domain names
- Uppercase file hashes
- Apply
--no-private filtering if specified
Confidence Scoring
- Score each IOC based on context and repetition
- HIGH: IOC observed in multiple independent sources or directly linked to attack
- MEDIUM: IOC appears in findings with indirect correlation
- LOW: IOC extracted from context; may require validation
- Mark false-positive candidates (CDN IPs, common system paths)
Threat Intelligence Enrichment (when --enrich specified)
- Query VirusTotal, AbuseIPDB, or configured TI feeds for IP/domain/hash IOCs
- Record reputation score, malware family, and associated threat actor
- Note prior sightings and first/last seen dates
- Attach TI source attribution
STIX 2.1 Mapping (when --stix specified)
- Map each IOC to appropriate STIX Observable object type
- Create STIX Indicator objects with detection patterns
- Bundle into STIX 2.1 JSON bundle
- Link observables to Threat Actor and Malware objects where applicable
Detection Rule Suggestions
- Generate Sigma rule stubs for network IOCs
- Generate firewall rule suggestions for IP/CIDR blocks
- Generate YARA rule stubs for file hashes
- Note which IOCs are suitable for automated blocking vs. monitoring
IOC Register Output
- Write structured IOC register with all extracted indicators
- Include context, confidence, enrichment data, and MITRE mapping
- Export STIX bundle if requested
- Update investigation state with IOC count
Examples
Example 1: Extract IOCs from findings directory
/forensics-ioc .aiwg/forensics/findings/
Example 2: Extract and enrich with threat intel
/forensics-ioc .aiwg/forensics/findings/ --enrich
Example 3: STIX 2.1 output
/forensics-ioc .aiwg/forensics/ --stix --format stix
Example 4: High confidence only, exclude private IPs
/forensics-ioc .aiwg/forensics/ --confidence high --no-private
Example 5: MISP import format
/forensics-ioc .aiwg/forensics/ --enrich --format misp
Output
Artifacts are saved to .aiwg/forensics/ioc/:
.aiwg/forensics/ioc/
├── ioc-register.md # Human-readable IOC register
├── ioc-register.json # Machine-readable IOC list
├── stix-bundle.json # STIX 2.1 bundle (if --stix)
├── detection-rules/
│ ├── network-ioc.sigma # Sigma rule stubs
│ └── file-ioc.yara # YARA rule stubs
└── enrichment-cache.json # TI lookup results cache
Sample IOC Register
IOC Register: INV-2026-02-27-web01
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Extraction complete: 12 IOCs (4 enriched)
--- Network IOCs ---
| Type | Value | Confidence | Context | TI Result |
|---------|----------------------|------------|--------------------------------|------------------------|
| IPv4 | 185.220.101.42 | HIGH | SSH brute force source; C2 | Known Tor exit node |
| Domain | update-check.net | HIGH | DNS query from /tmp/.update | Malware C2 (VirusTotal)|
| IPv4 | 10.0.0.15 | MEDIUM | Lateral movement destination | Internal host |
--- File IOCs ---
| Type | Value | Confidence | Context |
|----------|-------------------------|------------|-------------------------------|
| SHA256 | a1b2c3d4e5f6... | HIGH | /tmp/.update - C2 implant |
| Path | /tmp/.update | HIGH | Malicious cron-executed binary|
| Path | /dev/shm/.x | MEDIUM | Hidden file in tmpfs |
--- Account IOCs ---
| Type | Value | Confidence | Context |
|------|---------|------------|------------------------------------------|
| User | deploy | HIGH | Compromised account (brute forced) |
Total: 7 network, 3 file, 2 account IOCs
STIX bundle: .aiwg/forensics/ioc/stix-bundle.json
References
- @$AIWG_ROOT/agentic/code/frameworks/forensics-complete/agents/ioc-analyst.md - IOC Analyst
- @$AIWG_ROOT/agentic/code/frameworks/forensics-complete/templates/ioc-register.md - Register template
- @$AIWG_ROOT/agentic/code/frameworks/forensics-complete/commands/forensics-report.md - Include IOCs in report
- @$AIWG_ROOT/agentic/code/frameworks/forensics-complete/commands/forensics-timeline.md - Timeline correlation
1---2namespace: aiwg3name: forensics-ioc4platforms: [all]5description: Extract and enrich indicators of compromise6commandHint:7 argumentHint: "<findings-path> [--enrich] [--stix] [--output path] [--format markdown|json|stix]"8 category: forensics-ioc9---1011# /forensics-ioc1213Extract indicators of compromise (IOCs) from forensic findings, enrich them with threat intelligence lookups, and map them to STIX 2.1 observables. Produces a structured IOC register suitable for detection rule generation, MISP import, or threat intelligence sharing.1415## Usage1617`/forensics-ioc <findings-path> [options]`1819## Arguments2021| Argument | Required | Description |22|----------|----------|-------------|23| findings-path | Yes | Path to findings directory or specific finding file |24| --enrich | No | Perform threat intelligence enrichment lookups |25| --stix | No | Generate STIX 2.1 bundle alongside IOC register |26| --output | No | Output path (default: `.aiwg/forensics/ioc/ioc-register.md`) |27| --format | No | Output format: `markdown` (default), `json`, `stix`, `misp` |28| --types | No | IOC types to extract: `ip`, `domain`, `hash`, `url`, `email`, `all` (default: `all`) |29| --confidence | No | Minimum confidence threshold for inclusion: `low`, `medium`, `high` (default: `low`) |30| --no-private | No | Exclude RFC-1918 and loopback addresses |3132## Behavior3334When invoked, this command:35361. **Scan Findings for Observables**37 - Read all finding documents in the specified path38 - Parse timeline artifacts, triage summaries, and analysis outputs39 - Extract raw observable strings matching IOC patterns40412. **IOC Extraction by Type**4243 | Type | Sources | Pattern |44 |------|---------|---------|45 | IPv4/IPv6 | Network analysis, auth logs, connections | Address notation |46 | Domain/FQDN | DNS queries, connection targets, configs | Domain pattern |47 | File hash (MD5/SHA1/SHA256) | Acquisition checksums, malware artifacts | Hex string |48 | URL | Web logs, process command lines, configs | HTTP/HTTPS URL |49 | Email address | Auth logs, user accounts | Email pattern |50 | File path | Persistence findings, process analysis | Suspicious paths |51 | Process name | Triage process list, persistence | Masquerading names |52 | User agent | Web logs | Browser/tool strings |53543. **Deduplication and Normalization**55 - Remove duplicate IOCs of the same type and value56 - Normalize IP addresses (strip ports, consolidate subnets)57 - Lowercase domain names58 - Uppercase file hashes59 - Apply `--no-private` filtering if specified60614. **Confidence Scoring**62 - Score each IOC based on context and repetition63 - HIGH: IOC observed in multiple independent sources or directly linked to attack64 - MEDIUM: IOC appears in findings with indirect correlation65 - LOW: IOC extracted from context; may require validation66 - Mark false-positive candidates (CDN IPs, common system paths)67685. **Threat Intelligence Enrichment** (when `--enrich` specified)69 - Query VirusTotal, AbuseIPDB, or configured TI feeds for IP/domain/hash IOCs70 - Record reputation score, malware family, and associated threat actor71 - Note prior sightings and first/last seen dates72 - Attach TI source attribution73746. **STIX 2.1 Mapping** (when `--stix` specified)75 - Map each IOC to appropriate STIX Observable object type76 - Create STIX Indicator objects with detection patterns77 - Bundle into STIX 2.1 JSON bundle78 - Link observables to Threat Actor and Malware objects where applicable79807. **Detection Rule Suggestions**81 - Generate Sigma rule stubs for network IOCs82 - Generate firewall rule suggestions for IP/CIDR blocks83 - Generate YARA rule stubs for file hashes84 - Note which IOCs are suitable for automated blocking vs. monitoring85868. **IOC Register Output**87 - Write structured IOC register with all extracted indicators88 - Include context, confidence, enrichment data, and MITRE mapping89 - Export STIX bundle if requested90 - Update investigation state with IOC count9192## Examples9394### Example 1: Extract IOCs from findings directory95```bash96/forensics-ioc .aiwg/forensics/findings/97```9899### Example 2: Extract and enrich with threat intel100```bash101/forensics-ioc .aiwg/forensics/findings/ --enrich102```103104### Example 3: STIX 2.1 output105```bash106/forensics-ioc .aiwg/forensics/ --stix --format stix107```108109### Example 4: High confidence only, exclude private IPs110```bash111/forensics-ioc .aiwg/forensics/ --confidence high --no-private112```113114### Example 5: MISP import format115```bash116/forensics-ioc .aiwg/forensics/ --enrich --format misp117```118119## Output120121Artifacts are saved to `.aiwg/forensics/ioc/`:122123```124.aiwg/forensics/ioc/125├── ioc-register.md # Human-readable IOC register126├── ioc-register.json # Machine-readable IOC list127├── stix-bundle.json # STIX 2.1 bundle (if --stix)128├── detection-rules/129│ ├── network-ioc.sigma # Sigma rule stubs130│ └── file-ioc.yara # YARA rule stubs131└── enrichment-cache.json # TI lookup results cache132```133134### Sample IOC Register135136```137IOC Register: INV-2026-02-27-web01138━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━139140Extraction complete: 12 IOCs (4 enriched)141142--- Network IOCs ---143144| Type | Value | Confidence | Context | TI Result |145|---------|----------------------|------------|--------------------------------|------------------------|146| IPv4 | 185.220.101.42 | HIGH | SSH brute force source; C2 | Known Tor exit node |147| Domain | update-check.net | HIGH | DNS query from /tmp/.update | Malware C2 (VirusTotal)|148| IPv4 | 10.0.0.15 | MEDIUM | Lateral movement destination | Internal host |149150--- File IOCs ---151152| Type | Value | Confidence | Context |153|----------|-------------------------|------------|-------------------------------|154| SHA256 | a1b2c3d4e5f6... | HIGH | /tmp/.update - C2 implant |155| Path | /tmp/.update | HIGH | Malicious cron-executed binary|156| Path | /dev/shm/.x | MEDIUM | Hidden file in tmpfs |157158--- Account IOCs ---159160| Type | Value | Confidence | Context |161|------|---------|------------|------------------------------------------|162| User | deploy | HIGH | Compromised account (brute forced) |163164Total: 7 network, 3 file, 2 account IOCs165STIX bundle: .aiwg/forensics/ioc/stix-bundle.json166```167168## References169170- @$AIWG_ROOT/agentic/code/frameworks/forensics-complete/agents/ioc-analyst.md - IOC Analyst171- @$AIWG_ROOT/agentic/code/frameworks/forensics-complete/templates/ioc-register.md - Register template172- @$AIWG_ROOT/agentic/code/frameworks/forensics-complete/commands/forensics-report.md - Include IOCs in report173- @$AIWG_ROOT/agentic/code/frameworks/forensics-complete/commands/forensics-timeline.md - Timeline correlation