Skip to content
Skillpedia
Analysis & spreadsheets35k · #6098

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

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-malware-ioc-extraction/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-malware-ioc-extraction/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
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-extraction

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/performing-malware-ioc-extraction/SKILL.md -o SKILL.md
Technical 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, stix2 libraries
  • 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

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#6098
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills