IOC Extraction

VerifiedSafe

Extract, deduplicate, and classify Indicators of Compromise (IOCs) from any evidence source — files, logs, memory dumps, PCAPs, reports, or pasted text. Outputs structured IOC lists in multiple formats.

Sby Skills Guide Bot
SecurityIntermediate
7/27/2026
Claude Code
#ioc-extraction#threat-intelligence#dfir#incident-response

Recommended for

Automated summary

Extracts, deduplicates, validates, and classifies Indicators of Compromise (IOCs) from evidence files, logs, or pasted text, outputting structured reports.

Strengths

  • Extracts a wide range of IOC types including IPs, domains, hashes, registry keys, and MITRE/CVE IDs.
  • Automatically filters false positives like private IPs and benign domains.
  • Supports defanged IOC re-fanging and deduplication.
  • Generates a structured Markdown report for easy analysis.

Limitations

  • Requires evidence to be in text-based format; does not parse binary files directly.
  • Heuristics for false positive filtering may occasionally miss or over-filter.
  • Context enrichment is limited to simple occurrence counting and positional hints.
When to use it

Use when you need to quickly extract all observable IOCs from raw evidence during incident response.

When not to use it

Do not use for automated triage or as a standalone detection system; it's a manual analysis aid.

Security analysis

Safe
Quality score95/100

The skill uses only safe Bash commands for text processing and file reading/writing. There are no network calls, destructive operations, or execution of arbitrary code. It does not exfiltrate data; all output stays local.

No concerns found

How this analysis is made

Examples

Extract IOCs from a PCAP file
Extract all Indicators of Compromise from the PCAP file at /home/analyst/evidence/capture.pcap
Extract IOCs from a log file
I need to extract IOCs from this log file: /var/log/auth.log. Please parse it and output a structured report.
Extract IOCs from pasted text
Here is a suspicious email body. Extract all IOCs from it: <paste the text here>

name: ioc-extract description: Extract, deduplicate, and classify Indicators of Compromise (IOCs) from any evidence source — files, logs, memory dumps, PCAPs, reports, or pasted text. Outputs structured IOC lists in multiple formats. argument-hint: <path-to-evidence-or-paste-text> allowed-tools: Bash Read Write Grep Glob

IOC Extraction

You are extracting and classifying Indicators of Compromise from evidence. Parse all provided material, extract IOCs, deduplicate, validate, and output in structured formats.

Target

Evidence source: $ARGUMENTS

If no file path is provided, the user may paste raw text containing IOCs directly. In that case, analyze the pasted content.

Extraction Procedure

Step 1: Determine Source Type

file <target> 2>/dev/null || echo "Text input mode — analyzing pasted content"

Step 2: Extract IOCs by Category

IPv4 Addresses

grep -oE "([0-9]{1,3}\.){3}[0-9]{1,3}" <source> | sort -u | while read ip; do
  # Filter out RFC1918 private ranges, localhost, broadcast
  echo "$ip" | grep -vE "^(10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.|127\.|0\.|255\.)" || true
done | sort -u

IPv6 Addresses

grep -oiE "([0-9a-f]{1,4}:){2,7}[0-9a-f]{1,4}" <source> | sort -u

Domains

grep -oiE "[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\.[a-z]{2,}" <source> | sort -u | grep -viE "\.(png|jpg|gif|css|js|ico|svg|woff)$"

URLs

grep -oiE "https?://[^ \"'<>]+" <source> | sort -u

Email Addresses

grep -oiE "[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}" <source> | sort -u

File Hashes

# MD5
grep -oiE "\b[a-f0-9]{32}\b" <source> | sort -u
# SHA1
grep -oiE "\b[a-f0-9]{40}\b" <source> | sort -u
# SHA256
grep -oiE "\b[a-f0-9]{64}\b" <source> | sort -u

File Names / Paths

grep -oiE "[a-z0-9_.-]+\.(exe|dll|ps1|bat|cmd|vbs|js|hta|scr|pif|msi|doc[xm]?|xls[xm]?|ppt[xm]?|pdf|jar|py|sh|elf|bin|iso|img|vhd)" <source> | sort -u

