Ctf Pwn logo

Ctf Pwn

OrganizationPopular
wgpsec
ctf-pwn

CTF 二进制漏洞利用(Pwn)技术。当挑战提供 ELF/PE 可执行文件并开放 nc 端口、存在栈溢出/堆溢出/格式化字符串/UAF 漏洞时使用。覆盖 ROP 链构造、堆利用(tcache/House of Orange/Spirit)、内核利用、seccomp 沙箱逃逸、pwntools 自动化利用脚本编写

Overview

Publisherwgpsec
RepositoryAboutSecurity
Skill namectf-pwn
Stars
1.8K
Forks
247
Bundled files
22
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 22 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wgpsec on GitHub. Read the source before you install it.

Installation

Install the Ctf Pwn AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/wgpsec/AboutSecurity/tree/master/skills/ctf/ctf-pwn
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wgpsec/AboutSecurity.git /tmp/AboutSecurity
mkdir -p .claude/skills
cp -r /tmp/AboutSecurity/skills/ctf/ctf-pwn .claude/skills/ctf-pwn
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ctf Pwn in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ctf Pwn on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ctf Pwn is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

CTF 二进制漏洞利用 (Pwn)

深入参考

以下参考资料按漏洞类型组织,按需加载:

漏洞类型skill 引用
栈溢出 / ret2win / Canary绕过references/stack-overflow.md
格式化字符串 / 泄漏 / GOT覆写 / Blind Pwnreferences/format-string.md
堆(UAF/double free/tcache/House of X)references/heap-exploitation.md
ROP(ret2csu/ret2libc/SROP/seccomp绕过/RETF)references/rop-techniques.md
内核堆喷 / tty_struct / userfaultfd / modprobe_pathreferences/kernel-exploitation.md
KASLR / KPTI / SMEP / SMAP / FGKASLR 绕过references/kernel-bypass.md
自定义VM / JIT / 类型混淆 / FSOP / Windows / ARMreferences/advanced-pwn.md
Python沙箱 / FUSE / Busybox / 受限Shellreferences/sandbox-escape.md
栈溢出基础 / 结构体覆写 / 有符号整数 / Canaryreferences/overflow-basics.md
ROP链构造 / ret2csu / XOR编码 / shellcodereferences/rop-and-shellcode.md
高级ROP / 双栈迁移 / UTF-8 SROP / RETF绕seccompreferences/rop-advanced.md
堆技术(House of Apple2/Einherjar/自定义分配器)references/heap-techniques.md
堆FILE结构(fastbin→stdout/vtable劫持/glibc 2.24+)references/heap-fsop.md
内核基础(环境/堆喷结构/栈溢出/提权原语)references/kernel.md
内核技术(tty_struct/userfaultfd/SLUB/Panic泄漏)references/kernel-techniques.md
高级利用2(字节码/io_uring/整数截断/GC)references/advanced-exploits-2.md
高级利用3(栈变量重叠/1字节溢出/GOT覆写)references/advanced-exploits-3.md
高级利用4(Windows SEH/ARM Thumb/Forth/GF(2))references/advanced-exploits-4.md
高级利用5(Chip-8模拟器/浮点Canary/Bloom Filter)references/advanced-exploits-5.md
Pwn 实战笔记(堆速查/利用备忘/常用命令)references/field-notes.md

大文件目录索引 (>300行,建议先看目录定位)

format-string.md (331行):

  • Format String Basics / Argument Retargeting / Blind Pwn / Filter Bypass / Canary+PIE Leak / __free_hook Overwrite / .rela.plt Patching / Game State / .bss Pivot / argv[0] Leak

kernel-bypass.md (421行):

  • KASLR/FGKASLR Bypass / KPTI Bypass (4 methods) / SMEP/SMAP Bypass / GDB Debug / Initramfs Workflow / Exploit Templates

kernel-exploitation.md (398行):

  • QEMU Setup / vmlinux提取 / Config Checks / Heap Spray Structures / ret2usr / kROP / modprobe_path / core_pattern / tty_struct / userfaultfd / SLUB Internals / Cross-Cache / PTE Overlap

advanced-pwn.md (591行):

  • VM Exploitation / Integer Vulnerabilities / Memory Primitives / Arbitrary R/W / FSOP+Heap / Specialized (ASAN/DNS/ELF Signing/JIT) / TLS Destructor / GF(2) Gaussian / Windows/ARM/Forth

