Skip to main content
skill CX Codex

analyzing-supply-chain-malware-artifacts — Claude Code skill

The analyzing-supply-chain-malware-artifacts skill investigates supply-chain malware artifacts, from altered software updates to tainted builds and sideloaded dependencies.

Apache-2.0 293 installs ★ 36,511 updated 2026-08-31

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-supply-chain-malware-artifacts -a claude-code
Open on GitHub

What analyzing-supply-chain-malware-artifacts does

The skill structures an investigation of software supply-chain attacks. It guides comparisons between suspect and legitimate binaries, checks for added or changed sections, reviews imports, and records code-signing anomalies. The workflow also covers infection-chain reconstruction and impact assessment.

Its included Python example handles PE files with pefile and hashlib. It compares section size, entropy, characteristics, and imported functions, then emits a JSON report with suspicious sections, import changes, signing state, and file hashes. The surrounding procedure covers build artifacts and IOC extraction.

You need Python 3.9+ with pefile, ssdeep, and hashlib, plus BinDiff or Diaphora, signing tools such as sigcheck or codesign, SCA tooling, and clean software versions. Without a legitimate version, the binary comparison step cannot run.

What it helps with

  • compare a suspect binary with a clean release
  • spot added PE sections and import changes
  • document code-signing anomalies
  • reconstruct an infection path from build artifacts
  • assess downstream impact and extract IOCs

Example prompts for the agent

  • Compare suspect.exe with the legitimate legitimate.exe and produce a JSON report.
  • Trace the infection chain through these build artifacts and list the affected systems.
  • Create hunting rules for new imports and code-signing anomalies.

How to install analyzing-supply-chain-malware-artifacts

1Skills CLI (Vercel)

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-supply-chain-malware-artifacts -a claude-code

2Manually: put the files in place

~/.claude/skills/analyzing-supply-chain-malware-artifacts/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/analyzing-supply-chain-malware-artifacts/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about analyzing-supply-chain-malware-artifacts

How do I install analyzing-supply-chain-malware-artifacts in Claude Code?

Run npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-supply-chain-malware-artifacts -a claude-code, then use ~/.claude/skills/analyzing-supply-chain-malware-artifacts/SKILL.md.

What does analyzing-supply-chain-malware-artifacts do?

It provides a workflow for examining trojanized updates, compromised build pipelines, and sideloaded dependencies. The process compares binaries, reviews imports and signatures, and helps scope the compromise.

What is required for PE analysis?

Use Python 3.9+ with pefile, ssdeep, and hashlib, along with BinDiff or Diaphora and a legitimate software version for comparison. Signature checks use sigcheck or codesign.

Source text

SKILL.md · Apache-2.0
---
name: analyzing-supply-chain-malware-artifacts
description: Investigate supply chain attack artifacts including trojanized software
  updates, compromised build pipelines, and sideloaded dependencies to identify intrusion
  vectors and scope of compromise.
domain: cybersecurity
subdomain: malware-analysis
tags:
- supply-chain
- malware-analysis
- trojanized-software
- solarwinds
- 3cx
- dependency-confusion
- software-integrity
version: '1.0'
author: mahipal
license: Apache-2.0
atlas_techniques:
- AML.T0010
nist_ai_rmf:
- GOVERN-5.2
- MAP-1.6
- MANAGE-2.2
d3fend_techniques:
- Platform Hardening
- Hardware Component Inventory
- Restore Object
- Electromagnetic Radiation Hardening
- RF Shielding
nist_csf:
- DE.AE-02
- RS.AN-03
- ID.RA-01
- DE.CM-01
mitre_attack:
- T1195.002
- T1195.001
- T1554
- T1553.002
- T1027
---
# Analyzing Supply Chain Malware Artifacts

## Overview

Supply chain attacks compromise legitimate software distribution channels to deliver malware through trusted update mechanisms. Notable examples include SolarWinds SUNBURST (2020, affecting 18,000+ customers), 3CX SmoothOperator (2023, a cascading supply chain attack originating from Trading Technologies), and numerous npm/PyPI package poisoning campaigns. Analysis involves comparing trojanized binaries against legitimate versions, identifying injected code in build artifacts, examining code signing anomalies, and tracing the infection chain from initial compromise through payload delivery. As of 2025, supply chain attacks account for 30% of all breaches, a 100% increase from prior years.


