Logo van Symbolic Execution Tools

Symbolic Execution Tools

Community
ptn1411
symbolic-execution-tools

Symbolische uitvoering en het oplossen van constraints met angr, Z3, Unicorn en Qiling. Activeer deze skill wanneer licentielogica, crackmes of invoerpuzzels voor VM's geautomatiseerde padverkenning en invoersynthese vereisen.

Add to TypingMind

Overzicht

Uitgeverptn1411
Repositoryskill
Skillnaamsymbolic-execution-tools
Sterren
275
Forks
133
Meegeleverde bestanden
3
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 3

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door ptn1411 op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Symbolic Execution Tools in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/ptn1411/skill/tree/main/symbolic-execution-tools
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ptn1411/skill.git /tmp/skill
mkdir -p .claude/skills
cp -r /tmp/skill/symbolic-execution-tools .claude/skills/symbolic-execution-tools
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Symbolic Execution Tools in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Symbolic Execution Tools automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Symbolic Execution Tools niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Symbolic Execution Tools

Upstream reference: yaklang/hack-skills/symbolic-execution-tools. Final user-facing summary in Vietnamese.

0. Authorization & routing

Operates under MASTER_POLICY.md §1-§2.

Sibling skillWhen
anti-debugging-techniquesSymbolically skip debugger checks instead of patching
vm-and-bytecode-reverseSolve constraints inside a recovered VM ISA
binary-protection-bypassAuto-discover leak primitives or compute ROP chains
binary-patcherApply patches once correct branch / input is known
writerpro-pentestWhen license logic is amenable to constraint solving (e.g., HWID-derived check)

1. Tool selection

Use casePickReason
Pure equation / SAT-style problemZ3Direct constraint solver, no binary needed
Single binary, modest path countangrManages states + constraints; great find=/avoid= UX
High-speed CPU emulation, no symbolicsUnicornμs/instr, ideal for unpacking and tracing
Custom VM with native handlersangr (control) + Unicorn (handler emu)Combine path exploration with raw speed
OS / syscall / firmware awareQilingFull-system emu with OS personalities
Industrial-scale concolic on real targetsTriton, KLEEDynamic taint + concolic; mature solvers

2. angr — minimum viable script (crackme template)

python
# pip install angr claripy
import angr, claripy

proj = angr.Project('./crackme', auto_load_libs=False)

# Symbolic input — 32 printable bytes
flag_len = 32
flag = claripy.BVS('flag', 8 * flag_len)

state = proj.factory.entry_state(
    args=['./crackme'],
    stdin=flag,
)
# Constrain to printable ASCII
for i in range(flag_len):
    b = flag.get_byte(i)
    state.solver.add(b >= 0x20, b <= 0x7e)

simgr = proj.factory.simgr(state)
simgr.explore(
    find=lambda s: b'Correct' in s.posix.dumps(1),     # stdout sentinel
    avoid=lambda s: b'Wrong'  in s.posix.dumps(1),
)
if simgr.found:
    sol = simgr.found[0].solver.eval(flag, cast_to=bytes)
    print('flag =', sol)
else:
    print('no solution')

3. State factories — when to use which

FactoryStarts atGood for
entry_state()binary entryMost CTF crackmes
full_init_state()with libc initWhen constructors matter
blank_state(addr=…)arbitrary addressSkip unwanted setup; reach a check directly
call_state(addr, *args)function with concrete argsPer-function analysis, e.g. just the validator

4. Hooking & SimProcedures

python
# Replace strcmp with a fast SimProcedure
import angr
proj.hook_symbol('strcmp', angr.SIM_PROCEDURES['libc']['strcmp']())

# Custom hook — return value forced to 0
@proj.hook(0x401234, length=5)        # length must equal patched insn bytes
def force_ok(state):
    state.regs.eax = 0

Use this to:

  • skip anti-debug calls (ptrace, IsDebuggerPresent)
  • model scanf, printf, malloc cleanly
  • short-circuit slow / opaque loops

5. Path-explosion taming

