[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ED85YYKXBYX8BD4PSAHDBC":3,"skill-same:01M7ED85YYKXBYX8BD4PSAHDBC":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M7ED85YYKXBYX8BD4PSAHDBC","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.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F03-逆向工程\u002Fpwn-chain\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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":24,"source":25,"license":15,"date_added":26,"description":7,"source_repo":27,"source_type":28,"license_source":29},"offensive","https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill","2026-08-25","zhaoxuya520\u002Freverse-skill","community","https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill\u002Fblob\u002Fmain\u002FLICENSE","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","03-逆向工程\u002Fpwn-chain",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill pwn-chain",{"tool":44,"command":45},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill pwn-chain",{"tool":47,"command":48},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill pwn-chain","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F03-逆向工程\u002Fpwn-chain\u002FSKILL.md",true,[52,58,62],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fheap-pwn.md","REFERENCE","参考文档",9193,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F03-逆向工程\u002Fpwn-chain\u002Freferences\u002Fheap-pwn.md",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fkernel-pwn.md",12241,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F03-逆向工程\u002Fpwn-chain\u002Freferences\u002Fkernel-pwn.md",{"path":63,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fstack-pwn.md",8823,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F03-逆向工程\u002Fpwn-chain\u002Freferences\u002Fstack-pwn.md",[67,75,80,87,94,101],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":74},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":76,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":74},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":74},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":74},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":74},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":74},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]