分类决策树

Pwn 题目分析?
├─ 检查保护: checksec binary
│  ├─ PIE 关闭 → 地址固定,直接覆写 GOT/PLT
│  ├─ Partial RELRO → GOT 可写 → GOT覆写
│  ├─ Full RELRO → 需找替代目标(hooks/vtable/.fini_array)
│  ├─ NX 开启 → 不能执行栈/堆shellcode → 用 ROP
│  └─ Canary → 需泄漏或用堆/字节溢出绕过
├─ 漏洞类型
│  ├─ 栈溢出
│  │  ├─ 基础 ret2win → `stack-overflow.md`
│  │  ├─ ret2libc / ROP → `rop-techniques.md`
│  │  ├─ Canary绕过 → `stack-overflow.md` + `advanced-pwn.md`
│  │  └─ 堆叠溢出 → `advanced-pwn.md`
│  ├─ 格式化字符串
│  │  └─ `format-string.md`
│  ├─ 堆(UAF/double free/tcache)
│  │  ├─ 基础 tcache poisoning → `heap-exploitation.md`
│  │  ├─ House of X/Orange/Lore → `heap-exploitation.md` + `advanced-pwn.md`
│  │  └─ FSOP → `advanced-pwn.md`
│  ├─ 内核模块
│  │  ├─ 基础环境/提权 → `kernel-exploitation.md`
│  │  └─ 保护绕过 → `kernel-bypass.md`
│  └─ 自定义 VM / JIT / 类型混淆
│     └─ `advanced-pwn.md`
└─ 利用链
   ├─ 泄漏 → 计算libc基址 → one_gadget / system / FSOP
   ├─ ROP → ret2libc / SROP / ret2dlresolve / seccomp绕过
   └─ 堆 → House of X / tcache poisoning → __free_hook / TLS dtors

保护机制速查

保护状态影响绕过方法
PIE关闭GOT/PLT/函数地址固定直接覆写
PIE开启地址随机化泄漏 → 计算基址
RELROPartialGOT 可写GOT覆写
RELROFullGOT 只读hooks/vtable/.fini_array/FSOP
NX开启栈不可执行ROP
NX关闭栈可执行shellcode
Canary有溢出被检测泄漏/字节溢出/BRK

常见危险函数

gets() / scanf("%s") / strcpy()  → 栈溢出
printf(user_input)               → 格式化字符串
free() 后继续使用               → UAF
read(fd, buf, size)              → 堆溢出 / 栈溢出

pwntools 模板

python
from pwn import *
context.binary = elf = ELF('./binary')
libc = ELF('./libc.so.6')
p = remote('host', port)  # or process('./binary')
# 泄漏 → 计算基址 → 覆写 → getshell

竞争条件利用

bash
bash -c '{ echo "cmd1"; echo "cmd2"; sleep 1; } | nc host port'

注意事项

  • 先泄漏再攻击:几乎所有 exploit 都依赖信息泄漏,优先找泄漏点
  • one_gadget 约束检查:找到 gadget 后用 one_gadget libc.so.6 列出所有,再筛选满足约束的
  • seccomp-tools dump:必先检查 seccomp 规则,再决定绕过方案
  • pwntools corefile:崩溃后自动生成 core 文件,用 cyclic_find() 精确定位溢出偏移

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ctf Pwn AI skill do?

CTF 二进制漏洞利用(Pwn)技术。当挑战提供 ELF/PE 可执行文件并开放 nc 端口、存在栈溢出/堆溢出/格式化字符串/UAF 漏洞时使用。覆盖 ROP 链构造、堆利用(tcache/House of Orange/Spirit)、内核利用、seccomp 沙箱逃逸、pwntools 自动化利用脚本编写

Why use Ctf Pwn on TypingMind?

Because you install it once and use it with any model. Ctf Pwn is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ctf Pwn in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wgpsec/AboutSecurity/tree/master/skills/ctf/ctf-pwn. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ctf Pwn?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ctf Pwn?

As many as you like. As long as a model supports skills, you can use Ctf Pwn with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ctf Pwn AI skill free?

It is published on GitHub by wgpsec. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