ctf
Skill715 starsChanged 5 days agoMITView on GitHub
Capture-the-flag reverse engineering — find the flag efficiently
3 other projects use a version of this.
Adopted by
Most recently taken up by
- RieGan/offsec-skillstheir own version, first seen Nov 22, 2026
- zakirkun/deep-eyetheir own version, first seen Oct 8, 2026
- ajtazer/heckittheir own version, first seen Sep 11, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- zakirkun/deep-eye★ 2.3ksame name
- ajtazer/heckit★ 2same name
- RieGan/offsec-skills★ 0same name
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 repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- webpage/llms.txtllms.txt
- binja-scriptingSkill
- deobfuscationSkill
- driver-analysisSkill
- generic-reSkill
- ida-scriptingSkill
- linux-malwareSkill
- malware-analysisSkill
- modifySkill
- smart-patch-binjaSkill
- smart-patch-idaSkill
- vuln-auditSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Direct extraction: If the flag is compared byte-by-byte or XOR'd with a known key, extract both operands and compute the flag directly.
- Distinctive: line 49
Transformation reversal: If the input goes through a series of reversible transforms (XOR, rotate, shuffle, substitution), reverse each …
- Distinctive: line 55
If you find encrypted/encoded data, try to reverse the algorithm from the decompiled code
- Very specific: line 58
Check xrefs_to on comparison/validation functions to find where the flag is checked
- Distinctive: line 59
Look at string xrefs — flag-related strings often lead directly to the validation logic
- Distinctive: line 60
If stuck, check for hardcoded keys or constants near the comparison code
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Task: CTF Challenge. You are solving a capture-the-flag reverse engineering challenge. The goal is finding the flag.
Approach
Be targeted and efficient. CTF binaries are usually small, purpose-built, and contain a clear solve path. Don't over-analyze — find the check/validation function, understand the constraint, solve it.
Workflow
get_binary_info+list_functions— orient yourself, find main or entry (batch these)decompile_functionon main — identify the input path and validation logic- Trace the check function: usually a comparison, hash check, or transformation chain
- Identify the algorithm: XOR, custom cipher, hash, math constraints, maze/game, VM-based
search_stringsfor flag format strings (CTF{, flag{, HTB{, etc.)- Solve: extract the key/flag directly, reverse the transformation, or write a solver
Common Patterns
- Flag format strings visible in
list_stringsorsearch_strings - Input validation concentrated in a single function
- XOR with static key — extract key and data, XOR to get flag
- Base64 or custom encoding — identify the table, decode
- Constraint satisfaction — extract constraints, use z3 via
execute_python - Anti-debug checks (ptrace, IsDebuggerPresent) guarding the real logic — bypass or ignore
- Multi-stage: unpacking → decryption → flag check
- VM-based: custom bytecode interpreter — map opcodes, trace execution, extract constraints
Solving Strategies
Direct extraction: If the flag is compared byte-by-byte or XOR'd with a known key, extract both operands and compute the flag directly.
Constraint solving: For complex validation (many conditions, polynomial checks, matrix transforms), extract constraints and write a z3 solver:
from z3 import *
s = Solver()
flag = [BitVec(f'c{i}', 8) for i in range(N)]
# Add constraints from decompiled validation...
s.add(...)
if s.check() == sat:
m = s.model()
print(''.join(chr(m[c].as_long()) for c in flag))Transformation reversal: If the input goes through a series of reversible transforms (XOR, rotate, shuffle, substitution), reverse each step in order.
Tips
- If you find encrypted/encoded data, try to reverse the algorithm from the decompiled code
- For constraint solving, write and execute a Python script with
execute_python - Focus on the solve path — don't enumerate every function or produce threat reports
- Check
xrefs_toon comparison/validation functions to find where the flag is checked - Look at string xrefs — flag-related strings often lead directly to the validation logic
- If stuck, check for hardcoded keys or constants near the comparison code
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.

