analyzing-supply-chain-malware-artifacts — скилл для Claude Code
Скилл analyzing-supply-chain-malware-artifacts помогает расследовать артефакты атак через цепочку поставок: троянизированные обновления, сборки и зависимости.
Apache-2.0 293 установок ★ 36 511 обновлён 2026-08-31
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-supply-chain-malware-artifacts -a claude-codeЧто делает analyzing-supply-chain-malware-artifacts
Скилл задаёт процедуру анализа атак через цепочку поставок. Он помогает сравнивать подозрительный и легитимный бинарные файлы, находить новые или изменённые секции, проверять импорты и фиксировать аномалии подписи кода. Результат включает признаки внедрённого кода и хеши файлов.
Внутри есть Python-скрипт для PE-файлов: он использует pefile и hashlib, сравнивает размеры секций, энтропию и импорты, а затем выводит JSON-отчёт. Также описаны анализ сборочных артефактов, восстановление цепочки заражения, оценка затронутых систем и извлечение IOC.
Для работы нужны Python 3.9+ с pefile, ssdeep, hashlib, инструменты BinDiff или Diaphora, средства проверки подписи sigcheck или codesign, SCA и легитимные версии ПО. Без доступной легитимной версии сравнение бинарного файла не выполнить.
Какие задачи решает
- сравнить троянизированный бинарный файл с легитимной версией
- найти новые секции и импорты в PE-файле
- проверить аномалии подписи кода
- восстановить цепочку заражения по артефактам сборки
- оценить затронутые системы и извлечь IOC
Примеры запросов агенту
- Сравни
suspect.exeс легитимнымlegitimate.exeи выведи JSON-отчёт. - Проанализируй артефакты сборки и восстанови цепочку заражения.
- Составь правила обнаружения для новых импортов и аномалий подписи кода.
Как установить analyzing-supply-chain-malware-artifacts
1Через Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-supply-chain-malware-artifacts -a claude-code2Вручную: положить файлы
~/.claude/skills/analyzing-supply-chain-malware-artifacts/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/analyzing-supply-chain-malware-artifacts/
1Через Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-supply-chain-malware-artifacts -a codex2Вручную: положить файлы
.agents/skills/analyzing-supply-chain-malware-artifacts/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-supply-chain-malware-artifacts -a cursor2Вручную: положить файлы
.cursor/skills/analyzing-supply-chain-malware-artifacts/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install mukul975/Anthropic-Cybersecurity-Skills skills/analyzing-supply-chain-malware-artifacts2Вручную: положить файлы
.github/skills/analyzing-supply-chain-malware-artifacts/SKILL.md1Через Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-supply-chain-malware-artifacts -a gemini-cli2Командой платформы
gemini skills install https://github.com/mukul975/Anthropic-Cybersecurity-Skills --path skills/analyzing-supply-chain-malware-artifactsВручную: положить файлы
.devin/skills/analyzing-supply-chain-malware-artifacts/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-supply-chain-malware-artifacts -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об analyzing-supply-chain-malware-artifacts
Как установить analyzing-supply-chain-malware-artifacts в Claude Code?
Выполните npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-supply-chain-malware-artifacts -a claude-code, затем используйте файл ~/.claude/skills/analyzing-supply-chain-malware-artifacts/SKILL.md.
Что делает analyzing-supply-chain-malware-artifacts?
Скилл помогает расследовать троянизированные обновления, скомпрометированные сборочные конвейеры и подменённые зависимости. Он сравнивает бинарные файлы, проверяет импорты и подписи, а также помогает оценить масштаб компрометации.
Что нужно для анализа PE-файлов?
Нужны Python 3.9+ с pefile, ssdeep, hashlib, инструменты BinDiff или Diaphora и легитимная версия ПО для сравнения. Для проверки подписи используются sigcheck или codesign.
Исходный текст
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