## When to Use

- When investigating security incidents that require analyzing supply chain malware artifacts
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques

## Prerequisites

- Python 3.9+ with `pefile`, `ssdeep`, `hashlib`
- Binary diff tools (BinDiff, Diaphora)
- Code signing verification tools (sigcheck, codesign)
- Software composition analysis (SCA) tools
- Access to legitimate software versions for comparison
- Package repository monitoring (npm, PyPI, NuGet)

## Workflow

### Step 1: Binary Comparison Analysis

```python
#!/usr/bin/env python3
"""Compare trojanized binary against legitimate version."""
import hashlib
import pefile
import sys
import json


def compare_pe_files(legitimate_path, suspect_path):
    """Compare PE file structures between legitimate and suspect versions."""
    legit_pe = pefile.PE(legitimate_path)
    suspect_pe = pefile.PE(suspect_path)

    report = {"differences": [], "suspicious_sections": [], "import_changes": []}

    # Compare sections
    legit_sections = {s.Name.rstrip(b'\x00').decode(): {
        "size": s.SizeOfRawData,
        "entropy": s.get_entropy(),
        "characteristics": s.Characteristics,
    } for s in legit_pe.sections}

    suspect_sections = {s.Name.rstrip(b'\x00').decode(): {
        "size": s.SizeOfRawData,
        "entropy": s.get_entropy(),
        "characteristics": s.Characteristics,
    } for s in suspect_pe.sections}

    # Find new or modified sections
    for name, props in suspect_sections.items():
        if name not in legit_sections:
            report["suspicious_sections"].append({
                "name": name, "reason": "New section not in legitimate version",
                "size": props["size"], "entropy": round(props["entropy"], 2),
            })
        elif abs(props["size"] - legit_sections[name]["size"]) > 1024:
            report["suspicious_sections"].append({
                "name": name, "reason": "Section size significantly changed",
                "legit_size": legit_sections[name]["size"],
                "suspect_size": props["size"],
            })

    # Compare imports
    legit_imports = set()
    if hasattr(legit_pe, 'DIRECTORY_ENTRY_IMPORT'):
        for entry in legit_pe.DIRECTORY_ENTRY_IMPORT:
            for imp in entry.imports:
                if imp.name:
                    legit_imports.add(f"{entry.dll.decode()}!{imp.name.decode()}")

    suspect_imports = set()
    if hasattr(suspect_pe, 'DIRECTORY_ENTRY_IMPORT'):
        for entry in suspect_pe.DIRECTORY_ENTRY_IMPORT:
            for imp in entry.imports:
                if imp.name:
                    suspect_imports.add(f"{entry.dll.decode()}!{imp.name.decode()}")

    new_imports = suspect_imports - legit_imports
    if new_imports:
        report["import_changes"] = list(new_imports)

    # Check code signing
    report["legit_signed"] = bool(legit_pe.OPTIONAL_HEADER.DATA_DIRECTORY[4].Size)
    report["suspect_signed"] = bool(suspect_pe.OPTIONAL_HEADER.DATA_DIRECTORY[4].Size)

    return report


def hash_file(filepath):
    """Calculate multiple hashes for a file."""
    hashes = {}
    with open(filepath, 'rb') as f:
        data = f.read()
    for algo in ['md5', 'sha1', 'sha256']:
        h = hashlib.new(algo)
        h.update(data)
        hashes[algo] = h.hexdigest()
    return hashes


if __name__ == "__main__":
    if len(sys.argv) < 3:
        print(f"Usage: {sys.argv[0]} <legitimate_binary> <suspect_binary>")
        sys.exit(1)
    report = compare_pe_files(sys.argv[1], sys.argv[2])
    print(json.dumps(report, indent=2))
```

## Validation Criteria

- Trojanized components identified through binary diffing
- Injected code isolated and analyzed separately
- Code signing anomalies documented
- Infection timeline reconstructed from build artifacts
- Downstream impact scope assessed across affected systems
- IOCs extracted for detection and blocking

## References

