Privesc Linuxのロゴ

Privesc Linux

コミュニティ
hypnguyen1209
privesc-linux

Linuxホストで権限昇格を行うときに使用します。SUID/SGIDとGTFOBins、sudoによるLPE(CVE-2025-32462/32463)、ケーパビリティとLD_PRELOAD、カーネルLPE(CVE-2024-1086、Dirty Pipe、GameOver(lay))、サービスの設定不備(PwnKit、Looney Tunables)、コンテナ/名前空間からの脱出に対応します

Add to TypingMind

概要

公開者hypnguyen1209
リポジトリoffensive-claude
スキル名privesc-linux
スター
396
フォーク
71
同梱ファイル
10
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 10個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    hypnguyen1209がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Privesc Linux」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/hypnguyen1209/offensive-claude/tree/main/skills/privesc-linux
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hypnguyen1209/offensive-claude.git /tmp/offensive-claude
mkdir -p .claude/skills
cp -r /tmp/offensive-claude/skills/privesc-linux .claude/skills/privesc-linux
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでPrivesc Linuxを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にPrivesc Linuxを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Privesc Linuxは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Linux Privilege Escalation

When to Activate

  • Gained an initial unprivileged shell on a Linux host and need root or a higher-privileged account
  • Post-exploitation lateral/vertical movement on Linux servers, workstations, CI runners, or appliances
  • Container / Kubernetes pod foothold that needs to escape to the host node
  • Triaging a host for misconfig-based LPE (SUID, sudo, capabilities, writable units/cron) before reaching for kernel 0-day
  • CTF / lab challenges requiring privilege escalation with a defensible, detection-aware methodology

Technique Map

TechniqueATT&CKCWEReferenceScript
Automated + manual enumeration (LinPEAS/pspy/LES2)T1082, T1057CWE-200references/enumeration-tooling.mdscripts/linpriv_enum.py
Detection-aware / low-noise enumerationT1082CWE-200references/enumeration-tooling.mdscripts/linpriv_enum.py
SUID/SGID binary abuse (GTFOBins)T1548.001CWE-269references/suid-sudo-capabilities.mdscripts/cap_suid_hunter.sh
sudo misconfig + GTFOBins escapeT1548.003CWE-269references/suid-sudo-capabilities.mdscripts/cap_suid_hunter.sh
sudo host option LPE (CVE-2025-32462)T1548.003CWE-863references/suid-sudo-capabilities.mdscripts/sudo_cve_2025_check.sh
sudo chroot/NSS LPE (CVE-2025-32463)T1548.003CWE-829references/suid-sudo-capabilities.mdscripts/sudo_cve_2025_check.sh
Linux capabilities abuse (setuid/dac_read/sys_admin)T1548CWE-250references/suid-sudo-capabilities.mdscripts/cap_suid_hunter.sh
LD_PRELOAD / LD_LIBRARY_PATH sudo hijackT1574.006CWE-426references/suid-sudo-capabilities.mdscripts/cap_suid_hunter.sh
nf_tables double-free LPE (CVE-2024-1086)T1068CWE-416references/kernel-exploits.mdscripts/kernel_exploit_suggester.py
io_uring memory-sharing LPE (CVE-2024-0582/2025-21836)T1068CWE-416references/kernel-exploits.mdscripts/kernel_exploit_suggester.py
Dirty Pipe page-cache overwrite (CVE-2022-0847)T1068CWE-787references/kernel-exploits.mdscripts/kernel_exploit_suggester.py
GameOver(lay) OverlayFS (CVE-2023-2640/32629)T1068CWE-269references/kernel-exploits.mdscripts/kernel_exploit_suggester.py
udisks/libblockdev loop-mount LPE (CVE-2025-6019)T1068CWE-250references/service-misconfig-lpe.mdscripts/linpriv_enum.py
PAM allow_active bypass (CVE-2025-6018)T1068CWE-863references/service-misconfig-lpe.mdscripts/linpriv_enum.py
glibc ld.so Looney Tunables (CVE-2023-4911)T1068CWE-787references/service-misconfig-lpe.mdscripts/kernel_exploit_suggester.py
polkit pkexec PwnKit (CVE-2021-4034)T1548.001CWE-787references/service-misconfig-lpe.mdscripts/linpriv_enum.py
Cron/systemd/PATH/writable-file abuseT1053.003, T1574.007CWE-732references/service-misconfig-lpe.mdscripts/linpriv_enum.py
NFS no_root_squash SUID dropT1222.002CWE-732references/service-misconfig-lpe.mdscripts/linpriv_enum.py
runc fd-leak container escape (CVE-2024-21626)T1611CWE-668references/container-namespace-escape.mdscripts/container_escape_check.sh
Docker socket / privileged container escapeT1611, T1610CWE-269references/container-namespace-escape.mdscripts/container_escape_check.sh
cgroup release_agent / CAP_SYS_ADMIN escapeT1611CWE-269references/container-namespace-escape.mdscripts/container_escape_check.sh
Kubernetes pod/token escapeT1611CWE-668references/container-namespace-escape.mdscripts/container_escape_check.sh

Quick Start

bash
# 0. Stabilize shell + baseline context
python3 -c 'import pty;pty.spawn("/bin/bash")'; export TERM=xterm
id; uname -a; cat /etc/os-release

# 1. Fast, detection-aware enumeration (custom, no external download needed)
python3 linpriv_enum.py --quick            # quick wins triage
python3 linpriv_enum.py --full --json out.json   # full sweep -> JSON evidence

# 2. SUID / capabilities / sudo triage (maps directly to GTFOBins)
./cap_suid_hunter.sh                        # ranks exploitable SUID + caps + sudo -l

