Collecting Indicators of Compromise
When to Use
- During active incident response to identify and block adversary infrastructure
- Post-incident to document all observed adversary artifacts for future detection
- When sharing threat intelligence with ISACs, sector partners, or law enforcement
- When building detection rules in SIEM, EDR, or network security tools
- When enriching IOCs with threat intelligence context for risk scoring
Do not use for behavioral TTP analysis without accompanying technical indicators; use MITRE ATT&CK mapping for behavioral characterization.
Detection Gaps & Validation
- Atomic IOCs decay fast, behavioral ones don't: IPs and domains rotate hourly and hashes change with every recompile, so a clean hash match does not mean "not infected." Prioritize durable indicators — registry Run keys, scheduled-task/service names, mutexes, named pipes (e.g. Cobalt Strike
\\.\pipe\MSSE-*), and file paths — and pair atomic IOCs with the TTP that produced them.
- Pyramid-of-Pain trap: blocking only hashes/IPs lets the actor return in minutes. Treat low-cost indicators as detections, not containment.
- Enrichment false-positives: flagging a shared CDN, cloud egress IP, or sinkhole as malicious poisons every consumer of the feed. Validate against passive DNS/WHOIS age and provider ranges before scoring; recently registered + privacy-protected + low VT detections is a stronger signal than VT count alone.
- Collection coverage gaps: an IOC absent from one source isn't absent from the host — memory-only artifacts (netscan connections, injected strings) never touch disk, and DNS-log gaps hide tunneling. Pull from memory, EDR, network, and email, not just one.
- Validate before distributing: confirm each indicator was directly observed in this incident (not inherited from a report), defang in human-readable output, strip internal IPs/hostnames, and set the correct TLP. Cross-check a sample of IOCs by hunting them across the estate — a true IOC should light up on the known-compromised hosts.
Prerequisites
- Access to incident evidence sources: SIEM logs, EDR telemetry, memory dumps, disk images, network captures
- Threat intelligence platform (MISP, OpenCTI, ThreatConnect) for IOC management and sharing
- IOC enrichment tools: VirusTotal, OTX (AlienVault Open Threat Exchange), Shodan, DomainTools
- STIX 2.1 knowledge for structured IOC representation
- Sharing agreements with relevant ISACs (FS-ISAC, H-ISAC, IT-ISAC) or sector partners
Workflow
Step 1: Identify IOC Categories
Collect indicators across all categories from incident evidence:
Network Indicators:
- IP addresses (C2 servers, staging servers, exfiltration destinations)
- Domain names (C2 domains, phishing domains, DGA domains)
- URLs (malware download, C2 check-in, exfiltration endpoints)
- JA3/JA3S hashes (TLS client/server fingerprints)
- User-Agent strings (custom or unusual HTTP headers)
- DNS query patterns (tunneling signatures, DGA patterns)
Host Indicators:
- File hashes (MD5, SHA-1, SHA-256 of malware, tools, scripts)
- File paths (known malware installation directories)
- Registry keys (persistence mechanisms, configuration storage)
- Scheduled tasks and service names (persistence)
- Mutex/event names (malware instance synchronization)
- Named pipes (C2 communication channels, e.g., Cobalt Strike)
Email Indicators:
- Sender addresses and domains (spoofed or attacker-controlled)
- Subject lines and body content patterns
- Attachment names and hashes
- Embedded URLs
- Email header anomalies (SPF/DKIM/DMARC failures)
Step 2: Extract IOCs from Evidence Sources
Systematically extract indicators from each evidence source:
From SIEM/Log Analysis:
# Extract unique destination IPs from firewall logs
index=firewall action=blocked
| stats count by dest_ip
| where count > 100
# Extract domains from DNS query logs
index=dns query=*evil* OR query=*c2*
| stats count by query
From Memory Forensics:
# Extract network connections
vol -f memory.raw windows.netscan | grep ESTABLISHED
# Extract strings from suspicious process memory
vol -f memory.raw windows.memmap --pid 3847 --dump
strings -n 8 pid.3847.dmp | grep -E "(http|https)://"
From Malware Analysis:
Sandbox Report IOC Extraction:
- Dropped files: 3 (hashes extracted)
- DNS queries: update.evil[.]com, cdn.malware[.]net
- HTTP connections: POST to https://185.220.101[.]42/gate.php
- Registry modified: HKCU\Software\Microsoft\Windows\CurrentVersion\Run\svcupdate
- Mutex created: Global\MTX_0x1234ABCD
- Named pipe: \\.\pipe\MSSE-1234-server
Step 3: Enrich IOCs with Context
Add threat intelligence context to each indicator:
IOC Enrichment Report:
━━━━━━━━━━━━━━━━━━━━━
IP: 185.220.101.42
VirusTotal: 12/89 vendors flag as malicious
Shodan: Open ports: 443, 8443, 80
Geolocation: Netherlands, AS208476
First Seen: 2025-10-01
Threat Intel: Associated with Qakbot C2 infrastructure
Confidence: High
TLP: AMBER
Domain: update.evil[.]com
Registration: 2025-10-28 (recently registered)
Registrar: Namecheap
WHOIS Privacy: Yes
VirusTotal: 8/89 vendors flag as malicious
DNS History: Resolved to 185.220.101.42, 91.215.85.17
Confidence: High
TLP: AMBER
Step 4: Score and Prioritize IOCs
Assign confidence and risk scores to each indicator:
| Score |
Confidence Level |
Criteria |
| 90-100 |
Confirmed Malicious |
Multiple TI sources confirm, observed in active attack |
| 70-89 |
Highly Suspicious |
Single TI source confirms, behavioral analysis supports |
| 50-69 |
Suspicious |
Limited TI data, contextually suspicious |
| 30-49 |
Unconfirmed |
No TI matches, but anomalous in environment |
| 0-29 |
Likely Benign |
False positive indicators or legitimate infrastructure |
Step 5: Distribute IOCs for Detection and Blocking
Push IOCs to defensive systems for immediate protection:
- Firewall/IPS: Block C2 IPs and domains
- DNS: Sinkhole malicious domains
- EDR: Add file hashes to blocklist, create custom IOC watchlists
- Email Gateway: Block sender domains, attachment hashes, malicious URLs
- SIEM: Create correlation searches for IOC matches
- Web Proxy: Block URLs and domains in web filtering policy
Step 6: Share IOCs with Partners
Package IOCs in STIX 2.1 format for sharing:
{
"type": "indicator",
"spec_version": "2.1",
"id": "indicator--a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"created": "2025-11-15T18:00:00Z",
"modified": "2025-11-15T18:00:00Z",
"name": "Qakbot C2 Server IP",
"indicator_types": ["malicious-activity"],
"pattern": "[ipv4-addr:value = '185.220.101.42']",
"pattern_type": "stix",
"valid_from": "2025-11-15T14:23:00Z",
"confidence": 95,
"labels": ["c2", "qakbot"],
"object_marking_refs": ["marking-definition--f88d31f6-486f-44da-b317-01333bde0b82"]
}
Submit to MISP, ISAC portals, and TAXII servers per sharing agreements.
Key Concepts
| Term |
Definition |
| IOC (Indicator of Compromise) |
Technical artifact observed during a security incident that indicates adversary presence (hash, IP, domain, etc.) |
| TLP (Traffic Light Protocol) |
Standard for classifying the sharing restrictions of threat intelligence: WHITE, GREEN, AMBER, AMBER+STRICT, RED |
| STIX (Structured Threat Information Expression) |
Standard language for representing cyber threat intelligence in a structured, machine-readable format |
| TAXII (Trusted Automated Exchange of Intelligence Information) |
Transport protocol for sharing STIX-formatted threat intelligence between organizations |
| Confidence Score |
Numerical rating (0-100) indicating the analyst's certainty that an indicator is truly malicious |
| IOC Lifecycle |
Process of creating, validating, distributing, and eventually retiring indicators as they lose relevance |
| Defanging |
Practice of modifying malicious URLs and domains in reports to prevent accidental clicks (e.g., evil[.]com) |
Tools & Systems
- MISP: Open-source threat intelligence sharing platform for managing, storing, and distributing IOCs
- VirusTotal: Multi-engine malware scanning and threat intelligence platform for IOC enrichment
- OpenCTI: Open-source cyber threat intelligence platform supporting STIX 2.1 natively
- Yeti: Open-source platform for organizing observables, indicators, and TTPs
- CyberChef: GCHQ's data transformation tool useful for decoding, defanging, and formatting IOCs
Common Scenarios
Scenario: Post-Incident IOC Package for ISAC Sharing
Context: After responding to a Qakbot infection that led to Cobalt Strike deployment, the IR team must package all IOCs for sharing with the Financial Services ISAC (FS-ISAC).
Approach:
- Compile all network, host, and email indicators from the investigation
- Enrich each IOC with VirusTotal and MISP correlation data
- Assign confidence scores based on direct observation vs. secondary correlation
- Mark all IOCs with TLP:AMBER for partner sharing
- Export as STIX 2.1 bundle and submit to FS-ISAC TAXII feed
- Create a human-readable IOC summary report for email distribution
Pitfalls:
- Including internal IP addresses or hostnames in shared IOC packages (information leakage)
- Sharing IOCs at TLP:WHITE that should be restricted to TLP:AMBER
- Not defanging URLs and domains in human-readable reports
- Sharing IP addresses of legitimate CDNs or cloud providers as malicious IOCs
Output Format
INDICATOR OF COMPROMISE REPORT
================================
Incident: INC-2025-1547
Date: 2025-11-15
TLP: AMBER
Sharing: FS-ISAC, internal SOC
NETWORK INDICATORS
Type | Value | Confidence | Context
---------|--------------------------|------------|--------
IPv4 | 185.220.101[.]42 | 95 | Qakbot C2 server
IPv4 | 91.215.85[.]17 | 90 | Cobalt Strike C2
Domain | update.evil[.]com | 95 | Staging domain
URL | hxxps://185.220[.]101.42/gate.php | 95 | C2 check-in
JA3 | a0e9f5d64349fb13191bc7...| 80 | Qakbot TLS fingerprint
HOST INDICATORS
Type | Value | Confidence | Context
---------|--------------------------|------------|--------
SHA-256 | a1b2c3d4e5f6... | 100 | Qakbot dropper
SHA-256 | b2c3d4e5f6a7... | 100 | Cobalt Strike beacon
FilePath | C:\Users\*\AppData\Local\Temp\update.exe | 85 | Dropper location
RegKey | HKCU\...\Run\svcupdate | 90 | Persistence
Mutex | Global\MTX_0x1234ABCD | 95 | Qakbot instance lock
Task | WindowsUpdate | 90 | Scheduled task persistence
EMAIL INDICATORS
Type | Value | Confidence | Context
---------|--------------------------|------------|--------
Sender | billing@spoofed[.]com | 95 | Phishing sender
Subject | "Invoice-Nov2025" | 70 | Phishing subject line
Hash | c3d4e5f6a7b8... | 100 | Malicious .docm attachment
TOTAL: 14 indicators | HIGH confidence avg: 91
1---2name: collecting-indicators-of-compromise3description: Systematically collects, categorizes, and distributes indicators of compromise (IOCs) during and after security incidents to enable detection, blocking, and threat intelligence sharing. Covers network, host, email, and behavioral indicators using STIX/TAXII formats and threat intelligence platforms. Activates for requests involving IOC collection, indicator extraction, threat indicator sharing, compromise indicators, STIX export, or IOC enrichment.4license: Apache-2.05---6
7# Collecting Indicators of Compromise
8
9## When to Use
10
11- During active incident response to identify and block adversary infrastructure
12- Post-incident to document all observed adversary artifacts for future detection
13- When sharing threat intelligence with ISACs, sector partners, or law enforcement
14- When building detection rules in SIEM, EDR, or network security tools
15- When enriching IOCs with threat intelligence context for risk scoring
16
17**Do not use** for behavioral TTP analysis without accompanying technical indicators; use MITRE ATT&CK mapping for behavioral characterization.
18
19## Detection Gaps & Validation
20
21- **Atomic IOCs decay fast, behavioral ones don't:** IPs and domains rotate hourly and hashes change with every recompile, so a clean hash match does not mean "not infected." Prioritize durable indicators — registry Run keys, scheduled-task/service names, mutexes, named pipes (e.g. Cobalt Strike `\\.\pipe\MSSE-*`), and file paths — and pair atomic IOCs with the TTP that produced them.
22- **Pyramid-of-Pain trap:** blocking only hashes/IPs lets the actor return in minutes. Treat low-cost indicators as detections, not containment.
23- **Enrichment false-positives:** flagging a shared CDN, cloud egress IP, or sinkhole as malicious poisons every consumer of the feed. Validate against passive DNS/WHOIS age and provider ranges before scoring; recently registered + privacy-protected + low VT detections is a stronger signal than VT count alone.
24- **Collection coverage gaps:** an IOC absent from one source isn't absent from the host — memory-only artifacts (netscan connections, injected strings) never touch disk, and DNS-log gaps hide tunneling. Pull from memory, EDR, network, and email, not just one.
25- **Validate before distributing:** confirm each indicator was directly observed in *this* incident (not inherited from a report), defang in human-readable output, strip internal IPs/hostnames, and set the correct TLP. Cross-check a sample of IOCs by hunting them across the estate — a true IOC should light up on the known-compromised hosts.
26
27## Prerequisites
28
29- Access to incident evidence sources: SIEM logs, EDR telemetry, memory dumps, disk images, network captures
30- Threat intelligence platform (MISP, OpenCTI, ThreatConnect) for IOC management and sharing
31- IOC enrichment tools: VirusTotal, OTX (AlienVault Open Threat Exchange), Shodan, DomainTools
32- STIX 2.1 knowledge for structured IOC representation
33- Sharing agreements with relevant ISACs (FS-ISAC, H-ISAC, IT-ISAC) or sector partners
34
35## Workflow
36
37### Step 1: Identify IOC Categories
38
39Collect indicators across all categories from incident evidence:
40
41**Network Indicators:**
42- IP addresses (C2 servers, staging servers, exfiltration destinations)
43- Domain names (C2 domains, phishing domains, DGA domains)
44- URLs (malware download, C2 check-in, exfiltration endpoints)
45- JA3/JA3S hashes (TLS client/server fingerprints)
46- User-Agent strings (custom or unusual HTTP headers)
47- DNS query patterns (tunneling signatures, DGA patterns)
48
49**Host Indicators:**
50- File hashes (MD5, SHA-1, SHA-256 of malware, tools, scripts)
51- File paths (known malware installation directories)
52- Registry keys (persistence mechanisms, configuration storage)
53- Scheduled tasks and service names (persistence)
54- Mutex/event names (malware instance synchronization)
55- Named pipes (C2 communication channels, e.g., Cobalt Strike)
56
57**Email Indicators:**
58- Sender addresses and domains (spoofed or attacker-controlled)
59- Subject lines and body content patterns
60- Attachment names and hashes
61- Embedded URLs
62- Email header anomalies (SPF/DKIM/DMARC failures)
63
64### Step 2: Extract IOCs from Evidence Sources
65
66Systematically extract indicators from each evidence source:
67
68**From SIEM/Log Analysis:**
69```
70# Extract unique destination IPs from firewall logs
71index=firewall action=blocked
72| stats count by dest_ip
73| where count > 100
74
75# Extract domains from DNS query logs
76index=dns query=*evil* OR query=*c2*
77| stats count by query
78```
79
80**From Memory Forensics:**
81```bash
82# Extract network connections
83vol -f memory.raw windows.netscan | grep ESTABLISHED
84
85# Extract strings from suspicious process memory
86vol -f memory.raw windows.memmap --pid 3847 --dump
87strings -n 8 pid.3847.dmp | grep -E "(http|https)://"
88```
89
90**From Malware Analysis:**
91```
92Sandbox Report IOC Extraction:
93- Dropped files: 3 (hashes extracted)
94- DNS queries: update.evil[.]com, cdn.malware[.]net
95- HTTP connections: POST to https://185.220.101[.]42/gate.php
96- Registry modified: HKCU\Software\Microsoft\Windows\CurrentVersion\Run\svcupdate
97- Mutex created: Global\MTX_0x1234ABCD
98- Named pipe: \\.\pipe\MSSE-1234-server
99```
100
101### Step 3: Enrich IOCs with Context
102
103Add threat intelligence context to each indicator:
104
105```
106IOC Enrichment Report:
107━━━━━━━━━━━━━━━━━━━━━
108IP: 185.220.101.42
109 VirusTotal: 12/89 vendors flag as malicious
110 Shodan: Open ports: 443, 8443, 80
111 Geolocation: Netherlands, AS208476
112 First Seen: 2025-10-01
113 Threat Intel: Associated with Qakbot C2 infrastructure
114 Confidence: High
115 TLP: AMBER
116
117Domain: update.evil[.]com
118 Registration: 2025-10-28 (recently registered)
119 Registrar: Namecheap
120 WHOIS Privacy: Yes
121 VirusTotal: 8/89 vendors flag as malicious
122 DNS History: Resolved to 185.220.101.42, 91.215.85.17
123 Confidence: High
124 TLP: AMBER
125```
126
127### Step 4: Score and Prioritize IOCs
128
129Assign confidence and risk scores to each indicator:
130
131| Score | Confidence Level | Criteria |
132|-------|-----------------|----------|
133| 90-100 | Confirmed Malicious | Multiple TI sources confirm, observed in active attack |
134| 70-89 | Highly Suspicious | Single TI source confirms, behavioral analysis supports |
135| 50-69 | Suspicious | Limited TI data, contextually suspicious |
136| 30-49 | Unconfirmed | No TI matches, but anomalous in environment |
137| 0-29 | Likely Benign | False positive indicators or legitimate infrastructure |
138
139### Step 5: Distribute IOCs for Detection and Blocking
140
141Push IOCs to defensive systems for immediate protection:
142
143- **Firewall/IPS**: Block C2 IPs and domains
144- **DNS**: Sinkhole malicious domains
145- **EDR**: Add file hashes to blocklist, create custom IOC watchlists
146- **Email Gateway**: Block sender domains, attachment hashes, malicious URLs
147- **SIEM**: Create correlation searches for IOC matches
148- **Web Proxy**: Block URLs and domains in web filtering policy
149
150### Step 6: Share IOCs with Partners
151
152Package IOCs in STIX 2.1 format for sharing:
153
154```json
155{
156 "type": "indicator",
157 "spec_version": "2.1",
158 "id": "indicator--a1b2c3d4-e5f6-7890-abcd-ef1234567890",
159 "created": "2025-11-15T18:00:00Z",
160 "modified": "2025-11-15T18:00:00Z",
161 "name": "Qakbot C2 Server IP",
162 "indicator_types": ["malicious-activity"],
163 "pattern": "[ipv4-addr:value = '185.220.101.42']",
164 "pattern_type": "stix",
165 "valid_from": "2025-11-15T14:23:00Z",
166 "confidence": 95,
167 "labels": ["c2", "qakbot"],
168 "object_marking_refs": ["marking-definition--f88d31f6-486f-44da-b317-01333bde0b82"]
169}
170```
171
172Submit to MISP, ISAC portals, and TAXII servers per sharing agreements.
173
174## Key Concepts
175
176| Term | Definition |
177|------|------------|
178| **IOC (Indicator of Compromise)** | Technical artifact observed during a security incident that indicates adversary presence (hash, IP, domain, etc.) |
179| **TLP (Traffic Light Protocol)** | Standard for classifying the sharing restrictions of threat intelligence: WHITE, GREEN, AMBER, AMBER+STRICT, RED |
180| **STIX (Structured Threat Information Expression)** | Standard language for representing cyber threat intelligence in a structured, machine-readable format |
181| **TAXII (Trusted Automated Exchange of Intelligence Information)** | Transport protocol for sharing STIX-formatted threat intelligence between organizations |
182| **Confidence Score** | Numerical rating (0-100) indicating the analyst's certainty that an indicator is truly malicious |
183| **IOC Lifecycle** | Process of creating, validating, distributing, and eventually retiring indicators as they lose relevance |
184| **Defanging** | Practice of modifying malicious URLs and domains in reports to prevent accidental clicks (e.g., evil[.]com) |
185
186## Tools & Systems
187
188- **MISP**: Open-source threat intelligence sharing platform for managing, storing, and distributing IOCs
189- **VirusTotal**: Multi-engine malware scanning and threat intelligence platform for IOC enrichment
190- **OpenCTI**: Open-source cyber threat intelligence platform supporting STIX 2.1 natively
191- **Yeti**: Open-source platform for organizing observables, indicators, and TTPs
192- **CyberChef**: GCHQ's data transformation tool useful for decoding, defanging, and formatting IOCs
193
194## Common Scenarios
195
196### Scenario: Post-Incident IOC Package for ISAC Sharing
197
198**Context**: After responding to a Qakbot infection that led to Cobalt Strike deployment, the IR team must package all IOCs for sharing with the Financial Services ISAC (FS-ISAC).
199
200**Approach**:
2011. Compile all network, host, and email indicators from the investigation
2022. Enrich each IOC with VirusTotal and MISP correlation data
2033. Assign confidence scores based on direct observation vs. secondary correlation
2044. Mark all IOCs with TLP:AMBER for partner sharing
2055. Export as STIX 2.1 bundle and submit to FS-ISAC TAXII feed
2066. Create a human-readable IOC summary report for email distribution
207
208**Pitfalls**:
209- Including internal IP addresses or hostnames in shared IOC packages (information leakage)
210- Sharing IOCs at TLP:WHITE that should be restricted to TLP:AMBER
211- Not defanging URLs and domains in human-readable reports
212- Sharing IP addresses of legitimate CDNs or cloud providers as malicious IOCs
213
214## Output Format
215
216```
217INDICATOR OF COMPROMISE REPORT
218================================
219Incident: INC-2025-1547
220Date: 2025-11-15
221TLP: AMBER
222Sharing: FS-ISAC, internal SOC
223
224NETWORK INDICATORS
225Type | Value | Confidence | Context
226---------|--------------------------|------------|--------
227IPv4 | 185.220.101[.]42 | 95 | Qakbot C2 server
228IPv4 | 91.215.85[.]17 | 90 | Cobalt Strike C2
229Domain | update.evil[.]com | 95 | Staging domain
230URL | hxxps://185.220[.]101.42/gate.php | 95 | C2 check-in
231JA3 | a0e9f5d64349fb13191bc7...| 80 | Qakbot TLS fingerprint
232
233HOST INDICATORS
234Type | Value | Confidence | Context
235---------|--------------------------|------------|--------
236SHA-256 | a1b2c3d4e5f6... | 100 | Qakbot dropper
237SHA-256 | b2c3d4e5f6a7... | 100 | Cobalt Strike beacon
238FilePath | C:\Users\*\AppData\Local\Temp\update.exe | 85 | Dropper location
239RegKey | HKCU\...\Run\svcupdate | 90 | Persistence
240Mutex | Global\MTX_0x1234ABCD | 95 | Qakbot instance lock
241Task | WindowsUpdate | 90 | Scheduled task persistence
242
243EMAIL INDICATORS
244Type | Value | Confidence | Context
245---------|--------------------------|------------|--------
246Sender | billing@spoofed[.]com | 95 | Phishing sender
247Subject | "Invoice-Nov2025" | 70 | Phishing subject line
248Hash | c3d4e5f6a7b8... | 100 | Malicious .docm attachment
249
250TOTAL: 14 indicators | HIGH confidence avg: 91
251```