[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PCAYSDWZJVZR9WP108YCAZ":3,"skill-same:01M6PCAYSDWZJVZR9WP108YCAZ":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":27,"commitSha":48,"skillDirectory":49,"forksCount":13,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":52,"install":53,"resources":66},"01M6PCAYSDWZJVZR9WP108YCAZ","pwn-chain",null,"Go from reverse engineering to a working exploit: stack\u002Fheap\u002Fkernel pwn workflows with pwntools, libc-database, ROP, and stabilization from CTF to authorized remote targets.","duc-duy-1612\u002FOnline-Delivery-Systems-Web","duc-duy-1612","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F192231384?v=4","01M6NSDKQQDKVTHZ8DZMZ1VYY6","01M6NSDKW8DDVTQHBT1HBDDJPT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fpwn-chain\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"pwn chain","chain","community","reverse","heap","reverse engineering","with","remote","targets","main","go","ctf","exploit","stack","https","license","database","workflows","kernel","github","2026-11-10 10:12:30",false,"---\nname: pwn-chain\ndescription: \"Go from reverse engineering to a working exploit: stack\u002Fheap\u002Fkernel pwn workflows with pwntools, libc-database, ROP, and stabilization from CTF to authorized remote targets.\"\nrisk: offensive\nsource: \"https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill\"\nsource_repo: \"zhaoxuya520\u002Freverse-skill\"\nsource_type: community\ndate_added: \"2026-08-25\"\nlicense: \"MIT\"\nlicense_source: \"https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill\u002Fblob\u002Fmain\u002FLICENSE\"\n---\n> **⚠️ AUTHORIZED USE ONLY**\n> This skill is for educational purposes or authorized security assessments only.\n> You must have explicit, written permission from the system owner before using this tool.\n> Misuse of this tool is illegal and strictly prohibited.\n\n> **Mandatory confirmation gate**\n> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:\n> 1. Ask the user to state the exact target URL, IP, account, or resource.\n> 2. Ask the user to confirm written authorization and the permitted scope.\n> 3. Show the exact command(s) and explain their expected effect.\n> 4. Wait for explicit confirmation in the current conversation.\n>\n> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.\n\n## When to Use\n\n- A binary vulnerability is understood and needs a reliable exploit.\n- Porting a CTF-style exploit to an authorized real-world target.\n\n## 适用范围\n\n当任务属于以下场景时使用本 skill：\n\n1. **拿到二进制 + 已知漏洞点** — 静态\u002F审计\u002Ffuzz 已经找到溢出\u002FUAF\u002Fdouble free，需要从触发到拿 shell\n2. **CTF 题已经本地通了，远程打不通** — 远端环境差异导致脚本失效，需要稳定化\n3. **真实目标的二进制利用** — SRC \u002F 红队场景下，已经识别到内存损坏漏洞，需要构造 RCE\n4. **Linux 内核驱动的 ioctl bug** — 用户态触发，目标是提权到 root\n\n**前提**：你已经知道\"哪里炸了\"。本 skill 不负责发现漏洞（那是 fuzzing \u002F 审计），只负责\"从漏洞点写出 exploit\"。\n\n### 与其他 skill 的分工\n\n| 场景 | 用什么 |\n|------|--------|\n| 识别 custom VM \u002F anti-debug \u002F 复杂 obfuscation | `reverse-engineering\u002F` |\n| 从零打开二进制做静态分析 | `ida-reverse\u002F` 或 `radare2\u002F` |\n| **有漏洞点，写 exploit 打通远程** | **本 skill** |\n| 把 pwn 拿到的 shell 整合进完整攻击链 | `attack-chain\u002F`（下游） |\n\n`reverse-engineering\u002F` 关注\"理解程序在干什么\"（模式识别、协议还原、解 CTF 题里的奇怪机制）；本 skill 关注\"把已经看懂的漏洞变成可执行的攻击\"。两者经常配套使用，但分工清晰。\n\n## 核心工作流\n\n```text\nStep 1: 确认漏洞类型 + 保护机制\n   ├─ checksec .\u002Fvuln（NX \u002F Canary \u002F PIE \u002F RELRO \u002F Fortify）\n   ├─ file .\u002Fvuln  + readelf -d .\u002Fvuln\n   ├─ 漏洞分类：栈溢出 \u002F 格式化字符串 \u002F 堆 (UAF\u002FDF\u002FOF) \u002F 整数 \u002F 竞态 \u002F 内核\n   └─ → 决定走哪个 references\u002F\n\nStep 2: 选择利用策略\n   ├─ NX 关 + 无 ASLR → 直接 shellcode\n   ├─ NX 开 + 给 libc → ret2libc \u002F one_gadget\n   ├─ NX 开 + 不给 libc → leak 后 libc-database 反查\n   ├─ 堆 → 按 glibc 版本对应技术 (tcache\u002Ffastbin\u002Funsorted\u002Flarge)\n   └─ 内核 → commit_creds \u002F modprobe_path \u002F core_pattern\n\nStep 3: 准备 libc + gadget\n   ├─ libc-database：.\u002Ffind puts 0x6f0\n   ├─ ROPgadget --binary .\u002Flibc.so.6 --only \"pop|ret\"\n   ├─ one_gadget .\u002Flibc.so.6\n   └─ 计算 base：leak_addr - libc.sym['puts']\n\nStep 4: 写 pwntools 模板（本地 process）\n   ├─ context.binary = ELF('.\u002Fvuln')\n   ├─ p = process('.\u002Fvuln')  \u002F  p = gdb.debug('.\u002Fvuln','b *main+xx')\n   ├─ payload = cyclic(N) + p64(ret) + ...\n   └─ p.interactive()\n\nStep 5: 本地通\n   ├─ 反复 attach + 看寄存器 + 调 offset\n   ├─ 用 pwndbg\u002FGEF 的 vmmap \u002F heap \u002F bins \u002F telescope\n   └─ 跑通后切 remote()\n\nStep 6: 远程稳定化\n   ├─ libc 偏移：用 leak 反查 libc-database，不要拍脑袋\n   ├─ 栈对齐：16-byte 不对齐 → movaps 崩 → 加一个 ret gadget\n   ├─ 远程网络延迟 → recvuntil 精确锚字符串，禁用模糊 sleep\n   ├─ 远程缓冲：sendlineafter 比 sendline 更稳\n   ├─ 堆喷成功率：放大 spray 数量 + 留 padding chunk 防合并\n   └─ 多次跑：写 while True 验证成功率 ≥ 95%\n```\n\n## 典型场景\n\n### 场景 1：远程 64 位二进制 (NX+PIE+canary, 给了 libc)\n\n```text\n已有：.\u002Fvuln（64-bit ELF, NX, PIE, canary）+ .\u002Flibc.so.6 + nc host port\n漏洞：read(buf, 0x200) 但 buf 只有 0x40 字节 → 栈溢出\n保护：canary 拦住，PIE 让 .text 随机化\n\n策略：\n1. 先 leak canary（栈\u002F格式化字符串\u002F部分读）\n2. 再 leak 一个 libc 函数地址（puts@got）\n3. 用 libc.address = leaked - libc.sym['puts'] 算 libc base\n4. one_gadget .\u002Flibc.so.6 选一个约束能满足的 magic gadget\n5. payload = padding + canary + saved_rbp + (pop_rdi + bin_sh + system) 或直接 one_gadget\n6. 加一个 ret gadget 修栈对齐（关键！）\n```\n\n完整模板参见 `references\u002Fstack-pwn.md`。\n\n### 场景 2：Linux 内核驱动 ioctl 越界写 → 拿 root\n\n```text\n已有：vmlinux + bzImage + initramfs.cpio.gz + 自定义 vuln.ko\n漏洞：ioctl(0x1337, ptr) 里 copy_from_user 长度可控 → kernel heap overflow (kmalloc-64 slab)\n保护：SMEP, SMAP, KASLR, KPTI\n\n策略：\n1. 改 init 脚本拿到 root shell（CTF）或先 leak KASLR base 再继续（真实）\n2. 通过 \u002Fproc\u002Fkallsyms（可能限权）或未初始化堆喷 leak 内核基址\n3. 在 kmalloc-64 slab 里喷 tty_struct \u002F msg_msg \u002F pipe_buffer\n4. 覆盖 vtable 指针指向用户态 → 不行（SMEP），改走 stack pivot + 内核 ROP\n5. ROP 链：prepare_kernel_cred(0) → commit_creds → swapgs+iretq → 用户态 execve(\"\u002Fbin\u002Fsh\")\n6. 或更省事：覆盖 modprobe_path 为 \"\u002Ftmp\u002Fx\"，写一个 \u002Ftmp\u002Fx，然后触发 modprobe\n```\n\n完整模板参见 `references\u002Fkernel-pwn.md`。\n\n## 按需自举 (On-Demand Bootstrap)\n\n### 工具依赖\n\n| 工具 | 用途 | 安装方式 |\n|------|------|---------|\n| pwntools | exploit 编写框架 | `pip install pwntools` |\n| GEF | gdb 增强（推荐内核 + 用户态） | `git clone https:\u002F\u002Fgithub.com\u002Fbata24\u002Fgef` (fork 维护活跃) |\n| pwndbg | gdb 增强（堆调试体验最好） | `git clone https:\u002F\u002Fgithub.com\u002Fpwndbg\u002Fpwndbg && .\u002Fsetup.sh` |\n| ROPgadget | gadget 搜索 | `pip install ropgadget` |\n| Ropper | gadget 搜索（备选，支持架构多） | `pip install ropper` |\n| one_gadget | libc magic gadget 查找 | `gem install one_gadget`（需 ruby） |\n| libc-database | libc 指纹反查 | `git clone https:\u002F\u002Fgithub.com\u002Fniklasb\u002Flibc-database && .\u002Fget` |\n| qemu-system-x86_64 | 内核题调试 | `apt install qemu-system-x86` |\n| binwalk \u002F cpio | initramfs 拆包 | `apt install binwalk cpio` |\n| patchelf | 切换 libc 版本 | `apt install patchelf` |\n\n### Bootstrap 检查脚本\n\n```bash\n# 一键检查 + 安装核心工具\nfor t in pwntools ropgadget ropper; do\n  pip show $t >\u002Fdev\u002Fnull 2>&1 || pip install $t\ndone\n\ncommand -v one_gadget >\u002Fdev\u002Fnull || gem install one_gadget\n\n[ -d ~\u002Ftools\u002Flibc-database ] || git clone https:\u002F\u002Fgithub.com\u002Fniklasb\u002Flibc-database ~\u002Ftools\u002Flibc-database\n[ -d ~\u002Ftools\u002Flibc-database\u002Fdb ] || (cd ~\u002Ftools\u002Flibc-database && .\u002Fget ubuntu debian)\n\n[ -d ~\u002Ftools\u002Fpwndbg ] || (git clone https:\u002F\u002Fgithub.com\u002Fpwndbg\u002Fpwndbg ~\u002Ftools\u002Fpwndbg && cd ~\u002Ftools\u002Fpwndbg && .\u002Fsetup.sh)\n```\n\n### 同一工具自动安装失败 2 次后\n\n停止重试，输出结构化手动安装步骤（pip 源 \u002F gem 源 \u002F git 国内镜像 \u002F apt 源）让用户确认。\n\n## 路由上下文\n\n**上游入口**: `skills\u002FSKILL.md`（总控）、`routing.md`\n**触发条件**: 有二进制 + 已识别漏洞点，需要写 exploit\n\n**上游 skill（先用它们再回到本 skill）**:\n- 还没看懂二进制在干什么 → `reverse-engineering\u002F`\n- 需要静态详细分析 → `ida-reverse\u002F`\n- 快速侦察确认架构\u002F保护机制 → `radare2\u002F`\n\n**下游 skill（拿到 shell 之后）**:\n- 整合进完整攻击链（横向、提权、持久化）→ `attack-chain\u002F`\n\n**子模块导航**:\n- 栈类利用（ret2libc \u002F ret2csu \u002F one_gadget \u002F 栈对齐）→ `references\u002Fstack-pwn.md`\n- 堆类利用（tcache \u002F fastbin \u002F unsorted \u002F large bin \u002F FILE struct）→ `references\u002Fheap-pwn.md`\n- 内核 pwn（kROP \u002F SMEP-SMAP 绕过 \u002F KASLR leak \u002F modprobe_path）→ `references\u002Fkernel-pwn.md`\n\n## 注意事项\n\n- **不要在本地跑通就交差** — 本地 libc \u002F ASLR \u002F 网络环境都和远程不同，必须在 remote 模式下连续跑 20 次以上验证稳定性\n- **libc 版本必须确认** — 用 leak + libc-database 反查，不要假设是 Ubuntu 22.04 默认 libc\n- **栈对齐是 64 位的常见坑** — `movaps xmm0, [rsp]` 在 rsp 未 16 字节对齐时段错误，加一个空 `ret` gadget 解决\n- **堆利用对 glibc 版本极敏感** — tcache 在 2.27 引入，safe-linking 在 2.32 引入，2.34 移除 hooks，每个版本利用路径不同\n- **内核 pwn 必须先确认 cpu 标志** — qemu 启动参数里有没有 +smep +smap +pku 直接决定 ROP 链怎么写\n- **KASLR leak 一次就够** — 拿到一个内核地址后所有地址都算偏移，不要反复 leak\n\n## 任务完成自检（声称完成前 MUST 通过）\n\n- [ ] 我是否执行了工作流中的每一步（而不是只阅读）？\n- [ ] 我是否基于 `tool-index` 使用了真实工具路径？\n- [ ] 我是否产出了可复现证据（命令\u002F脚本\u002F截图\u002F报告）？\n- [ ] 我是否完成并回写了 RULES 要求的 Checklist 项？\n\n## Limitations\n\n- Exploit development only on systems you are authorized to attack.\n- Mitigations (full RELRO, CFI, MTE) raise difficulty substantially.\n\n> Adapted from [zhaoxuya520\u002Freverse-skill](https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill) (MIT).\n","> **⚠️ AUTHORIZED USE ONLY**\n> This skill is for educational purposes or authorized security assessments only.\n> You must have explicit, written permission from the system owner before using this tool.\n> Misuse of this tool is illegal and strictly prohibited.\n\n> **Mandatory confirmation gate**\n> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:\n> 1. Ask the user to state the exact target URL, IP, account, or resource.\n> 2. Ask the user to confirm written authorization and the permitted scope.\n> 3. Show the exact command(s) and explain their expected effect.\n> 4. Wait for explicit confirmation in the current conversation.\n>\n> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.\n\n## When to Use\n\n- A binary vulnerability is understood and needs a reliable exploit.\n- Porting a CTF-style exploit to an authorized real-world target.\n\n## 适用范围\n\n当任务属于以下场景时使用本 skill：\n\n1. **拿到二进制 + 已知漏洞点** — 静态\u002F审计\u002Ffuzz 已经找到溢出\u002FUAF\u002Fdouble free，需要从触发到拿 shell\n2. **CTF 题已经本地通了，远程打不通** — 远端环境差异导致脚本失效，需要稳定化\n3. **真实目标的二进制利用** — SRC \u002F 红队场景下，已经识别到内存损坏漏洞，需要构造 RCE\n4. **Linux 内核驱动的 ioctl bug** — 用户态触发，目标是提权到 root\n\n**前提**：你已经知道\"哪里炸了\"。本 skill 不负责发现漏洞（那是 fuzzing \u002F 审计），只负责\"从漏洞点写出 exploit\"。\n\n### 与其他 skill 的分工\n\n| 场景 | 用什么 |\n|------|--------|\n| 识别 custom VM \u002F anti-debug \u002F 复杂 obfuscation | `reverse-engineering\u002F` |\n| 从零打开二进制做静态分析 | `ida-reverse\u002F` 或 `radare2\u002F` |\n| **有漏洞点，写 exploit 打通远程** | **本 skill** |\n| 把 pwn 拿到的 shell 整合进完整攻击链 | `attack-chain\u002F`（下游） |\n\n`reverse-engineering\u002F` 关注\"理解程序在干什么\"（模式识别、协议还原、解 CTF 题里的奇怪机制）；本 skill 关注\"把已经看懂的漏洞变成可执行的攻击\"。两者经常配套使用，但分工清晰。\n\n## 核心工作流\n\n```text\nStep 1: 确认漏洞类型 + 保护机制\n   ├─ checksec .\u002Fvuln（NX \u002F Canary \u002F PIE \u002F RELRO \u002F Fortify）\n   ├─ file .\u002Fvuln  + readelf -d .\u002Fvuln\n   ├─ 漏洞分类：栈溢出 \u002F 格式化字符串 \u002F 堆 (UAF\u002FDF\u002FOF) \u002F 整数 \u002F 竞态 \u002F 内核\n   └─ → 决定走哪个 references\u002F\n\nStep 2: 选择利用策略\n   ├─ NX 关 + 无 ASLR → 直接 shellcode\n   ├─ NX 开 + 给 libc → ret2libc \u002F one_gadget\n   ├─ NX 开 + 不给 libc → leak 后 libc-database 反查\n   ├─ 堆 → 按 glibc 版本对应技术 (tcache\u002Ffastbin\u002Funsorted\u002Flarge)\n   └─ 内核 → commit_creds \u002F modprobe_path \u002F core_pattern\n\nStep 3: 准备 libc + gadget\n   ├─ libc-database：.\u002Ffind puts 0x6f0\n   ├─ ROPgadget --binary .\u002Flibc.so.6 --only \"pop|ret\"\n   ├─ one_gadget .\u002Flibc.so.6\n   └─ 计算 base：leak_addr - libc.sym['puts']\n\nStep 4: 写 pwntools 模板（本地 process）\n   ├─ context.binary = ELF('.\u002Fvuln')\n   ├─ p = process('.\u002Fvuln')  \u002F  p = gdb.debug('.\u002Fvuln','b *main+xx')\n   ├─ payload = cyclic(N) + p64(ret) + ...\n   └─ p.interactive()\n\nStep 5: 本地通\n   ├─ 反复 attach + 看寄存器 + 调 offset\n   ├─ 用 pwndbg\u002FGEF 的 vmmap \u002F heap \u002F bins \u002F telescope\n   └─ 跑通后切 remote()\n\nStep 6: 远程稳定化\n   ├─ libc 偏移：用 leak 反查 libc-database，不要拍脑袋\n   ├─ 栈对齐：16-byte 不对齐 → movaps 崩 → 加一个 ret gadget\n   ├─ 远程网络延迟 → recvuntil 精确锚字符串，禁用模糊 sleep\n   ├─ 远程缓冲：sendlineafter 比 sendline 更稳\n   ├─ 堆喷成功率：放大 spray 数量 + 留 padding chunk 防合并\n   └─ 多次跑：写 while True 验证成功率 ≥ 95%\n```\n\n## 典型场景\n\n### 场景 1：远程 64 位二进制 (NX+PIE+canary, 给了 libc)\n\n```text\n已有：.\u002Fvuln（64-bit ELF, NX, PIE, canary）+ .\u002Flibc.so.6 + nc host port\n漏洞：read(buf, 0x200) 但 buf 只有 0x40 字节 → 栈溢出\n保护：canary 拦住，PIE 让 .text 随机化\n\n策略：\n1. 先 leak canary（栈\u002F格式化字符串\u002F部分读）\n2. 再 leak 一个 libc 函数地址（puts@got）\n3. 用 libc.address = leaked - libc.sym['puts'] 算 libc base\n4. one_gadget .\u002Flibc.so.6 选一个约束能满足的 magic gadget\n5. payload = padding + canary + saved_rbp + (pop_rdi + bin_sh + system) 或直接 one_gadget\n6. 加一个 ret gadget 修栈对齐（关键！）\n```\n\n完整模板参见 `references\u002Fstack-pwn.md`。\n\n### 场景 2：Linux 内核驱动 ioctl 越界写 → 拿 root\n\n```text\n已有：vmlinux + bzImage + initramfs.cpio.gz + 自定义 vuln.ko\n漏洞：ioctl(0x1337, ptr) 里 copy_from_user 长度可控 → kernel heap overflow (kmalloc-64 slab)\n保护：SMEP, SMAP, KASLR, KPTI\n\n策略：\n1. 改 init 脚本拿到 root shell（CTF）或先 leak KASLR base 再继续（真实）\n2. 通过 \u002Fproc\u002Fkallsyms（可能限权）或未初始化堆喷 leak 内核基址\n3. 在 kmalloc-64 slab 里喷 tty_struct \u002F msg_msg \u002F pipe_buffer\n4. 覆盖 vtable 指针指向用户态 → 不行（SMEP），改走 stack pivot + 内核 ROP\n5. ROP 链：prepare_kernel_cred(0) → commit_creds → swapgs+iretq → 用户态 execve(\"\u002Fbin\u002Fsh\")\n6. 或更省事：覆盖 modprobe_path 为 \"\u002Ftmp\u002Fx\"，写一个 \u002Ftmp\u002Fx，然后触发 modprobe\n```\n\n完整模板参见 `references\u002Fkernel-pwn.md`。\n\n## 按需自举 (On-Demand Bootstrap)\n\n### 工具依赖\n\n| 工具 | 用途 | 安装方式 |\n|------|------|---------|\n| pwntools | exploit 编写框架 | `pip install pwntools` |\n| GEF | gdb 增强（推荐内核 + 用户态） | `git clone https:\u002F\u002Fgithub.com\u002Fbata24\u002Fgef` (fork 维护活跃) |\n| pwndbg | gdb 增强（堆调试体验最好） | `git clone https:\u002F\u002Fgithub.com\u002Fpwndbg\u002Fpwndbg && .\u002Fsetup.sh` |\n| ROPgadget | gadget 搜索 | `pip install ropgadget` |\n| Ropper | gadget 搜索（备选，支持架构多） | `pip install ropper` |\n| one_gadget | libc magic gadget 查找 | `gem install one_gadget`（需 ruby） |\n| libc-database | libc 指纹反查 | `git clone https:\u002F\u002Fgithub.com\u002Fniklasb\u002Flibc-database && .\u002Fget` |\n| qemu-system-x86_64 | 内核题调试 | `apt install qemu-system-x86` |\n| binwalk \u002F cpio | initramfs 拆包 | `apt install binwalk cpio` |\n| patchelf | 切换 libc 版本 | `apt install patchelf` |\n\n### Bootstrap 检查脚本\n\n```bash\n# 一键检查 + 安装核心工具\nfor t in pwntools ropgadget ropper; do\n  pip show $t >\u002Fdev\u002Fnull 2>&1 || pip install $t\ndone\n\ncommand -v one_gadget >\u002Fdev\u002Fnull || gem install one_gadget\n\n[ -d ~\u002Ftools\u002Flibc-database ] || git clone https:\u002F\u002Fgithub.com\u002Fniklasb\u002Flibc-database ~\u002Ftools\u002Flibc-database\n[ -d ~\u002Ftools\u002Flibc-database\u002Fdb ] || (cd ~\u002Ftools\u002Flibc-database && .\u002Fget ubuntu debian)\n\n[ -d ~\u002Ftools\u002Fpwndbg ] || (git clone https:\u002F\u002Fgithub.com\u002Fpwndbg\u002Fpwndbg ~\u002Ftools\u002Fpwndbg && cd ~\u002Ftools\u002Fpwndbg && .\u002Fsetup.sh)\n```\n\n### 同一工具自动安装失败 2 次后\n\n停止重试，输出结构化手动安装步骤（pip 源 \u002F gem 源 \u002F git 国内镜像 \u002F apt 源）让用户确认。\n\n## 路由上下文\n\n**上游入口**: `skills\u002FSKILL.md`（总控）、`routing.md`\n**触发条件**: 有二进制 + 已识别漏洞点，需要写 exploit\n\n**上游 skill（先用它们再回到本 skill）**:\n- 还没看懂二进制在干什么 → `reverse-engineering\u002F`\n- 需要静态详细分析 → `ida-reverse\u002F`\n- 快速侦察确认架构\u002F保护机制 → `radare2\u002F`\n\n**下游 skill（拿到 shell 之后）**:\n- 整合进完整攻击链（横向、提权、持久化）→ `attack-chain\u002F`\n\n**子模块导航**:\n- 栈类利用（ret2libc \u002F ret2csu \u002F one_gadget \u002F 栈对齐）→ `references\u002Fstack-pwn.md`\n- 堆类利用（tcache \u002F fastbin \u002F unsorted \u002F large bin \u002F FILE struct）→ `references\u002Fheap-pwn.md`\n- 内核 pwn（kROP \u002F SMEP-SMAP 绕过 \u002F KASLR leak \u002F modprobe_path）→ `references\u002Fkernel-pwn.md`\n\n## 注意事项\n\n- **不要在本地跑通就交差** — 本地 libc \u002F ASLR \u002F 网络环境都和远程不同，必须在 remote 模式下连续跑 20 次以上验证稳定性\n- **libc 版本必须确认** — 用 leak + libc-database 反查，不要假设是 Ubuntu 22.04 默认 libc\n- **栈对齐是 64 位的常见坑** — `movaps xmm0, [rsp]` 在 rsp 未 16 字节对齐时段错误，加一个空 `ret` gadget 解决\n- **堆利用对 glibc 版本极敏感** — tcache 在 2.27 引入，safe-linking 在 2.32 引入，2.34 移除 hooks，每个版本利用路径不同\n- **内核 pwn 必须先确认 cpu 标志** — qemu 启动参数里有没有 +smep +smap +pku 直接决定 ROP 链怎么写\n- **KASLR leak 一次就够** — 拿到一个内核地址后所有地址都算偏移，不要反复 leak\n\n## 任务完成自检（声称完成前 MUST 通过）\n\n- [ ] 我是否执行了工作流中的每一步（而不是只阅读）？\n- [ ] 我是否基于 `tool-index` 使用了真实工具路径？\n- [ ] 我是否产出了可复现证据（命令\u002F脚本\u002F截图\u002F报告）？\n- [ ] 我是否完成并回写了 RULES 要求的 Checklist 项？\n\n## Limitations\n\n- Exploit development only on systems you are authorized to attack.\n- Mitigations (full RELRO, CFI, MTE) raise difficulty substantially.\n\n> Adapted from [zhaoxuya520\u002Freverse-skill](https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill) (MIT).\n",{"name":5,"risk":43,"source":44,"license":14,"date_added":45,"description":7,"source_repo":46,"source_type":20,"license_source":47},"offensive","https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill","2026-08-25","zhaoxuya520\u002Freverse-skill","https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill\u002Fblob\u002Fmain\u002FLICENSE","f3312ba749561b6159f477dbfc9313c875d40a56",".agents\u002Fskills_archive\u002Fpwn-chain","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612","2026-10-25 23:50:58",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill pwn-chain",{"tool":59,"command":60},"bunx","bunx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill pwn-chain",{"tool":62,"command":63},"pnpm","pnpm dlx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill pwn-chain","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fpwn-chain\u002FSKILL.md",true,[67,73,77],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fheap-pwn.md","REFERENCE","参考文档",9193,"https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fpwn-chain\u002Freferences\u002Fheap-pwn.md",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fkernel-pwn.md",12241,"https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fpwn-chain\u002Freferences\u002Fkernel-pwn.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fstack-pwn.md",8823,"https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fpwn-chain\u002Freferences\u002Fstack-pwn.md",[82,106,130,152,169,189],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":38},"01M6Q0FA5FZ410Z33Z3TFQ4DBA","zero-trust","Implement zero-trust network architecture. Configure identity-based access, micro-segmentation, and continuous verification. Use when implementing modern security architectures.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzero-trust\u002FSKILL.md",[],[89,90,91,92,93,94,84,95,96,97,98,99,20,27,100,101,102,103,104,105],"ZeRO","trust","zero trust","architecture","assessment","verification","segmentation","devops-security","access","configure","only","active","critical","scope","scripts","relevant","implementing",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":38},"01M6Q0F1YZJW3KX5FBKEVZ8CV4","zcode-delegate","Delegate coding tasks to the Z.AI ZCode CLI only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzcode-delegate\u002FSKILL.md",[],[113,114,115,116,117,118,119,120,121,122,123,124,125,99,126,20,127,128,101,129],"delegate","zcode","zcode delegate","review","cli","orchestration","tasks","run","Bash","model","node","read","orchestrator","files","desktop app","app","agent-orchestration",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":38},"01M6Q0ETK41VGNMYEXW0T00AJN","youtube-transcript","Fetch YouTube transcripts through DeepAPI or local fallback tooling and save clean text output.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript\u002FSKILL.md",[],[137,138,139,140,37,141,142,33,32,143,144,145,146,20,27,147,148,149,150,151],"transcript","youtube transcript","youtube","safe","codex","research","text","fetch","tooling","clean","local","output","deepapi","youtube transcripts","blob",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":38},"01M6Q0EPPH2PVMDW40017F8WX0","youtube-transcript-skills","Fetch YouTube video transcripts, search videos\u002Fchannels, browse channels, and extract playlists via the getyoutubetranscript.com API - free tier, no card required.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript-skills\u002FSKILL.md",[],[137,138,139,159,140,160,37,141,33,161,162,163,164,144,165,20,27,166,167,168],"youtube transcript skills","gemini","search","api","Video","browse","api-integration","free","card","channels",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":38},"01M6Q0EAB96PX83W5PTE8A0R8D","youtube-notetaker","Turn YouTube talks into local study notes with slides, transcripts, editable annotations, and a markdown-backed viewer.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-notetaker\u002FSKILL.md",[],[139,176,177,117,140,178,179,180,181,33,163,182,183,184,185,27,186,147,187,188],"youtube notetaker","notetaker","workflow","official","notes","code","markdown","slides","annotations","README","study","dair-academy","viewer",{"skillNo":190,"name":191,"nameZh":6,"description":192,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":193,"categories":194,"keywords":195,"publishedAt":38},"01M6Q0E55F0GW5MX48V8HXS8B5","youtube-full","Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-full\u002FSKILL.md",[],[196,139,197,198,140,160,161,199,200,162,163,164,144,201,165,20,27,166,202,150],"youtube full","full","google","server","dlp","credits","automatic"]