performing-malware-ioc-extraction
Helps your agent find important information in malicious programs. It identifies details like file hashes and network addresses.
What it does
This tool analyzes malicious software (malware) to find important clues about it. It identifies information such as file identification codes (hashes), internet addresses (domains, IPs, URLs), and other characteristics that help understand what the malware does and how it operates.
When to use it
- ✓When investigating a security incident.
- ✓When testing system security.
- ✓When analyzing a suspicious program.
Example of what to ask your AI
“Analyze this file and tell me the indicators of compromise.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool examines the malicious program's code in two ways: statically (without running it) and dynamically (running it in a safe environment). It looks for known patterns and extracts relevant information.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-malware-ioc-extractionOr download just the file:
curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/performing-malware-ioc-extraction/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Performing Malware IOC Extraction
Overview
Malware IOC extraction is the process of analyzing malicious software to identify actionable indicators of compromise including file hashes, network indicators (C2 domains, IP addresses, URLs), registry modifications, mutex names, embedded strings, and behavioral artifacts. This skill covers static analysis with PE parsing and string extraction, dynamic analysis with sandbox detonation, automated IOC extraction using tools like YARA, and formatting results as STIX 2.1 indicators for sharing.
When to Use
- When conducting security assessments that involve performing malware ioc extraction
- When following incident response procedures for related security events
- When performing scheduled security testing or auditing activities
- When validating security controls through hands-on testing
Prerequisites
- Python 3.9+ with
pefile,yara-python,oletools,stix2libraries - Access to malware analysis sandbox (Cuckoo, CAPE, Any.Run, Joe Sandbox)
- VirusTotal API key for enrichment
- Isolated analysis environment (VM or container)
- Understanding of PE file format, common packing techniques
- Familiarity with YARA rule syntax
Key Concepts
Static Analysis IOCs
- File Hashes: MD5, SHA-1, SHA-256 of the sample and any dropped files
- Import Hash (imphash): Hash of imported function table, groups malware families
- Rich Header Hash: PE rich header hash for compiler fingerprinting
- Strings: Embedded URLs, IP addresses, domain names, registry paths, mutex names
- PE Metadata: Compilation timestamp, section names, resources, digital signatures
- Embedded Artifacts: PDB paths, version info, certificate details
Dynamic Analysis IOCs
- Network Activity: DNS queries, HTTP requests, TCP/UDP connections, SSL certificates
- File System: Created/modified/deleted files and directories
- Registry: Created/modified registry keys and values
- Process: Spawned processes, injected processes, service creation
- Behavioral: API calls, mutex creation, scheduled tasks, persistence mechanisms
YARA Rules
YARA is a pattern-matching tool for identifying and classifying malware. Rules consist of strings (text, hex, regex) and conditions that define matching logic. Rules can detect malware families, packers, exploit kits, and specific campaign tools.
Workflow
Step 1: Static Analysis - PE Parsing and Hash Generation
import pefile
import hashlib
import os
def analyze_pe(filepath):
"""Extract IOCs from a PE file through static analysis."""
iocs = {"hashes": {}, "pe_info": {}, "strings": [], "imports": []}
# Calculate file hashes
with open(filepath, "rb") as f:
data = f.read()
iocs["hashes"]["md5"] = hashlib.md5(data).hexdigest()
iocs["hashes"]["sha1"] = hashlib.sha1(data).hexdigest()
iocs["hashes"]["sha256"] = hashlib.sha256(data).hexdigest()
iocs["hashes"]["file_size"] = len(data)
# Parse PE headers
try:
pe = pefile.PE(filepath)
iocs["hashes"]["imphash"] = pe.get_imphash()
iocs["pe_info"]["compilation_time"] = str(pe.FILE_HEADER.TimeDateStamp)
iocs["pe_info"]["machine_type"] = hex(pe.FILE_HEADER.Machine)
iocs["pe_info"]["subsystem"] = pe.OPTIONAL_HEADER.Subsystem
# Extract sections
iocs["pe_info"]["sections"] = []
for section in pe.sections:
iocs["pe_info"]["sections"].append({
"name": section.Name.decode("utf-8", errors="ignore").strip("\x00"),
"virtual_size": section.Misc_VirtualSize,
"raw_size": section.SizeOfRawData,
"entropy": section.get_entropy(),
"md5": section.get_hash_md5(),
})
# Extract imports
if hasattr(pe, "DIRECTORY_ENTRY_IMPORT"):
for entry in pe.DIRECTORY_ENTRY_IMPORT:
dll_name = entry.dll.decode("utf-8", errors="ignore")
functions = [
imp.name.decode("utf-8", errors="ignore")
for imp in entry.imports
if imp.name
]
iocs["imports"].append({"dll": dll_name, "functions": functions})
# Check for suspicious characteristics
iocs["pe_info"]["is_dll"] = pe.is_dll()
iocs["pe_info"]["is_driver"] = pe.is_driver()
iocs["pe_info"]["is_exe"] = pe.is_exe()
# Version info
…
FAQ
What are 'indicators of compromise' (IOCs)?
These are digital clues, like file hashes, IP addresses, or domains, that indicate a system may have been targeted by a malicious attack.
What are static and dynamic analysis?
Static analysis is looking at the code without running it. Dynamic analysis is running the code in a controlled environment to see what it does.
What are YARA rules used for?
YARA is a tool that helps identify and classify malware using patterns. Rules are like 'fingerprints' that the tool uses to find specific malicious programs.
Details
Original description by the author
Malware IOC extraction is the process of analyzing malicious software to identify actionable indicators of compromise including file hashes, network indicators (C2 domains, IP addresses, URLs), regist
Popularity
- GitHub stars
- 35k
- Ranking position
- #6098
- License
- Apache-2.0
- Updated
- 8/31/2026
Comments
- …
More skills from this repository
abusing-dpapi-for-credential-access
Gives your AI agent ready-made instructions for a specific task, so it does it better and faster.
mukul975/Anthropic-Cybersecurity-Skills
abusing-shadow-credentials-for-privesc
Teaches your AI agent to write clear, well-structured text.
mukul975/Anthropic-Cybersecurity-Skills
achieving-cmmc-level-2-compliance
Helps your agent prepare an environment for CMMC Level 2 compliance. It implements security requirements and manages necessary documentation.
mukul975/Anthropic-Cybersecurity-Skills
acquiring-disk-image-with-dd-and-dcfldd
Helps your agent create exact copies of hard drives. This is useful for ensuring no information is lost or altered during investigations.
mukul975/Anthropic-Cybersecurity-Skills
Similar skills
data-throughput-accelerator
Makes your agent speed up the movement of large data volumes. It finds bottlenecks and ensures data is transferred quickly and correctly.
affaan-m/ECC
inventory-demand-planning
Helps your agent predict product demand in stores. It optimizes stock and plans when to run promotions to sell more.
affaan-m/ECC
market-research
Helps your agent conduct market research and competitive analysis. Provides summaries with source attribution.
affaan-m/ECC