Logo: Symbolic Execution Tools

Symbolic Execution Tools

Communautéit
ptn1411
symbolic-execution-tools

Symbolesch Ausféierung a Constraint Solving mat angr, Z3, Unicorn a Qiling. Aktivéiert dëse Skill, wann d'Lizenzlogik, Crackmes oder Input-Puzzele fir VMs eng automatiséiert Exploratioun vu Codepfaden an d'Synthes vun Inpute verlaangen.

Add to TypingMind

Iwwersiicht

Editeurptn1411
Repositoryskill
Skill-Nummsymbolic-execution-tools
Stären
275
Forks
133
Matgeliwwert Dateien
3
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 3 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    ptn1411 huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Symbolic Execution Tools an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/ptn1411/skill/tree/main/symbolic-execution-tools
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-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 nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Symbolic Execution Tools an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Symbolic Execution Tools automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Symbolic Execution Tools net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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).

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Symbolic Execution Tools?

Symbolesch Ausféierung a Constraint Solving mat angr, Z3, Unicorn a Qiling. Aktivéiert dëse Skill, wann d'Lizenzlogik, Crackmes oder Input-Puzzele fir VMs eng automatiséiert Exploratioun vu Codepfaden an d'Synthes vun Inpute verlaangen.

Firwat Symbolic Execution Tools op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Symbolic Execution Tools besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Symbolic Execution Tools an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/ptn1411/skill/tree/main/symbolic-execution-tools an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Symbolic Execution Tools benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Symbolic Execution Tools benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Symbolic Execution Tools domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Symbolic Execution Tools gratis?

ptn1411 huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