Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ctf-rev

БесплатноЗапускает вложенные скриптыНе проверен

Use when the user says reverse engineering, decompile, crackme, keygen, find the key/password/serial, obfuscated binary, packed binary, stripped binary…

jiayaoqijiaот jiayaoqijia★ 81 звезда на GitHub

Об этом скилле

ctf-rev — reverse engineering

Sibling skills: ctf (workspace, flags, submission), ctf-pwn (exploitation once you understand the binary). This skill owns understanding the binary.

Untrusted artifact rule (from router, always in force): analyze statically first; execute challenge binaries only under podman or with explicit user approval.

Triage (first 5 minutes)

cd work/<event>/rev-<name>
scripts/ctf python  # venv ready
bash ../../../../skills/ctf-rev/scripts/strings-plus.sh dist/binary | tee triage.txt
file dist/binary

Decision table — pick the row, read the matching reference:

Signal Likely path Reference
UPX! in strings / high entropy + few strings upx -d, then re-triage references/workflow.md
High entropy, no UPX magic, section names like UPX0/random custom packer → run to OEP, dump references/antidebug.md
Go build ID / go:buildid, runtime.main Go symbol recovery references/languages.md
Rust panic strings (src/main.rs, core::panicking) Rust: panic strings reveal logic references/languages.md
.jar / META-INF/MANIFEST.MF jadx references/languages.md
.dll/.exe + mscoree/_CorExeMain .NET → ilspycmd references/languages.md
python3x.dll, MEI prefix PyInstaller → pyinstxtractor-ng references/languages.md
META-INF/, asar, pkg prelude Electron/Node unpack references/languages.md
ELF, stripped, static-looking, big switch on data custom VM references/custom-vm.md
Binary crashes/exits under gdb but runs standalone anti-debug references/antidebug.md
Nothing exotic, plain C ELF static→dynamic loop references/workflow.md

Key early questions (answer all before deep diving):

  1. Architecture + static/dynamic + stripped? (readelf -h, file)
  2. Imports: libc-only C, C++ (_Z symbols, STL), Rust, Go, other?
  3. Entropy per section (packed?) — scripts/strings-plus.sh reports it.
  4. Is there a remote service attached? If yes, after understanding → ctf-pwn.

Playbook

The core loop (full detail in references/workflow.md):

static pass     strings → xrefs → decompile (Ghidra) → annotate interesting funcs
dynamic pass    run under strace/ltrace/gdb (podman if untrusted), break on the
                funcs found statically, watch data flow, patch branches in gdb
loop            each dynamic observation refines the static model
Attack Preconditions Command Reference
Full triage bundle ELF/PE file skills/ctf-rev/scripts/strings-plus.sh <bin> references/workflow.md
Decompile everything Ghidra installed GHIDRA_INSTALL_DIR=... scripts/ghidra-decompile.sh <bin> references/ghidra.md
Interactive RE Ghidra GUI ghidraRun → CodeBrowser references/ghidra.md
Find main (stripped) gdb gdb -q ./bin → starti → walk to main references/workflow.md
Trace syscalls/libs strace/ltrace installed strace -f -e trace=openat,read,write ./bin references/workflow.md
Bypass a check live know the branch gdb: set $pc / jump, patch memory references/workflow.md
Unpack UPX upx installed upx -d bin -o bin.unpacked references/languages.md
Defeat anti-debug detected the check see table in antidebug.md references/antidebug.md
De-flatten obfuscation angr installed symbolic exec around the flattening dispatcher references/antidebug.md
Emulate foreign arch qemu-user installed qemu-x86_64 -g 1234 ./bin + gdb remote references/antidebug.md
Reverse custom VM found dispatch loop map opcodes → write emulator references/custom-vm.md

When to give up on static and go dynamic (heuristics):

  • Decompiled output is >60% nonsense or huge flattening switch → dynamic first.
  • Packed/self-modifying: static is meaningless until you dump post-decode memory.
  • You've annotated >10 functions without finding the check → ltrace/gdb the string compare / read path directly.
  • The binary phones home or requires env/files → strace shows what it wants.

Found the flag format string or check? Follow router ctf for flag logging; found a memory-safety bug you must exploit? Switch to ctf-pwn.

References

  • references/workflow.md — the static→dynamic loop: triage signals, finding main in stripped ELFs, decompile-first method, note-taking, gdb patching.
  • references/ghidra.md — install, GUI + headless workflow, the decompile-everything recipe, structures, version tracking.
  • references/languages.md — per-language recovery table: C/C++/Rust/Go/.NET/ Java/Python/Node/UPX/misc runtimes.
  • references/antidebug.md — ptrace/timing/int3 checks, packers, control-flow flattening, qemu-user emulation, unicorn for custom VMs.
  • references/custom-vm.md — bytecode dispatch recognition, opcode mapping, Python emulator skeleton, encodings.

Toolbox

Tool Install Purpose
Полный SKILL.md на GitHub

Установить ctf-rev в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

SOURCE.mdTRUST.auto.yamlreferences/antidebug.mdreferences/custom-vm.mdreferences/ghidra.mdreferences/languages.mdreferences/workflow.mdscripts/ghidra-decompile.shscripts/ghidra_dump.pyscripts/strings-plus.sh

FAQ

Что делает скилл ctf-rev?

Use when the user says reverse engineering, decompile, crackme, keygen, find the key/password/serial, obfuscated binary, packed binary, stripped binary, custom VM, bytecode, "what does this binary do", .jar/.apk/.NET/PyInstaller/unpack me, anti-debug, or hands over a binary with no remote service and asks for the flag. Static and dynamic RE: triage the binary, pick the language/packing path, decompile with Ghidra, defeat anti-debug, emulate custom VMs.

Как установить скилл ctf-rev?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ctf-rev запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить ctf-rev с