ctf-rev
Skill26 starsChanged 32 days agoMITView on GitHub
CTF reversing speed-run — crack flag-check binaries fast: locate the check via strings/xrefs, bypass anti-debug and obfuscation, and solve constraint-checkers with z3 instead of manual algebra. Load when the handout is an ELF/PE/exe that asks for input or a key. Signals: "rev" category, "Enter the flag/key/password", correct/wrong messages, crackme, packed binary, anti-debug (ptrace, IsDebuggerPresent), keygen challenge.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- NoorQureshi/roninword for word, first seen Oct 11, 2026
- NoorQureshi/security-skillsword for word, first seen Oct 11, 2026
Other versions2 projects use a version of this.
Word for word · 2
- NoorQureshi/security-skills★ 27100% same
- NoorQureshi/ronin★ 26100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository207 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ad-adcsSkill
- ad-dacl-abuseSkill
- ad-delegation-abuseSkill
- ad-kerberoastingSkill
- ad-pivot-arsenalSkill
- ai-agent-tool-abuseSkill
- ai-insecure-output-handlingSkill
- ai-jailbreakSkill
- ai-llm-dosSkill
- ai-mcp-securitySkill
- ai-model-extractionSkill
- ai-prompt-injectionSkill
- ai-rag-poisoningSkill
- ai-sensitive-data-disclosureSkill
- ai-supply-chainSkill
- ai-system-prompt-leakageSkill
- api-auth-attacksSkill
- api-bolaSkill
- api-fuzzingSkill
- api-graphqlSkill
- api-grpcSkill
- api-mass-assignmentSkill
- api-mongo-agg-facet-bypassSkill
- api-testing-checklistSkill
- api-versioningSkill
- automation-browserSkill
- automation-nuclei-templatesSkill
- automation-recon-pipelineSkill
- cloud-azureSkill
- cloud-container-escapeSkill
- cloud-docker-api-abuseSkill
- cloud-docker-registrySkill
- cloud-gcpSkill
- cloud-iam-privescSkill
- cloud-imds-ssrfSkill
- cloud-kubernetesSkill
- cloud-s3-exposureSkill
- code-review-cicdSkill
- code-review-cppSkill
- code-review-dangerous-sinksSkill
- code-review-dotnetSkill
- code-review-goSkill
- code-review-iacSkill
- code-review-javaSkill
- code-review-methodologySkill
- code-review-nodejsSkill
- code-review-phpSkill
- code-review-pythonSkill
- code-review-rubySkill
- code-review-rustSkill
- code-review-secrets-detectionSkill
- code-review-soliditySkill
- crypto-oracle-attacksSkill
- crypto-rsa-attacksSkill
- ctf-cryptoSkill
- ctf-forensicsSkill
- ctf-methodologySkill
- ctf-pwnSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 60
Solve the check with z3 — the CTF superpower: When the check transforms input bytes and compares against constants …
- Very specific: line 72
Use BitVec (not Int) so overflow wraps like machine arithmetic.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CTF reverse engineering speed-run
When it applies
The handout is a binary that checks something — a flag, key, serial, or password — and you need
the accepted input. This skill is the CTF workflow: find the check fast, defang whatever stops
you from seeing it, and solve the constraints mechanically. For deep tool use defer to
reverse-eng-binary-triage (first-pass recon), reverse-eng-radare2 / reverse-eng-ghidra /
reverse-eng-ida (analysis), reverse-eng-deobfuscation (unpacking/devirtualization).
Why it works
A flag-checker is a pure function from input to accept/reject, and CTF ones are small. You never need to understand the whole binary — only the check — so the game is locating it (strings and xrefs beat linear reading), exposing it (anti-debug and packing are thin in CTF), and solving it (the constraints are almost always z3-shaped; manual algebra is the slow path).
Method
- Two-minute triage.
file,strings -n 6(+strings -elfor UTF-16),checksec, run it with junk input. The strings that matter: "Correct!"/"Wrong", the flag format itself (sometimes just… present), odd alphabets, and packer markers (UPX!). Packed →upx -dfirst; anything fancier →reverse-eng-deobfuscation. .NET/Java/Go/Rust/Python-exe binaries route to their dedicated tooling (reverse-eng-dotnet,reverse-eng-go-rust, pyinstxtractor+uncompyle). - Locate the check, don't read the binary. In r2/Ghidra/IDA: find the "Wrong" string, follow the xref to its function, and read backwards from the branch that prints it. Everything between the input read and that branch is the check. For C/C++ this is usually one function.
- Dynamic shortcuts before static grinding.
ltrace ./chall— library calls likestrcmp(input, "..."),strlen, per-char compares leak the answer or its length with zero analysis.- Compare-per-character binaries → count crashes/coverage: flip one input byte at a time and watch which comparison index changes, or use a debugger on the compare loop to read each expected byte as it's checked.
stracefor flag files, env vars, network the binary secretly consults.
- Defang anti-debug (it's shallow in CTF). Common tricks and one-line counters:
ptrace(PTRACE_TRACEME)→ patch the call, orcatch syscall ptracein gdb and force return 0.IsDebuggerPresent/PEB.BeingDebugged→ zero the flag in the debugger, or patch the conditional jump that follows.- Timing checks (
rdtsc) → patch or ignore — they only guard a branch. - Self-checksum / anti-tamper → make all your patches before the checksum computes, or patch the comparison result, not the data. The universal move: find the check that branches on the anti-debug result and flip that one branch — don't fight each mechanism.
- Solve the check with z3 — the CTF superpower. When the check transforms input bytes and
compares against constants (xor/add/rotate/substitute chains, matrix math, per-position
relations), transcribe the decompiled pseudocode into z3 almost verbatim:
Usefrom z3 import * flag = [BitVec(f'c{i}', 8) for i in range(32)] s = Solver() # constraints copied from the decompilation, e.g.: s.add((flag[i] ^ 0x37) + i & 0xff == target[i]) s.add(And(*[And(0x20 <= c, c < 0x7f) for c in flag])) # printable s.check(); m = s.model(); print(bytes(m[c].as_long() for c in flag))BitVec(notInt) so overflow wraps like machine arithmetic. If the decompile is messy, feed the whole function to angr (angrwithfind=<success addr>, avoid=<fail addr>) and let it symbolically execute to the answer. - Know the recurring shapes. Flag = input satisfying equations (z3); keygen (invert the
serial transform, then generate any valid one); VM challenges (small custom bytecode — write a
30-line disassembler for the handlers, the flag falls out); wasm (wasm2c/wabt, then same game);
mobile crackmes (
mobile-apk-reverse).
Gotchas
- The first "Correct" string can be a decoy — verify your answer actually prints success on the real binary; some challenges have fake success paths guarding the real check.
- Anti-debug that crashes you is the solve path — if debugging changes behavior, run under the debugger anyway and note where; the flag transformation sometimes only happens under ptrace.
- BitVec vs Int — z3
Intdoesn't wrap; forgetting& 0xffsemantics makes solvers returnunsaton trivially solvable checks. - Multiple valid flags — constraint checks can accept many inputs; the scoreboard wants the
one in flag format, so add
flag{-prefix constraints when known. - Don't statically invert what you can dynamically read — a
strcmpin ltrace beats an hour of decompilation; try dynamic first, always. - Stripped/optimized binaries mislead decompilers — check the disassembly when pseudocode
looks impossible (
reverse-eng-binary-triagefor triage discipline).
Verify success
The recovered input, entered into the original unmodified binary, produces the success path — and matches the event flag format. For keygens, two independently generated keys both validate.
References
Triage: reverse-eng-binary-triage; deep analysis: reverse-eng-ghidra, reverse-eng-ida,
reverse-eng-radare2; unpacking/anti-analysis: reverse-eng-deobfuscation; z3 docs; angr.
Triage via ctf-methodology.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

