npx skills add https://github.com/ljagiello/ctf-skills --skill ctf-reverse逆向工程挑战快速参考。详细技术请参阅支持文件。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 明文 flag 提取
strings binary | grep -E "flag\{|CTF\{|pico"
strings binary | grep -iE "flag|secret|password"
rabin2 -z binary | grep -i "flag"
# 动态分析 - 通常直接捕获 flag
ltrace ./binary
strace -f -s 500 ./binary
# 十六进制转储搜索
xxd binary | grep -i flag
# 使用测试输入运行
./binary AAAA
echo "test" | ./binary
file binary # 类型,架构
checksec --file=binary # 安全特性(用于 pwn)
chmod +x binary # 设为可执行
关键洞察: 让程序计算答案,然后转储它。在最终比较处中断(b *main+OFFSET),输入任何长度正确的输入,然后使用 x/s $rsi 转储计算出的 flag。
模式: 在真实检查之前有多个虚假目标。
识别方法:
解决方案: 在最终比较处设置断点,而不是在较早的比较处。
PIE 二进制文件随机化基地址。使用相对断点:
gdb ./binary
start # 强制 PIE 基地址解析
b *main+0xca # 相对于 main
run
两种模式:
transform(flag) == stored_target - 反转变换transform(stored_target) == flag - Flag 就是变换后的数据!模式 2 解决方案: 不要反转 - 直接对存储的目标应用变换。
flag{、CTF{)^ i 或 ^ (i & 0xff))并与重复密钥分层# Radare2
r2 -d ./binary # 调试模式
aaa # 分析
afl # 列出函数
pdf @ main # 反汇编 main
# Ghidra(无头模式)
analyzeHeadless project/ tmp -import binary -postScript script.py
# IDA
ida64 binary # 在 IDA64 中打开
使用 marshal.load() + dis.dis() 反汇编。头部:8 字节(2.x)、12(3.0-3.6)、16(3.7+)。参见 languages.md。
wasm2c checker.wasm -o checker.c
gcc -O3 checker.c wasm-rt-impl.c -o checker
# WASM 修补(游戏挑战):
wasm2wat main.wasm -o main.wat # 二进制 → 文本
# 编辑 WAT:翻转比较,更改常量
wat2wasm main.wat -o patched.wasm # 文本 → 二进制
WASM 游戏修补(Tac Tic Toe, Pragyan 2026): 如果证明生成与移动质量无关,则修补 minimax(将 i64.lt_s 翻转为 i64.gt_s,更改 bestScore 符号)以使 AI 表现糟糕,同时证明保持有效。调用 /ctf-misc 获取完整的游戏修补模式(games-and-vms)。
apktool d app.apk -o decoded/ 用于资源;jadx app.apk 用于 Java 反编译。检查 decoded/res/values/strings.xml 中的 flag。参见 tools.md。
如果存在 lib/arm64-v8a/libapp.so + libflutter.so,使用 Blutter:python3 blutter.py path/to/app/lib/arm64-v8a out_dir。输出重建的 Dart 符号 + Frida 脚本。参见 tools.md。
upx -d packed -o unpacked
如果解包失败,首先检查 UPX 元数据:验证 UPX 节名称、头部字段和版本标记是否完整。如果元数据看起来被篡改或不确定,请查看 GitHub 上的 UPX 源代码以识别可能的修改点。
Tauri 将 Brotli 压缩的前端资源嵌入可执行文件中。查找 index.html 的交叉引用以定位资源索引表,转储 blob,Brotli 解压缩。参考:tauri-codegen/src/embedded_assets.rs。
常见检查:
IsDebuggerPresent() / PEB.BeingDebugged / NtQueryInformationProcess(Windows)ptrace(PTRACE_TRACEME) / /proc/self/status TracerPid(Linux)rdtsc、clock_gettime、GetTickCount)/proc/self/maps 扫描、端口 27042、内联钩子检查绕过:在检查处设置断点,修改寄存器以绕过条件。pwntools 补丁:elf.asm(elf.symbols.ptrace, 'ret') 将函数替换为立即返回。参见 patterns.md。
有关全面的反分析技术和绕过方法(30 多种方法及代码),请参阅 anti-analysis.md。
Xorshift32: 位移 13, 17, 5 Xorshift64: 位移 12, 25, 27 魔法常量: 0x2545f4914f6cdd1d、0x9e3779b97f4a7c15
executeIns 以获取操作码含义参见 patterns.md 了解虚拟机工作流、操作码表和状态机 BFS。
顺序密钥链暴力破解: 当虚拟机以小数据块(例如,3 字节 = 2^24 个候选)验证输入,且每个块的输出密钥馈送到下一个块时,使用 OpenMP 并行化顺序暴力破解每个块。使用 gcc -O3 -march=native -fopenmp 编译求解器。参见 patterns-ctf-2.md。
带有交错奇偶表的 XOR flag 检查器很常见。参见 languages.md 了解字节码分析技巧和逆向模式。
二进制文件使用 UNIX 信号作为二叉树导航;通过 LD_PRELOAD 挂钩 sigaction,通过发送信号进行 DFS。参见 patterns.md。
翻转 JNZ/JZ(0x75/0x74),更改休眠值,在 Ghidra 中修补环境检查(Ctrl+Shift+G)。参见 patterns.md。
定位方法:
objdump -s -j .rodata binary | less
# 在比较指令附近查找
# 大小与 flag 长度匹配
符号扩展和 32 位截断的陷阱。参见 patterns.md 了解详情和代码示例。
每个位置尝试每个字节(0-255),与期望输出匹配。统一变换捷径: 如果一个输入字节只改变一个输出字节,则构建 0..255 映射然后反转。参见 patterns.md 了解完整实现。
from unicorn import * -- 映射段,设置栈,挂钩以跟踪。混合模式陷阱: 64 位存根通过 retf 跳转到 32 位需要切换到 UC_MODE_32 并复制 GPRs + EFLAGS + XMM 寄存器。参见 tools.md。
嵌套的 shellcode 带有 XOR 解码循环;在 call rax 处中断,使用 set $rax=0 绕过 ptrace,从 mov 指令中提取 flag。参见 patterns.md。
验证时间随每个正确字符而变化;测量每个候选的经过时间以逐字节恢复 flag。参见 patterns.md。
使用 KeyDot 从可执行文件中提取加密密钥,然后使用 gdsdecomp 提取 .pck 包。参见 languages-platforms.md。
查询 Asset Delivery API 获取版本历史;解析 .rbxlbin 块(INST/PROP/PRNT)以跨版本差异比较脚本源代码。参见 languages-platforms.md。
模式(不良操作安全): 调试信息和文件路径泄露作者身份。
快速检查:
strings binary | grep "/home/" # 主目录路径
strings binary | grep "/Users/" # macOS 路径
file binary # 检查是否已剥离
readelf -S binary | grep debug # 调试节是否存在?
二进制文件使用运行状态每次混淆输入 2 个字节;从 .rodata 提取目标,编写逆函数。参见 patterns.md。
反汇编 serde Visitor 实现以恢复预期的 JSON 模式;按顺序的字段名揭示 flag。参见 languages-platforms.md。
二进制文件添加/减去位置索引;通过撤销每个索引的偏移量来反转。参见 patterns.md。
输入转换为十六进制,与常量比较。使用 xxd -r -p 解码。参见 patterns.md。
二进制文件在 .rodata 中具有命名符号(EMBEDDED_ZIP、ENCRYPTED_MESSAGE)→ 提取包含许可证的 ZIP,将加密消息与许可证字节进行 XOR 以恢复 flag。无需执行。参见 patterns-ctf-2.md。
二进制文件 mmap .rodata 块,XOR 反混淆,并使用它来验证输入。使用 pyelftools 重新实现验证循环以提取块。查找 0x9E3779B9、0x85EBCA6B 常量和 rol32()。参见 patterns-ctf-2.md。
二进制文件独立哈希每个前缀。通过匹配前缀哈希逐个恢复字符。参见 patterns-ctf-2.md。
模式: 二进制文件通过牛顿法收敛(例如,z^3-1=0)对坐标对进行分类。通过/失败结果的网格渲染 ASCII 艺术 flag。关键:二进制文件是分类器,而不是检查器 — 反转数学并可视化。参见 patterns-ctf.md。
静态链接、已剥离的 RISC-V ELF。使用带有 CS_MODE_RISCVC | CS_MODE_RISCV64 的 Capstone 处理混合压缩指令。使用 qemu-riscv64 模拟。注意假 flag 和带有增量密钥的 XOR 解密。参见 tools.md。
游戏二进制文件玩有界 Nim,使用 PRNG 进行必败位置移动。识别游戏框架(Grundy 值 = 堆数 % (k+1),XOR 决定位置),通过用户输入反馈跟踪 PRNG 状态演变。参见 patterns-ctf.md。
Rust 内核模块通过设备 ioctl 实现迷宫。动态枚举命令,构建带有诱饵避免的 DFS 求解器,部署为最小静态二进制文件(原始系统调用,无 libc)。参见 patterns-ctf.md。
具有 16+ 个线程通过 futex 通道通信的自定义虚拟机。跨线程边界跟踪数据流,从 GDB 提取常量,注意反转的有效性逻辑,通过 BFS 状态空间搜索解决。参见 patterns-ctf.md。
二进制文件通过矩阵乘法验证 flag,使用 64 位系数;解必须是可打印的 ASCII。在 SageMath 中使用 LLL 约简 + CVP 在约束范围内找到最近的格点。两阶段模式:阶段 1 恢复 AES 密钥,阶段 2 使用另一个线性系统(模 2^32)解密自定义虚拟机字节码。参见 patterns-ctf-2.md。
约 200+ 个自动生成的函数通过多项式比较路由输入。通过 Ghidra 无头模式脚本提取,而不是手动反转每个函数。来自已知输出格式的约束传播通过算术约束级联。参见 patterns-ctf-2.md。
JNI_OnLoad 中的 RegisterNatives 隐藏了哪个 C++ 函数处理每个 Java 本地方法(没有标准的 Java_com_pkg_Class_method 符号)。通过跟踪 JNI_OnLoad → RegisterNatives → fnPtr 找到真正的处理程序。使用来自 APK 的 x86_64 .so 以获得最佳的 Ghidra 反编译。参见 languages-platforms.md。
N 层二进制文件,其中每一层使用用户提供的密钥字节 + SHA-NI 解密下一层。使用预言机(正确密钥 → 具有预期模式的有效代码)。使用每个候选 fork 的 COW 隔离进行 JIT 执行以提高速度。参见 patterns-ctf-2.md。
模式: WebGL2 片段着色器在 256x256 RGBA 纹理(程序内存 + VRAM)上实现图灵完备虚拟机。自修改代码(STORE 操作码)修补绘图指令。GPU 并行性导致写入冲突 — 在 Python 中顺序模拟以恢复完整输出。参见 patterns-ctf-2.md。
模式: 二进制文件在 GF(2^8) 上使用 AES 多项式(0x11b)执行高斯消元法。矩阵 + 增广向量在 .rodata 中;解向量就是 flag。在反汇编中查找常量 0x1b。加法是 XOR,乘法使用多项式约简。参见 patterns-ctf-2.md。
模式: 单行 Python(2000+ 分号)带有海象运算符链,通过布尔电路将 flag 验证为大端整数。混淆的 XOR (a | b) & ~(a & b)。按分号分割,符号化翻译到 Z3,在一秒内解决。参见 patterns-ctf-2.md。
模式: 二进制文件通过每个 16 位滑动窗口位置的期望人口计数来验证输入。人口计数差异创建递推关系:bit[i+16] = bit[i] + (data[i+1] - data[i])。暴力破解约 4000-8000 个有效的初始 16 位窗口;每个窗口确定整个位序列。参见 patterns-ctf-2.md。
模式: 单个文件在 Ruby 和 Perl 中均有效,每种语言对密钥施加不同的约束。利用 =begin/=end(Ruby 块注释)与 =begin/=cut(Perl POD)在每个解释器中运行不同的代码。交集两种语言的约束以恢复唯一密钥。参见 languages-platforms.md。
模式: 用于状态机的 Verilog HDL 源代码,其隐藏条件受移位寄存器历史门控。分析 always @(posedge clk) 块和 case 语句以找到正确的输入序列。参见 languages-platforms.md。
模式: 内核模块为加密的扁平二进制文件注册 binfmt 处理程序。反转 .ko 以找到 RC4 密钥(在 movabs 立即数中),解密扁平二进制文件,从模块的 vm_mmap 调用中按固定虚拟地址导入。参见 patterns-ctf.md。
模式: 具有零可见导入的二进制文件在运行时通过符号名哈希解析 API。跳过哈希反转 — 在 Docker 中通过 LD_PRELOAD 挂钩 OpenSSL 函数以直接捕获 AES 密钥。参见 patterns-ctf.md。
模式: 损坏的节头导致分析工具崩溃,但程序头完好无损,因此二进制文件正常运行。将 e_shoff 修补为零或使用 readelf -l(仅程序头)。Flag 隐藏在损坏的节之后,带有魔法标记 + XOR。参见 patterns-ctf.md。
模式: 验证输入的 BF 程序具有 ,(读取字符)后跟 + 操作,其计数 = 期望的 ASCII 值。提取每个输入位置的增量计数以在不执行的情况下恢复期望输入。参见 languages.md。
模式: BF 输入验证器在字符正确时读取更多字节。计算每个候选的 , 操作次数 — 最高读取计数 = 正确字节。逐字符恢复。参见 languages.md。
模式: 编译的 BF 使用固定的惯用法进行相等性检查(<[-<->] +<[>-<[-]]>[-<+>])。检测解释器以检测模式并提取比较操作数(期望的 flag 字节)。参见 languages.md。
二进制文件在 GDB 中工作但在正常运行时失败(suid)?检查 ldd 是否有非标准 libc 路径,然后对可疑库与系统库进行 strings | diff 以查找注入的代码/密码。参见 patterns-ctf.md。
具有 go.buildid 的大型静态二进制文件?使用 GoReSym 恢复函数名(即使在已剥离的二进制文件上也有效)。Go 字符串是 {ptr, len} 对 — 不以空字符结尾。查找 main.main、runtime.gopanic、通道操作(runtime.chansend1/chanrecv1)。使用 Ghidra golang-loader 插件以获得
Quick reference for RE challenges. For detailed techniques, see supporting files.
# Plaintext flag extraction
strings binary | grep -E "flag\{|CTF\{|pico"
strings binary | grep -iE "flag|secret|password"
rabin2 -z binary | grep -i "flag"
# Dynamic analysis - often captures flag directly
ltrace ./binary
strace -f -s 500 ./binary
# Hex dump search
xxd binary | grep -i flag
# Run with test inputs
./binary AAAA
echo "test" | ./binary
file binary # Type, architecture
checksec --file=binary # Security features (for pwn)
chmod +x binary # Make executable
Key insight: Let the program compute the answer, then dump it. Break at final comparison (b *main+OFFSET), enter any input of correct length, then x/s $rsi to dump computed flag.
Pattern: Multiple fake targets before real check.
Identification:
Solution: Set breakpoint at FINAL comparison, not earlier ones.
PIE binaries randomize base address. Use relative breakpoints:
gdb ./binary
start # Forces PIE base resolution
b *main+0xca # Relative to main
run
Two patterns:
transform(flag) == stored_target - Reverse the transformtransform(stored_target) == flag - Flag IS the transformed data!Pattern 2 solution: Don't reverse - just apply transform to stored target.
flag{, CTF{)^ i or ^ (i & 0xff)) layered with a repeating key# Radare2
r2 -d ./binary # Debug mode
aaa # Analyze
afl # List functions
pdf @ main # Disassemble main
# Ghidra (headless)
analyzeHeadless project/ tmp -import binary -postScript script.py
# IDA
ida64 binary # Open in IDA64
Disassemble with marshal.load() + dis.dis(). Header: 8 bytes (2.x), 12 (3.0-3.6), 16 (3.7+). See languages.md.
wasm2c checker.wasm -o checker.c
gcc -O3 checker.c wasm-rt-impl.c -o checker
# WASM patching (game challenges):
wasm2wat main.wasm -o main.wat # Binary → text
# Edit WAT: flip comparisons, change constants
wat2wasm main.wat -o patched.wasm # Text → binary
WASM game patching (Tac Tic Toe, Pragyan 2026): If proof generation is independent of move quality, patch minimax (flip i64.lt_s → i64.gt_s, change bestScore sign) to make AI play badly while proofs remain valid. Invoke /ctf-misc for full game patching patterns (games-and-vms).
apktool d app.apk -o decoded/ for resources; jadx app.apk for Java decompilation. Check decoded/res/values/strings.xml for flags. See tools.md.
If lib/arm64-v8a/libapp.so + libflutter.so present, use Blutter: python3 blutter.py path/to/app/lib/arm64-v8a out_dir. Outputs reconstructed Dart symbols + Frida script. See tools.md.
upx -d packed -o unpacked
If unpacking fails, inspect UPX metadata first: verify UPX section names, header fields, and version markers are intact. If metadata looks tampered or uncertain, review UPX source on GitHub to identify likely modification points.
Tauri embeds Brotli-compressed frontend assets in the executable. Find index.html xrefs to locate asset index table, dump blobs, Brotli decompress. Reference: tauri-codegen/src/embedded_assets.rs.
Common checks:
IsDebuggerPresent() / PEB.BeingDebugged / NtQueryInformationProcess (Windows)ptrace(PTRACE_TRACEME) / /proc/self/status TracerPid (Linux)rdtsc, clock_gettime, GetTickCount)/proc/self/maps scan, port 27042, inline hook checksBypass: Set breakpoint at check, modify register to bypass conditional. pwntools patch: elf.asm(elf.symbols.ptrace, 'ret') to replace function with immediate return. See patterns.md.
For comprehensive anti-analysis techniques and bypasses (30+ methods with code), see anti-analysis.md.
Xorshift32: Shifts 13, 17, 5 Xorshift64: Shifts 12, 25, 27 Magic constants: 0x2545f4914f6cdd1d, 0x9e3779b97f4a7c15
executeIns for opcode meaningsSee patterns.md for VM workflow, opcode tables, and state machine BFS.
Sequential key-chain brute-force: When a VM validates input in small blocks (e.g., 3 bytes = 2^24 candidates) with each block's output key feeding the next, brute-force each block sequentially with OpenMP parallelization. Compile solver with gcc -O3 -march=native -fopenmp. See patterns-ctf-2.md.
XOR flag checkers with interleaved even/odd tables are common. See languages.md for bytecode analysis tips and reversing patterns.
Binary uses UNIX signals as binary tree navigation; hook sigaction via LD_PRELOAD, DFS by sending signals. See patterns.md.
Flip JNZ/JZ (0x75/0x74), change sleep values, patch environment checks in Ghidra (Ctrl+Shift+G). See patterns.md.
Locating:
objdump -s -j .rodata binary | less
# Look near comparison instructions
# Size matches flag length
Sign extension and 32-bit truncation pitfalls. See patterns.md for details and code examples.
Try each byte (0-255) per position, match against expected output. Uniform transform shortcut: if one input byte only changes one output byte, build 0..255 mapping then invert. See patterns.md for full implementation.
from unicorn import * -- map segments, set up stack, hook to trace. Mixed-mode pitfall: 64-bit stub jumping to 32-bit via retf requires switching to UC_MODE_32 and copying GPRs + EFLAGS + XMM regs. See tools.md.
Nested shellcode with XOR decode loops; break at call rax, bypass ptrace with set $rax=0, extract flag from mov instructions. See patterns.md.
Validation time varies per correct character; measure elapsed time per candidate to recover flag byte-by-byte. See patterns.md.
Use KeyDot to extract encryption key from executable, then gdsdecomp to extract .pck package. See languages-platforms.md.
Query Asset Delivery API for version history; parse .rbxlbin chunks (INST/PROP/PRNT) to diff script sources across versions. See languages-platforms.md.
Pattern (Bad Opsec): Debug info and file paths leak author identity.
Quick checks:
strings binary | grep "/home/" # Home directory paths
strings binary | grep "/Users/" # macOS paths
file binary # Check if stripped
readelf -S binary | grep debug # Debug sections present?
Binary mangles input 2 bytes at a time with running state; extract target from .rodata, write inverse function. See patterns.md.
Disassemble serde Visitor implementations to recover expected JSON schema; field names in order reveal flag. See languages-platforms.md.
Binary adds/subtracts position index; reverse by undoing per-index offset. See patterns.md.
Input converted to hex, compared against constant. Decode with xxd -r -p. See patterns.md.
Binary with named symbols (EMBEDDED_ZIP, ENCRYPTED_MESSAGE) in .rodata → extract ZIP containing license, XOR encrypted message with license bytes to recover flag. No execution needed. See patterns-ctf-2.md.
Binary mmaps .rodata blob, XOR-deobfuscates, uses it to validate input. Reimplement verification loop with pyelftools to extract blob. Look for 0x9E3779B9, 0x85EBCA6B constants and rol32(). See patterns-ctf-2.md.
Binary hashes every prefix independently. Recover one character at a time by matching prefix hashes. See patterns-ctf-2.md.
Pattern: Binary classifies coordinate pairs by Newton's method convergence (e.g., z^3-1=0). Grid of pass/fail results renders ASCII art flag. Key: the binary is a classifier, not a checker — reverse the math and visualize. See patterns-ctf.md.
Statically linked, stripped RISC-V ELF. Use Capstone with CS_MODE_RISCVC | CS_MODE_RISCV64 for mixed compressed instructions. Emulate with qemu-riscv64. Watch for fake flags and XOR decryption with incremental keys. See tools.md.
Game binary plays bounded Nim with PRNG for losing-position moves. Identify game framework (Grundy values = pile % (k+1), XOR determines position), track PRNG state evolution through user input feedback. See patterns-ctf.md.
Rust kernel module implements maze via device ioctls. Enumerate commands dynamically, build DFS solver with decoy avoidance, deploy as minimal static binary (raw syscalls, no libc). See patterns-ctf.md.
Custom VM with 16+ threads communicating via futex channels. Trace data flow across thread boundaries, extract constants from GDB, watch for inverted validity logic, solve via BFS state space search. See patterns-ctf.md.
Binary validates flag via matrix multiplication with 64-bit coefficients; solutions must be printable ASCII. Use LLL reduction + CVP in SageMath to find nearest lattice point in the constrained range. Two-phase pattern: Phase 1 recovers AES key, Phase 2 decrypts custom VM bytecode with another linear system (mod 2^32). See patterns-ctf-2.md.
~200+ auto-generated functions routing input through polynomial comparisons. Script extraction via Ghidra headless rather than reversing each function manually. Constraint propagation from known output format cascades through arithmetic constraints. See patterns-ctf-2.md.
RegisterNatives in JNI_OnLoad hides which C++ function handles each Java native method (no standard Java_com_pkg_Class_method symbol). Find the real handler by tracing JNI_OnLoad → RegisterNatives → fnPtr. Use x86_64 .so from APK for best Ghidra decompilation. See languages-platforms.md.
N-layer binary where each layer decrypts the next using user-provided key bytes + SHA-NI. Use oracle (correct key → valid code with expected pattern). JIT execution with fork-per-candidate COW isolation for speed. See patterns-ctf-2.md.
Pattern: WebGL2 fragment shader implements Turing-complete VM on a 256x256 RGBA texture (program memory + VRAM). Self-modifying code (STORE opcode) patches drawing instructions. GPU parallelism causes write conflicts — emulate sequentially in Python to recover full output. See patterns-ctf-2.md.
Pattern: Binary performs Gaussian elimination over GF(2^8) with the AES polynomial (0x11b). Matrix + augmentation vector in .rodata; solution vector is the flag. Look for constant 0x1b in disassembly. Addition is XOR, multiplication uses polynomial reduction. See patterns-ctf-2.md.
Pattern: Single-line Python (2000+ semicolons) with walrus operator chains validates flag as big-endian integer via boolean circuit. Obfuscated XOR (a | b) & ~(a & b). Split on semicolons, translate to Z3 symbolically, solve in under a second. See patterns-ctf-2.md.
Pattern: Binary validates input via expected popcount for each position of a 16-bit sliding window. Popcount differences create a recurrence: bit[i+16] = bit[i] + (data[i+1] - data[i]). Brute-force ~4000-8000 valid initial 16-bit windows; each determines the entire bit sequence. See patterns-ctf-2.md.
Pattern: Single file valid in both Ruby and Perl, each imposing different constraints on a key. Exploits =begin/=end (Ruby block comment) vs =begin/=cut (Perl POD) to run different code per interpreter. Intersect constraints from both languages to recover the unique key. See languages-platforms.md.
Pattern: Verilog HDL source for state machines with hidden conditions gated on shift register history. Analyze always @(posedge clk) blocks and case statements to find correct input sequences. See languages-platforms.md.
Pattern: Kernel module registers binfmt handler for encrypted flat binaries. Reverse the .ko to find RC4 key (in movabs immediates), decrypt the flat binary, import at the fixed virtual address from the module's vm_mmap call. See patterns-ctf.md.
Pattern: Binary with zero visible imports resolves APIs via symbol name hashing at runtime. Skip the hash reversing — hook OpenSSL functions via LD_PRELOAD in Docker to capture AES keys directly. See patterns-ctf.md.
Pattern: Corrupted section headers crash analysis tools but program headers are intact so binary runs normally. Patch e_shoff to zero or use readelf -l (program headers only). Flag hidden after corrupted sections with magic marker + XOR. See patterns-ctf.md.
Pattern: BF programs validating input have , (read char) followed by + operations whose count = expected ASCII value. Extract increment counts per input position to recover expected input without execution. See languages.md.
Pattern: BF input validators read more bytes when a character is correct. Count , operations per candidate — highest read count = correct byte. Character-by-character recovery. See languages.md.
Pattern: Compiled BF uses fixed idioms for equality checks (<[-<->] +<[>-<[-]]>[-<+>]). Instrument interpreter to detect patterns and extract comparison operands (expected flag bytes). See languages.md.
Binary works in GDB but fails when run normally (suid)? Check ldd for non-standard libc paths, then strings | diff the suspicious vs. system library to find injected code/passwords. See patterns-ctf.md.
Large static binary with go.buildid? Use GoReSym to recover function names (works even on stripped binaries). Go strings are {ptr, len} pairs — not null-terminated. Look for main.main, runtime.gopanic, channel ops (runtime.chansend1/chanrecv1). Use Ghidra golang-loader plugin for best results. See languages-compiled.md.
Pattern: Go C2 client with UUID from -ldflags -X. Binary-patch UUID bytes (same length), register with C2, enumerate clients/files via API. See languages-compiled.md.
Binary with core::panicking strings and _ZN mangled symbols? Use rustfilt for demangling. Panic messages contain source paths and line numbers — strings binary | grep "panicked" is the fastest approach. Option/Result enums use discriminant byte (0=None/Err, 1=Some/Ok). See languages-compiled.md.
Hook runtime functions without modifying binary. frida -f ./binary -l hook.js to spawn with instrumentation. Hook strcmp/memcmp to capture expected values, bypass anti-debug by replacing ptrace return value, scan memory for flag patterns, replace validation functions. See tools-dynamic.md.
Pattern: Android app validates via Firebase Cloud Functions. Post-login Frida hook constructs valid payload (UID + value + timestamp) and calls Cloud Function directly, bypassing QR/payment validation. See languages-platforms.md.
Automatic path exploration to find inputs satisfying constraints. Load binary with angr.Project, set find/avoid addresses, call simgr.explore(). Constrain input to printable ASCII and known prefix for faster solving. Hook expensive functions (crypto, I/O) to prevent path explosion. See tools-dynamic.md.
Cross-platform binary emulation with OS-level support (syscalls, filesystem). Emulate Linux/Windows/ARM/MIPS binaries on any host. No debugger artifacts — bypasses all anti-debug by default. Hook syscalls and addresses with Python API. See tools-dynamic.md.
VMProtect virtualizes code into custom bytecode. Identify VM entry (pushad-like), find handler table (large indirect jump), trace handlers dynamically. For CTF, focus on tracing operations on input rather than full devirtualization. Themida: dump at OEP with ScyllaHide + Scylla. See tools-advanced.md.
BinDiff and Diaphora compare two binaries to highlight changes. Essential when challenge provides patched/original versions. Export from IDA/Ghidra, diff to find vulnerability or hidden functionality. See tools-advanced.md.
pwndbg: context, vmmap, search -s "flag{", telescope $rsp. GEF alternative. Reverse debugging with rr record/rr replay — step backward through execution. Python scripting for brute-force and automated tracing. See tools-advanced.md.
Mach-O binaries: otool -l for load commands, class-dump for Objective-C headers. Swift: swift demangle for symbols. iOS apps: decrypt FairPlay DRM with frida-ios-dump, bypass jailbreak detection with Frida hooks. Re-sign patched binaries with codesign -f -s -. See platforms.md.
binwalk -Me firmware.bin for recursive extraction. Hardware: UART/JTAG/SPI flash for firmware dumps. Filesystems: SquashFS (unsquashfs), JFFS2, UBI. Emulate with QEMU: qemu-arm -L /usr/arm-linux-gnueabihf/ ./binary. See platforms.md.
Linux .ko: find ioctl handler via file_operations struct, trace copy_from_user/copy_to_user. Debug with QEMU+GDB (-s -S). eBPF: bpftool prog dump xlated. Windows .sys: find DriverEntry → IoCreateDevice → IRP handlers. See platforms.md.
Unreal: extract .pak with UnrealPakTool, reverse Blueprint bytecode with FModel. Unity Mono: decompile Assembly-CSharp.dll with dnSpy. Anti-cheat (EAC, BattlEye, VAC): identify system, bypass specific check. Lua games: luadec/unluac for bytecode. See platforms.md.
Swift: swift demangle symbols, protocol witness tables for dispatch, __swift5_* sections. Kotlin/JVM: coroutines compile to state machines in invokeSuspend, jadx with Kotlin mode for best decompilation. Kotlin/Native: LLVM backend, looks like C++ in disassembly. See languages-compiled.md.
Weekly Installs
697
Repository
GitHub Stars
664
First Seen
Feb 1, 2026
Security Audits
Gen Agent Trust HubWarnSocketWarnSnykWarn
Installed on
codex679
opencode677
github-copilot665
gemini-cli664
cursor662
amp659
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
103,800 周安装