SymptomLever
Memory blowup at branchy loopssimgr.use_technique(angr.exploration_techniques.LoopSeer(bound=10))
Stuck in libc functionsHook them with SimProcedures (§4)
Too many parallel statesLengthLimiter(max_length=2000) or DFS()
Unhelpful states lingerexplore(num_find=1), then drop the rest
Mass irrelevant branchesBuild a CFG, restrict simgr to addresses on the path to target
Each step very slowSwitch to Unicorn-engine backend: state.options.add(angr.options.UNICORN)

6. Z3 — direct constraint examples

python
# pip install z3-solver
from z3 import *

# Toy: find 8-byte input where xor(in, key) == out
key = bytes.fromhex('aabbccdd' * 2)
out = bytes.fromhex('11223344' * 2)

s = Solver()
inp = [BitVec(f'b{i}', 8) for i in range(8)]
for i in range(8):
    s.add(inp[i] ^ key[i] == out[i])
print(s.check(), [s.model()[b].as_long() for b in inp] if s.check() == sat else '-')

Use Z3 when the binary is already reduced to a system of equations (after VM lifting, or after a manual transcription of a small validator).

7. Unicorn for fast handler emulation

python
# pip install unicorn capstone
from unicorn import Uc, UC_ARCH_X86, UC_MODE_64
mu = Uc(UC_ARCH_X86, UC_MODE_64)

CODE_BASE = 0x400000
mu.mem_map(CODE_BASE, 0x10000)
mu.mem_write(CODE_BASE, open('handler.bin','rb').read())

mu.reg_write(UC_X86_REG_RDI, 0x41424344)    # arg1
mu.emu_start(CODE_BASE, CODE_BASE + 0x80)
print(hex(mu.reg_read(UC_X86_REG_RAX)))

Pair with vm-and-bytecode-reverse: each handler is a small native blob → emulate with Unicorn, drive PC manually.

8. Qiling — when you need syscall/OS awareness

python
# pip install qiling
from qiling import Qiling
ql = Qiling(['./linux_x86_64_target'], rootfs='./rootfs/x8664_linux')
ql.os.set_api('ptrace', lambda *a, **k: 0)   # hide debugger
ql.run()

Good for malware/firmware where OS calls matter and you don't want to keep porting symbolic stubs.

9. Methodology

  1. Identify the target check function (string ref to "Wrong"/"Correct"; license error message; etc.).
  2. Decide where to start: entry_state is safest; call_state(check_func, …) when you trust the rest.
  3. Symbolize only what needs to be: keep concretes for everything else.
  4. Stub expensive externals; cap loops; pin to relevant addresses.
  5. explore(find=, avoid=); verify the recovered input on the real binary.
  6. Hand off the discovered branch / value to binary-patcher for permanent patch, or to writerpro-pentest for keygen synthesis.

10. Anti-patterns

❌✅
Run simgr.explore() with no boundsAlways set find= and avoid=, plus loop/length limiters
Symbolize the whole address spaceOnly the bytes that drive the decision
Trust default libc model on every callHook scanf/printf/malloc with SimProcedures
Re-run from entry_state for each tweakCache proj/CFG; reuse blank_state(addr=…)

11. Final report (Vietnamese)

🧮 Symbolic execution hoàn tất:
  🛠️ Công cụ      : <angr | Z3 | Unicorn | Qiling | combo>
  🎯 Hàm mục tiêu : <addr / symbol>
  🔣 Input solved : <bytes hoặc số>
  ⏱️ Thời gian    : <s>
  📂 Script       : solve.py

▶  Tiếp:
   binary-patcher (vá vĩnh viễn) hoặc writerpro-pentest (sinh keygen từ ràng buộc).

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Symbolic Execution Tools?

Symbolische uitvoering en het oplossen van constraints met angr, Z3, Unicorn en Qiling. Activeer deze skill wanneer licentielogica, crackmes of invoerpuzzels voor VM's geautomatiseerde padverkenning en invoersynthese vereisen.

Waarom Symbolic Execution Tools gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Symbolic Execution Tools bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Symbolic Execution Tools in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/ptn1411/skill/tree/main/symbolic-execution-tools. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Symbolic Execution Tools gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Symbolic Execution Tools gebruiken?

Zoveel als je wilt. Je kunt Symbolic Execution Tools gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Symbolic Execution Tools gratis?

Deze skill is door ptn1411 op GitHub gepubliceerd. Bekijk de repository voor de licentievoorwaarden. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