symbolic-execution-tools

Recover CTF reversing inputs using angr, Z3, and Unicorn emulation.

2|Updated May 15, 2026
One-click install
npx skills add https://github.com/lNwNl/Methodos --skill symbolic-execution-tools-lnwnl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: symbolic-execution-tools
Source: https://github.com/lNwNl/Methodos/tree/main/docker/opencode/skills/symbolic-execution-tools
Command: npx skills add https://github.com/lNwNl/Methodos --skill symbolic-execution-tools-lnwnl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you recover correct inputs or bypass checks in CTF/reversing binaries by turning program behavior into solvable constraints and controllable execution traces.

Core Features & Use Cases

  • Angr symbolic execution playbook: Set up entry/blank/full-init states, model symbolic stdin/argv/files/buffers, and drive explore(find=..., avoid=...) to reach success conditions.
  • Z3 constraint modeling and solving: Encode key/flag rules, XOR/linear/modular relations, and extract models to recover exact bytes.
  • Unicorn emulation acceleration: Emulate specific code regions or decryption routines quickly and inspect register/memory outcomes.
  • Practical failure-mode guidance: Hook problematic libc/utility functions with SimProcedures, constrain inputs to reduce path explosion, and avoid common hangs/incorrect initialization issues.

Use Case: Recover a flag by modeling scanf-read bytes as printable constraints, exploring for the branch that prints "Correct", and extracting the satisfying symbolic buffer once found.

Quick Start

Use it to produce a working angr script that targets your binary’s success output, constrains your symbolic input appropriately, and prints the recovered bytes as the final solution.

Frequently Asked Questions about symbolic-execution-tools

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use angr to solve CTF reversing challenges?

Use angr symbolic execution to model program inputs and explore execution paths. Set up state initialization, drive `explore(find=..., avoid=...)` to reach success branches, and extract the satisfying input buffer to recover the flag.

What is the best way to encode Z3 constraints for binary reversing?

Encode key and flag rules into Z3 constraints by defining XOR, linear, and modular relations. Apply claripy to model the symbolic bytes, invoke the solver, and extract the resulting model to recover exact input values.

Why does angr path explosion happen and how can I avoid it?

Path explosion in angr happens when excessive states branch uncontrollably. Avoid it by constraining symbolic inputs tightly, applying function hooking via SimProcedures for problematic libc functions, and using Unicorn emulation for specific code regions.

How do I hook libc functions in angr to prevent hangs?

Hook problematic libc functions in angr by replacing them with SimProcedures. This prevents mis-modeling and execution hangs by summarizing complex library behavior, allowing symbolic execution to continue past obstacles efficiently.

Can I use Unicorn emulation to accelerate binary decryption routines?

Yes, use Unicorn emulation to emulate specific code regions or decryption routines quickly. This allows you to bypass slow symbolic execution and directly inspect register and memory outcomes for targeted binary reversing tasks.

When do I need symbolic execution versus emulation for CTF solving?

Use symbolic execution to find correct inputs across unknown branches, and use emulation to quickly trace specific decryption routines. Combine both to recover keys, bypass checks, and handle common CTF obstacles like path explosion.