Registry Keys (Windows)

grep -oiE "HKEY_[A-Z_]+\\\\[^ \"']+" <source> | sort -u

MITRE ATT&CK Technique IDs

grep -oE "T[0-9]{4}(\.[0-9]{3})?" <source> | sort -u

CVE IDs

grep -oiE "CVE-[0-9]{4}-[0-9]{4,}" <source> | sort -u

User Agents

grep -oiE "Mozilla/[^ ]+ \([^)]+\)[^\"]*" <source> | sort -u | head -20

JA3/JA3S Hashes

# These are MD5-length but in specific context
grep -oiE "ja3[s]?=[a-f0-9]{32}" <source> | sort -u

Step 3: Validation & Deduplication

For each extracted IOC category:

  1. Deduplicate: Remove exact duplicates
  2. Defang check: Handle defanged IOCs (e.g., hxxp://, [.]com, [:]80)
    # Re-fang common defanging patterns for analysis
    sed -e 's/hxxp/http/gi' -e 's/\[.\]/./g' -e 's/\[:\]/:/g' -e 's/ dot /./gi'
    
  3. False positive filtering:
    • Remove private/reserved IPs (10.x, 172.16-31.x, 192.168.x, 127.x)
    • Remove common benign domains (microsoft.com, google.com, etc.) — unless contextually relevant
    • Remove hash-like strings that are clearly not hashes (e.g., CSS color codes in context)
  4. Validate format: Ensure IPs have valid octets (0-255), domains have valid TLD, hashes are correct length

Step 4: Enrichment (if possible)

For high-priority IOCs, note context:

  • Where in the evidence was this IOC found?
  • How many times does it appear?
  • Is it associated with a specific process, user, or timeframe?

Output Formats

Format 1: Structured Report (default)

Write to ./reports/ioc-extract-report.md:

# IOC Extraction Report

**Date**: <date>
**Source**: <evidence source>
**Analyst**: Claude Code DFIR

## Summary
- **Total unique IOCs**: <count>
- **Categories**: <list>

## IOCs by Category

### Network Indicators
#### IP Addresses (<count>)
| IP | Occurrences | Context |
|----|-------------|---------|

#### Domains (<count>)
| Domain | Occurrences | Context |
|--------|-------------|---------|

#### URLs (<count>)
| URL | Context |
|-----|---------|

### Host Indicators
#### File Hashes
| Hash Type | Hash | Associated Filename |
|-----------|------|---------------------|

#### File Names
| Filename | Context |
|----------|---------|

#### Registry Keys
| Key | Context |
|-----|---------|

### Email Addresses
| Email | Context |
|-------|---------|

### Threat Intel References
| CVE | MITRE ATT&CK | Context |
|-----|---------------|---------|

Format 2: CSV (for SIEM import)

Also write to ./reports/iocs.csv:

type,value,context,source

Format 3: STIX-compatible JSON (simplified)

Also write to ./reports/iocs.json:

{
  "type": "bundle",
  "objects": [
    {
      "type": "indicator",
      "pattern": "[ipv4-addr:value = 'x.x.x.x']",
      "valid_from": "<date>",
      "description": "<context>"
    }
  ]
}

Create the reports/ directory if it does not exist. Generate all three output formats.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/ioc-extraction-ms2s7bvl/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/ioc-extraction-ms2s7bvl' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/ioc-extraction-ms2s7bvl/download' --output '.skill-downloads/ioc-extraction-ms2s7bvl/SKILL.md.part' && mv '.skill-downloads/ioc-extraction-ms2s7bvl/SKILL.md.part' '.skill-downloads/ioc-extraction-ms2s7bvl/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash Read Write Grep Glob

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/ioc-extraction-ms2s7bvl/SKILL.md' && test -s '.skill-downloads/ioc-extraction-ms2s7bvl/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/ioc-extract' && cp -R '.skill-downloads/ioc-extraction-ms2s7bvl' '.claude/skills/ioc-extract'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/ioc-extraction-ms2s7bvl'

openskills read 'ioc-extraction-ms2s7bvl'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/ioc-extraction-ms2s7bvl/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills