re-gdb

re-gdb is a skill for Claude Code from dslsdzc/rev-skills. It costs 41 tokens per session (2,629 once invoked), scanned B, original, Apache-2.0.

A guide to dynamic debugging with GDB, a program debugger, plus the pwndbg or gef extensions. It covers Linux programs, core files, and Windows programs running through Wine.

In plain words
What is it for?
Use it to attach to processes, set breakpoints, read or write memory, inspect core files, and check protections such as NX, canaries, RELRO, and PIE.
Why use it?
It provides the commands and platform guidance needed to pause a running program, inspect memory, and investigate crashes or security protections.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to attach to processes, set breakpoints, read or write memory, inspect core files, and check protections such as NX, canaries, RELRO, and PIE.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dslsdzc/rev-skills/re-gdb
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-gdb
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-gdb

README.md
[![agentmods](https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-gdb/github.svg)](https://agentmods.dev/skills/dslsdzc/rev-skills/re-gdb)
Your own site
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-gdb"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-gdb/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-gdb

Your own site · 80×15
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-gdb"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-gdb.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,629 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 53
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
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.00041 $0.02629
Opus 5 $0.00020 $0.01314
Sonnet 5 $0.00008 $0.00526
Haiku 4.5 $0.00004 $0.00263

Measured 10d ago against content hash e5b21a91fe80, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

re-gdb scanned grade B with 2 findings 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 10d 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 sysctl -w kernel.yama.ptrace_scope=0 # 临时放宽(重启还原)

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -L https://github.com/hugsy/gef/raw/master/gef.py -o ~/.gdbinit
.claude/skills/re-gdb/SKILL.md · 135 lines

How it starts

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

GDB/pwndbg/gef 动态调试

何时使用 / 何时不用

  • 用:Linux 目标动态调试(attach/启动/断点/内存读写);core 文件分析;Wine 下调试 PE 进程
  • 不用:Windows 原生目标(走 [[re-x64dbg]],或 Wine 内 gdb 见 [[platform-tips]] Linux 分支);macOS 目标(走 [[re-lldb]])
  • 不用:只读内存不调试(默认转储优先,走 [[re-memdump]])

工具准备

参考 [[platform-tips]]:动态执行默认沙箱;Linux 分支的 Wine 进程 attach 经验;直读 vs 转储 决策——attach 失败即转 [[re-memdump]]。

gdb

  • Linux: apt install gdb / dnf install gdb / pacman -S gdb
  • macOS: brew install gdb(需自签证书,一般直接用 lldb 更顺)
  • WSL: Linux 包直接可用(跨 Windows 边界 attach 不可行,见 [[platform-tips]] WSL 分支)
  • 验证: gdb --version

pwndbg / gef(二选一,装到 ~/.gdbinit)

  • pwndbg:
    git clone https://github.com/pwndbg/pwndbg
    cd pwndbg && ./setup.sh        # 自动装依赖并写 ~/.gdbinit
    
  • gef:
    curl -L https://github.com/hugsy/gef/raw/master/gef.py -o ~/.gdbinit
    
  • 验证: 进入 gdb 出现 pwndbg/gef banner
  • 注意: 两者都写 ~/.gdbinit,不要同时装(后装的覆盖前装,残留脚本互相干扰);版本滚动较快,功能差异以各自官方 README 为准(详见 [[gotchas]])

checksec(二进制防护检查)

  • pwndbg 内置 checksec 命令(装好 pwndbg 即用)
  • pip install pwntoolspwn checksec --file ./target
  • 验证: gdb -q -ex 'checksec' -ex quit ./target 输出 NX/Canary/RELRO/PIE

操作步骤

  1. attach 前查 ptrace 权限

    cat /proc/sys/kernel/yama/ptrace_scope
    # 1 = 仅父进程可 attach(默认);0 = 任意同属主;容器内常被强制禁止
    sudo sysctl -w kernel.yama.ptrace_scope=0   # 临时放宽(重启还原)
    
    gdb -q -p <pid>          # 同属主或 root;失败(Operation not permitted)→ 见坑 1
    

    沙箱容器内 attach 常被 seccomp 拦 → 直接走 [[re-memdump]] 转储。

  2. 断点/单步/条件断点

    (gdb) file ./target
    (gdb) b *0x401000          # 地址断点
    (gdb) b sym.check if argc == 2    # 条件断点
    (gdb) r arg1 arg2          # 运行并传参
    (gdb) ni / si              # 单步(跳过/进入调用)
    (gdb) c                    # 继续
    (gdb) info b               # 列出断点
    

    带参数动态分析命令: gdb -q -ex 'b main' -ex 'r' -ex 'x/10i $rip' ./target

    • 数据断点: watch *(int*)0x601000(写触发)/ rwatch(读触发)——查密钥写入时刻/解密落点
    • 系统调用断点: catch syscall openat——理清文件/网络行为,配合 commands ... end 自动打印参数后继续
    • 断点命中自动化(不改执行流,批量验证参数):
      (gdb) b check
      (gdb) commands
        silent
        printf "arg=%s\n", $rdi
        continue
      end
      

Read the full file on GitHub · 135 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 135 lines · 41 tokens per session scan B e5b21a91fe80

Subscribe to this mod's changes

re-gdb is a skill published in the GitHub repository dslsdzc/rev-skills (52 stars, last pushed 12d ago), licensed Apache-2.0. It adds 41 tokens to every session and 2,629 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

Reverse Engineering & Binary Analysis

Binary analysis, assembly interpretation, disassembly, decompilation, firmware RE, and protocol reverse engineering.

Masriyan/Claude-Code-CyberSecurity-Skill · 26 tokens

deobfuscating-powershell-obfuscated-malware

Systematically deobfuscates multi-layer PowerShell malware using AST analysis, dynamic tracing, and tools like PSDecode and PowerDecode to reveal hidden payloads and C2 infrastructure. Use during incident response or malware analysis when a PowerShell script is obfuscated with encoding, string manipulation, or…

Youngmaidainon/Agent-Level-Up · 90 tokens

conducting-malware-incident-response

Respond to malware infections across enterprise endpoints by identifying the malware family, determining infection vectors, assessing spread, and executing containment, analysis, eradication, and recovery procedures aligned to MITRE ATT&CK. Use when responding to a confirmed or suspected malware infection, including…

Youngmaidainon/Agent-Level-Up · 78 tokens

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware in Ghidra by parsing Go buildinfo and pclntab structures, recovering stripped/obfuscated function names (e.g. via GoResolver), and extracting embedded module/dependency strings and types from Go binaries. Use when analyzing a Go-language malware sample, deobfuscating a…

Youngmaidainon/Agent-Level-Up · 95 tokens

analyzing-network-covert-channels-in-malware

Detect and analyze covert communication channels used by malware, including DNS tunneling, ICMP exfiltration, steganographic HTTP, and other protocol abuse used for C2 and data exfiltration. Use when investigating suspicious DNS/ICMP/HTTP traffic patterns, hunting for hidden C2 channels in network captures, or…

Youngmaidainon/Agent-Level-Up · 90 tokens

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries.

Mikaru0Mystic/sectinel · 40 tokens