analyzing-supply-chain-malware-artifacts
यह क्या करती है
यह टूल उन हमलों की जांच में मदद करता है जो सॉफ़्टवेयर अपडेट या ऐसे components के ज़रिए होते हैं जो भरोसेमंद लगते हैं, लेकिन उनमें छेड़छाड़ करके खतरनाक प्रोग्राम फैलाए गए होते हैं। यह सॉफ़्टवेयर के versions की तुलना करके ऐसे बदलाव ढूंढता है।
कब इस्तेमाल करें
- ✓जब किसी security incident की जांच हो रही हो और शक हो कि कोई भरोसेमंद प्रोग्राम से छेड़छाड़ हुई है।
- ✓यह समझने के लिए कि साइबर हमला सॉफ़्टवेयर के ज़रिए कैसे फैला।
- ✓किसी सॉफ़्टवेयर को इस्तेमाल करने से पहले जांचने के लिए कि वह सुरक्षित है या नहीं।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-supply-chain-malware-artifacts/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस सॉफ़्टवेयर अपडेट फ़ाइल की तुलना असली version से करो, और देखो कि उसमें कुछ खतरनाक तो नहीं है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह टूल एक संदिग्ध प्रोग्राम फ़ाइल की तुलना एक ज्ञात सही version से करता है। यह जोड़े गए या बदले गए हिस्सों को ढूंढता है, और उन functions में बदलाव देखता है जिन्हें प्रोग्राम call कर सकता है। इससे पता चलता है कि कुछ डाला गया है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
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))
…
अक्सर पूछे जाने वाले सवाल
supply chain attack क्या है?
यह एक तरह का साइबर हमला है, जिसमें हमलावर किसी भरोसेमंद सॉफ़्टवेयर कंपनी को निशाना बनाते हैं, ताकि उसके ग्राहकों तक malware पहुंचाया जा सके।
प्रोग्राम फ़ाइलों की तुलना क्यों करें?
तुलना से पता चलता है कि किसी प्रोग्राम में ऐसा कोई बदलाव तो नहीं हुआ जो वहां नहीं होना चाहिए था, और वह बदलाव जानबूझकर किया गया है या नहीं।
malware artifacts क्या हैं?
ये malware के छोड़े हुए सबूत या निशान होते हैं, जैसे बदला हुआ code या संदिग्ध फ़ाइलें, जो हमले को समझने में मदद करते हैं।
जानकारी
लेखक का मूल विवरण
Investigate supply chain attack artifacts including trojanized software updates, compromised build pipelines, and sideloaded dependencies to identify intrusion vectors and scope of compromise.
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #7655
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
graincrawl
394kयह आपके एजेंट को सेव की गई Granola मीटिंग नोट्स और ट्रांसक्रिप्ट में खोजने, उनकी ताज़गी जांचने और किसी अवधि के हिसाब से गिनती करने देती है।
notcrawl
394kयह आपके एजेंट को Notion वर्कस्पेस की सेव की गई कॉपी में खोजने, पेज और डेटाबेस देखने और पेजों को Markdown फ़ाइलों में निर्यात करने देती है।
knowledge-entities
394kयह आपके एजेंट को लोगों, कंपनियों और प्रोजेक्ट्स की पहचान करने और आपके Knowledge vault में स्रोत-आधारित प्रोफ़ाइल पेज लिखने देती है।