mizazhaider-ceh/agentarsenal/kernel-exploit-basics

Claude Code and agent skill by mizazhaider-ceh/agentarsenal

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when learning kernel exploitation fundamentals in a

Install

npx vskill@latest install mizazhaider-ceh/agentarsenal/kernel-exploit-basics

SKILL.md

The same SKILL.md was published earlier as mizazhaider-ceh/agentarsenal/kernel-exploit-basics.

Kernel exploitation turns a kernel bug into ring 0 code execution: the stakes and the mitigations are both higher than userspace. This skill covers the fundamentals for lab learning on your own VMs: attack surface, bug classes, mitigation concepts, and the safe lab setup. Learning only; never test kernels you do not own.

Quick Workflow

  1. Build the lab: a vulnerable kernel VM with snapshots, and a

matching debug setup.

  1. Learn the attack surface: syscalls, ioctls, and drivers reachable

from unprivileged users.

  1. Study the bug class: UAF, overflow, or race in kernel context.
  2. Understand the mitigations: SMEP, SMAP, KASLR, KPTI, and what

each stops.

  1. Plan the primitive: what the bug gives you (read, write, where).
  2. Plan the escalation: from primitive to credential overwrite or

modprobe_path.

  1. Develop against snapshots: snapshot before each attempt.
  2. Document the full chain for learning, with the mitigations

noted.

1. Lab setup and recon

bash
# Lab VM: vulnerable kernel, snapshot before you start
# Check the mitigations on your lab kernel
cat /proc/cmdline
dmesg | grep -i -E "smep|smap|kaslr" | head -5
# Find reachable attack surface: world accessible device nodes
find /dev -type c 2>/dev/null | head -20
ls -l /dev/vuln* 2>/dev/null
bash
# Identify the bug: dmesg after a crash tells you the class
dmesg | tail -30
# KASAN builds give precise reports; use a KASAN kernel for learning

2. Classic escalation primitives (lab)

bash
# Concept: overwrite creds (uid=0) or modprobe_path, then trigger
# Modern path: ROP in kernel, bypassing SMEP with ret2usr alternatives
# or SMAP bypass via controlled kernel memory writes
echo "learn each mitigation bypass separately before chaining"
python
#!/usr/bin/env python3
"""Lab notes template for a kernel bug."""
bug = {
"location": "driver ioctl 0x1337",
"class": "heap UAF",
"primitive": "write-what-where (limited)",
"mitigations": "SMEP on, SMAP on, KASLR on",
"plan": "1. defeat KASLR via info leak 2. ROP to commit_creds(prepare_kernel_cred(0))",
}
for k, v in bug.items():
print(f"{k}: {v}")

Edge cases

  • The bug is not reachable unprivileged. Then it is a lower

severity local issue; adjust the learning goal.

  • KASLR defeats your hardcoded addresses. Learn info leaks first;

guessing is not a method.

  • The VM keeps crashing. That is the process; snapshots make it

cheap, and each crash teaches the constraint.

Escalation

  • Stuck on a mitigation: study that mitigation's known bypasses

in isolation before returning to the chain.

  • Need a real target assessment: kernel exploitation against

production is specialized work; scope it separately.

Detection and defender view

Defenders detect kernel exploitation with kernel integrity monitoring, audit of privileged operations, and crash analysis. They defend with the mitigations (keep them on), timely patching, and reducing attack surface (unneeded drivers, unprivileged namespaces). The durable lesson: patch quickly, because public kernel exploits follow disclosure fast.

Key references

  • MITRE ATT&CK T1068 (Exploitation for Privilege Escalation).
  • Linux kernel self protection documentation.
  • Kernel exploitation learning resources (lab focused).

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mizazhaider-ceh/agentarsenal/kernel-exploit-basics/badge)](https://verified-skill.com/skills/mizazhaider-ceh/agentarsenal/kernel-exploit-basics)

Something wrong with this skill or its page? Tell us.