一键导入
write-exploit
Write, test, and iterate on CTF exploit scripts. Use when you need to develop a working exploit with a test-debug-fix loop against a live target.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Write, test, and iterate on CTF exploit scripts. Use when you need to develop a working exploit with a test-debug-fix loop against a live target.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Cryptography techniques for CTF challenges. Use when attacking encryption, hashing, ZKP, signatures, or mathematical crypto problems.
Digital forensics and blockchain analysis for CTF challenges. Use when analyzing disk images, memory dumps, event logs, network captures, or cryptocurrency transactions.
Malware and network analysis techniques for CTF challenges. Use when analyzing obfuscated scripts, malicious packages, custom protocols, or C2 traffic.
Miscellaneous CTF challenge techniques. Use for trivia, automation scripts, encoding puzzles, RF/SDR signal processing, or challenges that don't fit other categories.
Open Source Intelligence techniques for CTF challenges. Use when gathering information from public sources, social media, geolocation, or identifying unknown data.
Binary exploitation (pwn) techniques for CTF challenges. Use when exploiting buffer overflows, format strings, heap vulnerabilities, race conditions, or kernel bugs.
| name | write-exploit |
| description | Write, test, and iterate on CTF exploit scripts. Use when you need to develop a working exploit with a test-debug-fix loop against a live target. |
| user-invocable | true |
| argument-hint | [target info and vulnerability description] |
| allowed-tools | ["Bash","Read","Write","Edit","Glob","Grep","Task","WebFetch","WebSearch"] |
Write exploits iteratively — run, observe, fix, repeat until the flag drops.
solve.py, flag to flag.txt#!/usr/bin/env python3
from pwn import *
context.binary = elf = ELF('./binary')
# context.log_level = 'debug'
def conn():
if args.REMOTE:
return remote('HOST', PORT)
return process('./binary')
io = conn()
# === EXPLOIT HERE ===
io.interactive()
#!/usr/bin/env python3
import requests
import sys
TARGET = sys.argv[1] if len(sys.argv) > 1 else 'http://localhost:8080'
s = requests.Session()
# === EXPLOIT HERE ===
print(f"FLAG: {flag}")
#!/usr/bin/env python3
from Crypto.Util.number import *
from pwn import *
# === GIVEN VALUES ===
# === SOLVE ===
flag = long_to_bytes(m)
print(f"FLAG: {flag.decode()}")
#!/usr/bin/env python3
from pwn import *
io = remote('HOST', PORT)
# Read until prompt
io.recvuntil(b'> ')
# Send payload
io.sendline(payload)
# Get response
response = io.recvline()
print(f"Response: {response}")
# Interactive mode for shell
io.interactive()
context.log_level = 'debug' for full pwntools trafficprint(f"[*] payload: {payload.hex()}") before sendsio.recv(timeout=2) to see unexpected outputio.can_recv() before blocking readsgdb.attach(io) for local debugging with breakpointsprint(r.status_code, r.text[:500]) after every requestp64() for little-endian, p64(val, endian='big') for bigsendline() adds \n, send() doesn't — know which the server expectssleep(0.5) between sends if server is slowret gadgetb"string" not "string"1. Write exploit → run → "Connection refused"
Fix: Check host/port, is service up?
2. Write exploit → run → "EOF in recv"
Fix: Server closed connection — payload crashed it. Check offsets.
3. Write exploit → run → wrong output
Fix: Add debug prints, check each step's output matches expectation.
4. Write exploit → run → "flag{...}"
Done! Save to flag.txt
$ARGUMENTS