- [ReversingLabs - 3CX Supply Chain Analysis](https://www.reversinglabs.com/blog/what-went-wrong-with-the-3cx-software-supply-chain-attack-and-how-it-could-have-been-prevented)
- [Fortinet - SolarWinds Supply Chain Attack](https://www.fortinet.com/resources/cyberglossary/solarwinds-cyber-attack)
- [Picus - 3CX SmoothOperator Analysis](https://www.picussecurity.com/resource/blog/smoothoperator-analysis-of-3cxdesktopapp-supply-chain-attack)
- [MITRE ATT&CK T1195 - Supply Chain Compromise](https://attack.mitre.org/techniques/T1195/)

© mahipal · Apache-2.0 · mukul975/Anthropic-Cybersecurity-Skills

Similar skills

All skills for Security →
supply-chain-auditor 0xSteph supply-chain-auditor — a Claude Code subagent that audits software supply chain risk: detects dependency confusion and typosquatting, analyzes install-time scripts, validates lockfile integrity, and traces artifact provenance. CX Codex ★ 2,482repo stars supply-chain-risk-auditor trailofbits supply-chain-risk-auditor audits project dependencies for supply-chain risks, including advisories and signs of abandoned packages. Use it before a dependency review or security engagement. CX Codex +1 9,500installs agent-supply-chain official github agent-supply-chain is a GitHub Copilot skill that checks AI agent plugins, tools, and dependencies with SHA-256. It is used before promoting a plugin or auditing its files. CX Codex +1 1,100installs competition-supply-chain zhaoxuya520 The competition-supply-chain Claude Code skill traces artifact provenance from source to runtime. It is routed after ctf-sandbox-orchestrator when a challenge involves dependency drift, CI, builds, or releases. CX Codex +1 109installs agentic-supply-chain-detection Tencent The agentic-supply-chain-detection skill probes whether your agent pulls plugins, models or updates from untrusted sources. Useful when a project leans on third-party dependencies. CX Codex +1 ★ 7,607repo stars supply-chain mrhlaingbwardev This Claude Code skill covers software supply-chain attack risks. It activates for requests about dependencies, package registries, or CI/CD compromise. CX Codex +1 ★ 326repo stars

From the same set152

The whole set →
exploiting-broken-function-level-authorization The exploiting-broken-function-level-authorization skill for Claude Code tests APIs for OWASP API5:2023: whether low-privilege users can invoke admin functions by manipulating HTTP methods, paths, and parameters. CX Codex +1 299installs performing-web-application-scanning-with-nikto performing-web-application-scanning-with-nikto teaches coding agents to run Nikto for web server vulnerability scanning, configuration audits, and SSL checks. Useful during planned audits or incident response. CX Codex +1 299installs exploiting-server-side-request-forgery exploiting-server-side-request-forgery — a skill for discovering and exploiting SSRF vulnerabilities in web applications: access cloud metadata, internal services, and restricted network resources during authorized penetration tests. CX Codex +1 296installs implementing-jwt-signing-and-verification implementing-jwt-signing-and-verification is a Claude Code skill for building JWT signing and verification. It activates for authentication work or audits of token checks. CX Codex +1 294installs scanning-network-with-nmap-advanced scanning-network-with-nmap-advanced — a skill for advanced network reconnaissance with Nmap: host discovery, service version detection, firewall evasion, NSE vulnerability checks, and structured output parsing into XML or CSV. CX Codex +1 286installs achieving-cmmc-level-2-compliance achieving-cmmc-level-2-compliance guides defense contractors through CMMC Level 2 compliance, CUI scoping, NIST SP 800-171 Rev 2 requirements, and SPRS scoring. CX Codex +1 284installs auditing-cloud-with-cis-benchmarks auditing-cloud-with-cis-benchmarks audits AWS, Azure, and GCP environments against CIS Benchmarks using Prowler and ScoutSuite. Useful for baseline checks, finding misconfigurations, and audit prep. CX Codex +1 282installs implementing-api-schema-validation-security implementing-api-schema-validation-security enforces OpenAPI and JSON Schema validation across API gateways and application code. Blocks injection attacks, mass assignment, and response data leaks. CX Codex +1 280installs

Project sponsors

Companies that keep this analytics open