Kernel red-team corpus
暂无简介
- License 许可
- MIT
- 所属仓库
- rhCat/skillChip
- 最近更新
- 2026-07-31
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- Kernel red-team corpus
- perks
- [ "rt-fs-escape", "rt-write-rofs", "rt-write-outside", "rt-net-egress", "rt-sysrq-reboot", "rt-proc-sys-write", "rt-mount", "rt-device-raw", "rt-forged-status", "rt-grant-replay", "rt-grant-expired", "rt-grant-wrong-run", "rt-grant-forged", "rt-no-capability", "rt-cap-mismatch", "rt-ungoverned-banner" ]
- skill
- cws-redteam
02 资源文件 100
- 参考文档blueprint.json3.8 KB
- 参考文档index.json11.3 KB
- 参考文档ledger.json286 B
- 参考文档perks.json4.2 KB
- 参考文档perks/rt-cap-mismatch/manifesto.json260 B
- 参考文档perks/rt-cap-mismatch/metadata.json181 B
- 参考文档perks/rt-cap-mismatch/src/contracts.json256 B
- 脚本perks/rt-cap-mismatch/src/rt_cap_mismatch.py1.2 KB
- 脚本perks/rt-cap-mismatch/src/rt_cap_mismatch.sh131 B
- 参考文档perks/rt-cap-mismatch/test/case.json227 B
- 参考文档perks/rt-device-raw/manifesto.json254 B
- 参考文档perks/rt-device-raw/metadata.json192 B
- 参考文档perks/rt-device-raw/src/contracts.json254 B
- 脚本perks/rt-device-raw/src/rt_device_raw.py1.3 KB
- 脚本perks/rt-device-raw/src/rt_device_raw.sh236 B
- 参考文档perks/rt-device-raw/test/case.json238 B
- 参考文档perks/rt-forged-status/manifesto.json263 B
- 参考文档perks/rt-forged-status/metadata.json193 B
- 参考文档perks/rt-forged-status/src/contracts.json257 B
- 脚本perks/rt-forged-status/src/rt_forged_status.py1.3 KB
- 脚本perks/rt-forged-status/src/rt_forged_status.sh242 B
- 参考文档perks/rt-forged-status/test/case.json241 B
- 参考文档perks/rt-fs-escape/manifesto.json251 B
- 参考文档perks/rt-fs-escape/metadata.json193 B
- 参考文档perks/rt-fs-escape/src/contracts.json253 B
- 脚本perks/rt-fs-escape/src/rt_fs_escape.py1.3 KB
- 脚本perks/rt-fs-escape/src/rt_fs_escape.sh234 B
- 参考文档perks/rt-fs-escape/test/case.json237 B
- 参考文档perks/rt-grant-expired/manifesto.json263 B
- 参考文档perks/rt-grant-expired/metadata.json179 B
- 参考文档perks/rt-grant-expired/src/contracts.json257 B
- 脚本perks/rt-grant-expired/src/rt_grant_expired.py1.3 KB
- 脚本perks/rt-grant-expired/src/rt_grant_expired.sh242 B
- 参考文档perks/rt-grant-expired/test/case.json241 B
- 参考文档perks/rt-grant-forged/manifesto.json260 B
- 参考文档perks/rt-grant-forged/metadata.json183 B
- 参考文档perks/rt-grant-forged/src/contracts.json256 B
- 脚本perks/rt-grant-forged/src/rt_grant_forged.py1.3 KB
- 脚本perks/rt-grant-forged/src/rt_grant_forged.sh240 B
- 参考文档perks/rt-grant-forged/test/case.json240 B
- 参考文档perks/rt-grant-replay/manifesto.json260 B
- 参考文档perks/rt-grant-replay/metadata.json185 B
- 参考文档perks/rt-grant-replay/src/contracts.json256 B
- 脚本perks/rt-grant-replay/src/rt_grant_replay.py1.3 KB
- 脚本perks/rt-grant-replay/src/rt_grant_replay.sh240 B
- 参考文档perks/rt-grant-replay/test/case.json240 B
- 参考文档perks/rt-grant-wrong-run/manifesto.json269 B
- 参考文档perks/rt-grant-wrong-run/metadata.json193 B
- 参考文档perks/rt-grant-wrong-run/src/contracts.json259 B
- 脚本perks/rt-grant-wrong-run/src/rt_grant_wrong_run.py1.3 KB
- 脚本perks/rt-grant-wrong-run/src/rt_grant_wrong_run.sh246 B
- 参考文档perks/rt-grant-wrong-run/test/case.json243 B
- 参考文档perks/rt-mount/manifesto.json239 B
- 参考文档perks/rt-mount/metadata.json195 B
- 参考文档perks/rt-mount/src/contracts.json249 B
- 脚本perks/rt-mount/src/rt_mount.py1.3 KB
- 脚本perks/rt-mount/src/rt_mount.sh226 B
- 参考文档perks/rt-mount/test/case.json233 B
- 参考文档perks/rt-net-egress/manifesto.json254 B
- 参考文档perks/rt-net-egress/metadata.json200 B
- 参考文档perks/rt-net-egress/src/contracts.json254 B
- 脚本perks/rt-net-egress/src/rt_net_egress.py1.3 KB
- 脚本perks/rt-net-egress/src/rt_net_egress.sh236 B
- 参考文档perks/rt-net-egress/test/case.json238 B
- 参考文档perks/rt-no-capability/manifesto.json263 B
- 参考文档perks/rt-no-capability/metadata.json202 B
- 参考文档perks/rt-no-capability/src/contracts.json257 B
- 脚本perks/rt-no-capability/src/rt_no_capability.py1.3 KB
- 脚本perks/rt-no-capability/src/rt_no_capability.sh242 B
- 参考文档perks/rt-no-capability/test/case.json241 B
- 参考文档perks/rt-proc-sys-write/manifesto.json266 B
- 参考文档perks/rt-proc-sys-write/metadata.json205 B
- 参考文档perks/rt-proc-sys-write/src/contracts.json258 B
- 脚本perks/rt-proc-sys-write/src/rt_proc_sys_write.py1.3 KB
- 脚本perks/rt-proc-sys-write/src/rt_proc_sys_write.sh244 B
- 参考文档perks/rt-proc-sys-write/test/case.json242 B
- 参考文档perks/rt-sysrq-reboot/manifesto.json260 B
- 参考文档perks/rt-sysrq-reboot/metadata.json193 B
- 参考文档perks/rt-sysrq-reboot/src/contracts.json256 B
- 脚本perks/rt-sysrq-reboot/src/rt_sysrq_reboot.py1.3 KB
- 脚本perks/rt-sysrq-reboot/src/rt_sysrq_reboot.sh240 B
- 参考文档perks/rt-sysrq-reboot/test/case.json240 B
- 参考文档perks/rt-ungoverned-banner/manifesto.json275 B
- 参考文档perks/rt-ungoverned-banner/metadata.json202 B
- 参考文档perks/rt-ungoverned-banner/src/contracts.json261 B
- 脚本perks/rt-ungoverned-banner/src/rt_ungoverned_banner.py1.2 KB
- 脚本perks/rt-ungoverned-banner/src/rt_ungoverned_banner.sh136 B
- 参考文档perks/rt-ungoverned-banner/test/case.json232 B
- 参考文档perks/rt-write-outside/manifesto.json263 B
- 参考文档perks/rt-write-outside/metadata.json198 B
- 参考文档perks/rt-write-outside/src/contracts.json257 B
- 脚本perks/rt-write-outside/src/rt_write_outside.py1.3 KB
- 脚本perks/rt-write-outside/src/rt_write_outside.sh242 B
- 参考文档perks/rt-write-outside/test/case.json241 B
- 参考文档perks/rt-write-rofs/manifesto.json254 B
- 参考文档perks/rt-write-rofs/metadata.json192 B
- 参考文档perks/rt-write-rofs/src/contracts.json254 B
- 脚本perks/rt-write-rofs/src/rt_write_rofs.py1.3 KB
- 脚本perks/rt-write-rofs/src/rt_write_rofs.sh236 B
- 参考文档perks/rt-write-rofs/test/case.json238 B
03 SKILL.md 正文
cws-redteam — Kernel red-team corpus (V-RED, the M3 / SV-3 gate)
The kernel-tier adversarial expected-refusal corpus (plan v1.1, P2-T08). SV-3's promise is that
execution becomes a kernel-enforced boundary — so this corpus proves the boundary holds with the
in-process software scan DISABLED: each perk mounts a real attack and routes it through the exod
daemon into the bwrap SandboxProfile (or against exod's signed-status channel), and asserts the
boundary REFUSED it. The refusal is therefore the Linux kernel (namespaces, bind mounts, masked /proc,
dropped capabilities) or the Ed25519 channel — never a scanner.
Doctrine (meta-rule M4): a recorded refusal is evidence. Each perk exits 0 iff the boundary held — the attack was refused AND a benign-control oracle was accepted (so a gate that silently goes no-op, accepting everything, fails the corpus instead of passing it). 14 behaviours (≥ 12 required), two families:
| family | perks | what the kernel/channel must refuse |
|---|---|---|
| sandbox | rt-fs-escape · rt-write-rofs · rt-write-outside · rt-net-egress · rt-sysrq-reboot · rt-proc-sys-write · rt-mount · rt-device-raw | a hostile command run by exod inside the sandbox is blocked by the kernel (exod's SIGNED status is error, not ok) |
| channel | rt-forged-status · rt-grant-replay · rt-grant-expired · rt-grant-wrong-run · rt-grant-forged · rt-no-capability | a forged status, or a replayed / expired / cross-run / tampered / capability-less grant, is refused on exod's channel |
| capability | rt-cap-mismatch | a sandbox materialized wider than its capability manifest (an ungranted bind) is refused (P2-T06); pure construction-time logic, no kernel needed |
The attack logic lives in infra/exec/redteam.py (the shared corpus), exercised by tests/test_redteam.py.
Each perk's src/rt_*.py PINS exactly one behaviour (the ATTACK is baked, not a runtime arg), so the
SKILL itself encodes the corpus.
Platform — this runs on a real kernel only
The boundary is the Linux kernel, so every perk needs Linux + bubblewrap (even the channel perks, whose
oracle runs a benign step through the sandbox). Each perk's test/case.json declares requires: [python3, bwrap], so the self-tests SKIP where bwrap is absent (the macOS dev box, the plain compute CI image) and RUN
for real in the exec image (infra/exec/Dockerfile.exec). The governed gate is driven inside that image
— docker run --privileged so the sandbox host can drop each step into an unprivileged namespace.
What it redeems
P2-T08 and the kernel-validated P2 attack-surface cone — P2-T01 (grants), P2-T02 (exod), P2-T03
(SandboxProfile), P2-T08 (this corpus) — all validated_by: cws-redteam. Together with the cws-bench
perf branch (P2-T07 / P2-T09) this closes M3 / SV-3.
What to look out for
Each perk writes redteam.json ({attack, family, held, refused, detail}) and exits 0 iff held. A
nonzero exit means a BREACH (the attack succeeded or the oracle was refused) — read detail
(attack_status=…, oracle_ok=…, or the refusal reason). LOGS: that file + the executor run-ledger.
How to use it
Pick a perk (e.g. rt-grant-replay); it takes no inputs (the behaviour is baked). Drive the whole corpus
through govd inside the exec image to produce the run-ledgers cws-observe/redeem reads.
04 同仓库更多 Skills
Vercel Deploy
暂无简介
Audio Transcribe
暂无简介
Speech (OpenAI TTS)
暂无简介
Skill Installer
暂无简介
demo-skill
A demo skill used as a test fixture for the validate perk. Use when checking that quick_validate.py accepts a well-formed SKILL.md.
demo-skill
A demo skill used as a test fixture for generating agents/openai.yaml. Use when validating the gen_openai_yaml perk.