# 3. sudo 2025 LPE check (no creds needed; default-config killers)
./sudo_cve_2025_check.sh                    # tests CVE-2025-32462 / -32463 + PwnKit

# 4. Kernel + glibc CVE mapping for current host
python3 kernel_exploit_suggester.py        # uname/glibc/distro -> ranked modern LPEs

# 5. If containerized, check escape surface
./container_escape_check.sh                 # runc fd-leak, docker.sock, caps, k8s token

# 6. Validate root, then drop SUID backup or stable persistence per ROE
id; cp /bin/bash /tmp/.b && chmod 4755 /tmp/.b   # only if authorized

OPSEC & Detection (summary)

TechniqueTelemetry / IOCDetection (Sigma/EDR)OPSEC note
LinPEAS / mass enumBurst of find / -perm, hundreds of reads, which/getcap spamauditd execve of linpeas; EDR file-scan anomalyPrefer targeted enum (linpriv_enum.py --quick); avoid full FS walks on EDR hosts
SUID/GTFOBins escapesetuid() to 0 from non-root parent, shell with -pauditd uid-change without login; Falco Run shell untrustedUse the least-noisy binary; many GTFOBins one-liners are flagged by name
sudo CVE-2025-32463syslog sudo ... CHROOT=, NSS libnss_*.so from world-writable pathElastic "Potential CVE-2025-32463 Sudo Chroot Execution"; auditd -R usagechroot dir + fake nsswitch.conf are durable IOCs — clean the tree
sudo CVE-2025-32462sudo log with -h/HOST mismatch vs real hostnameauditd sudo with --host not paired with -lleaves clean sudo log entry; blends with normal sudo
nf_tables CVE-2024-1086unshare/CLONE_NEWUSER + nftables from non-root; dmesg slab/UAFFalco Unprivileged Delegation of Page Faults; auditd unshare+nftnamespace creation is logged; disable userns to neutralize
io_uring LPEio_uring_setup syscall from unexpected procauditd syscall=io_uring_setup; eBPF LSMmany distros now ship io_uring_disabled=2
Looney Tunables CVE-2023-4911setuid exec with GLIBC_TUNABLES= containing =; core dumpsElastic "Potential Privilege Escalation via CVE-2023-4911"env var is recorded in auditd execve; unset before exec where possible
udisks CVE-2025-6019D-Bus Filesystem.Resize/Check, loop mount in /tmp w/o nosuidauditd mount w/o nosuid; Falco mount-from-loopleaves loop device + XFS image; detach + shred image
pkexec PwnKitpkexec with argc==0, GCONV_PATH= env, /var/... GConv moduleauditd pkexec + empty argv; Sigma proc_creation_lnx_pkexecdropped GConv .so + dir are IOCs; remove them
Container escape (runc)/proc/self/fd/* cwd, host paths from container, runc exec anomaliesFalco Container escape/Mount launched in container; CrowdStrike CWPescapes are heavily monitored in CWP — confirm scope before running
cron/PATH/writable unitnew file in /etc/cron*, systemctl daemon-reload, PATH-prepended binauditd watch on /etc/cron*,/etc/systemd/*; Sigma cron tamperrevert file mtimes / remove dropped scripts post-exploit

Detailed Sigma rules, auditd rule snippets and IOC lists live inside each reference file's Detection subsection.

Deep Dives

  • references/enumeration-tooling.md — LinPEAS/pspy/LES2/unix-privesc-check, the linpriv_enum.py methodology, quick-win checklists, and low-noise enumeration for EDR-monitored hosts.
  • references/suid-sudo-capabilities.md — SUID/SGID + GTFOBins, sudo misconfig escapes, sudo CVE-2025-32462 (host) and CVE-2025-32463 (chroot/NSS), Linux capabilities (cap_setuid/cap_dac_read_search/cap_sys_admin), and LD_PRELOAD/LD_LIBRARY_PATH sudo hijacking.
  • references/kernel-exploits.md — nf_tables CVE-2024-1086 (and 2026 nftables UAFs), io_uring CVE-2024-0582 / CVE-2025-21836, Dirty Pipe CVE-2022-0847, GameOver(lay) CVE-2023-2640, plus a kernel-CVE selection methodology and ROP/commit_creds primer.
  • references/service-misconfig-lpe.md — udisks/libblockdev CVE-2025-6018/6019 chain, Looney Tunables CVE-2023-4911, PwnKit CVE-2021-4034, polkit/D-Bus abuse, cron/systemd/PATH hijacking, writable /etc/passwd, and NFS no_root_squash.
  • references/container-namespace-escape.md — runc Leaky Vessels CVE-2024-21626, Docker socket / privileged-container / --pid=host / CAP_SYS_PTRACE escapes, cgroup-v1 release_agent, user namespaces, and Kubernetes service-account-token → pod escape.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Privesc Linux」では何ができますか?

Linuxホストで権限昇格を行うときに使用します。SUID/SGIDとGTFOBins、sudoによるLPE(CVE-2025-32462/32463)、ケーパビリティとLD_PRELOAD、カーネルLPE(CVE-2024-1086、Dirty Pipe、GameOver(lay))、サービスの設定不備(PwnKit、Looney Tunables)、コンテナ/名前空間からの脱出に対応します

TypingMindでPrivesc Linuxを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Privesc Linuxはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにPrivesc Linuxをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/hypnguyen1209/offensive-claude/tree/main/skills/privesc-linuxを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Privesc Linuxを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Privesc Linuxで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもPrivesc Linuxを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Privesc Linux」は無料ですか?

はい。hypnguyen1209がMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