re-ebpf

re-ebpf is a skill for Claude Code from dslsdzc/rev-skills. It costs 101 tokens per session (4,746 once invoked), scanned B, original, Apache-2.0.

A guide for analysing eBPF programs, small programs that run inside the Linux kernel to observe or control system activity. It covers their instructions, maps, hooks and calls to kernel helpers.

In plain words
What is it for?
Examining tracing programs, suspicious eBPF, and endpoint-security hooks; linking programs to maps; identifying hook points; and reading loaded or disassembled BPF code.
Why use it?
It helps distinguish eBPF from other types of kernel or filtering code and highlights the need for matching kernel versions and safe environments.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Examining tracing programs, suspicious eBPF, and endpoint-security hooks; linking programs to maps; identifying hook points; and reading loaded or disassembled BPF code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dslsdzc/rev-skills/re-ebpf
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dslsdzc/rev-skills --skill re-ebpf
Clone the repo
git clone --depth 1 https://github.com/dslsdzc/rev-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for re-ebpf

README.md
[![agentmods](https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-ebpf/github.svg)](https://agentmods.dev/skills/dslsdzc/rev-skills/re-ebpf)
Your own site
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-ebpf"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-ebpf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for re-ebpf

Your own site · 80×15
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-ebpf"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-ebpf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,746 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00101 $0.04746
Opus 5.5 $0.00040 $0.01898
Sonnet 5.5 $0.00020 $0.00949
Haiku 4.5 $0.00010 $0.00475

Measured 1mo ago against content hash b35dcbe84bd6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

re-ebpf scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- **运行期定位**: `sudo bpftool prog list` 列出全部已加载 prog(id/type/name/tag/map_ids/btf_id),核对样本特征(name/tag/加载时间)
.claude/skills/re-ebpf/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

eBPF 程序逆向与对抗分析(BPF-64、progs/maps、xlated)

何时使用 / 何时不用

  • 用:BPF-64 指令集(8 字节定长指令、r0-r10 寄存器、lddw/alu32/helper 调用约定)层面的程序分析
  • 用:三种来源形态——BCC(运行期编译,多只剩内核态 prog)、libbpf(常规 BPF ELF,.maps/.BTF 齐全)、手工字节码(bpf_insn 数组/预编译 blob,无元数据)
  • 用:三用途——跟踪取证(bpftrace/bcc 程序功能还原)、恶意 eBPF(内核驻留/加载链/规避手法)、EDR 对抗(bpf hook 识别与反制)
  • 用:progs/maps 关联还原、hook 点(kprobe/tracepoint/cgroup/xdp/tc/fentry)识别、helper 调用号到内核 API 的语义映射
  • 不用:经典内核模块(.ko 驱动)——走 [[re-kernel]]
  • 不用:seccomp/套接字过滤器等传统 cBPF(经典 BPF,指令集与 BPF-64 不同,本技能不覆盖)
  • 不用:仅需分析宿主加载器二进制的通用场景([[re-binary-core]]);链上 BPF 字节码(Solana 类)语义表不同,走 [[re-blockchain]]
  • 注意:helper ID 是 Linux BPF UAPI 的稳定编号(已有 BPF_FUNC_* 数值不随内核版本重新编号),版本差异影响 helper 是否存在、是否允许用于特定 prog_type/context,以及内核结构布局;分析环境内核版本与样本目标版本尽量一致(见坑 3)

工具准备

所有工具先验证再使用。加载/运行 BPF 程序到内核需要 root(或 CAP_BPF/CAP_SYS_ADMIN);恶意样本(内核驻留/规避类)的动态分析默认在隔离虚拟机 + 快照中进行([[re-sandbox]],[[re-analyze/platform-tips]] 最高原则);仅只读查询(prog list/dump xlated)风险较低,但同样建议在可控环境核对内核版本一致性。

bpftool —— 核心工具(prog/map 查询与 xlated 反汇编)

  • Debian/Ubuntu: apt install bpftool(Debian bullseye 起有独立包;Ubuntu 19.10+ 亦可装 linux-tools-common + linux-tools-generic——前者只是 wrapper,真实二进制在 linux-tools-$(uname -r) 内核配套包里);旧版 Debian(buster 及更早)无独立包,从内核源码编译 tools/bpf/bpftool 或克隆 libbpf/bpftool 仓库构建
  • Fedora: dnf install bpftool(官方仓库);Arch: pacman -S bpftool
  • Windows: 无 Linux 内核 eBPF 运行环境(微软 ebpf-for-windows 为独立实现,非 Linux 内核形态),在 WSL2(Linux 内核)内按发行版安装;macOS: 无内核 eBPF 支持,用 Linux 虚拟机
  • 验证: bpftool version;查询类命令加 sudo(bpftool prog list、bpftool prog dump xlated id N、bpftool feature probe、bpftool map show/dump id N、bpftool net show、bpftool btf dump file /sys/kernel/btf/vmlinux)

llvm-objdump —— 静态反汇编 BPF ELF

  • Debian/Ubuntu: apt install llvm;Fedora: dnf install llvm;Arch: pacman -S llvm;macOS: brew install llvm(llvm-objdump 在 /opt/homebrew/opt/llvm/bin/)
  • 验证: llvm-objdump --version;反汇编: llvm-objdump -d prog.o(ELF e_machine=EM_BPF(247) 自动识别,无需指定目标);GNU objdump(binutils 2.29+ 带 bpf 目标)也可作备选
  • 注意: 静态反汇编的是源码编译产物,与内核中执行形态(xlated)有差异(见坑 2)

Read the full file on GitHub · 120 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed b35dcbe84bd6
  2. 2mo ago Changed · +1 lines 9c911994ac37
  3. 3mo ago First seen · 119 lines · 101 tokens per session scan B b6d53689f575

Subscribe to this mod's changes

re-ebpf is a skill published in the GitHub repository dslsdzc/rev-skills (275 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 101 tokens to every session and 4,746 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

re-ebpf compared with skills from other repositories

re-ebpf next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
re-ebpfdslsdzc/rev-skillsSkill2751mo agoApache-2.0B101Claude Code
deobfuscating-powershell-obfuscated-malwareYoungmaidainon/Agent-Level-UpSkill43mo agoMITA90Claude Code, Codex
conducting-malware-incident-responseYoungmaidainon/Agent-Level-UpSkill43mo agoMITA78Claude Code, Codex
analyzing-golang-malware-with-ghidraMikaru0Mystic/sectinelSkill135mo agoApache-2.0A40Claude Code
analyzing-golang-malware-with-ghidraYoungmaidainon/Agent-Level-UpSkill43mo agoMITA95Claude Code, Codex
analyzing-network-covert-channels-in-malwareYoungmaidainon/Agent-Level-UpSkill43mo agoMITA90Claude Code, Codex
analyzing-heap-spray-exploitationYoungmaidainon/Agent-Level-UpSkill43mo agoMITA46Claude Code, Codex