Symbolic Execution Toolsのロゴ

Symbolic Execution Tools

コミュニティ
ptn1411
symbolic-execution-tools

angr、Z3、Unicorn、Qilingを使ったシンボリック実行と制約解決を行います。ライセンスのロジック、crackme、またはVMの入力パズルについて、自動的な経路探索と入力の合成が必要な場合に有効化します。

Add to TypingMind

概要

公開者ptn1411
リポジトリskill
スキル名symbolic-execution-tools
スター
275
フォーク
133
同梱ファイル
3
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    ptn1411がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Symbolic Execution Tools」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/ptn1411/skill/tree/main/symbolic-execution-tools
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでSymbolic Execution Toolsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にSymbolic Execution Toolsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Symbolic Execution Toolsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Symbolic Execution Tools」では何ができますか?

angr、Z3、Unicorn、Qilingを使ったシンボリック実行と制約解決を行います。ライセンスのロジック、crackme、またはVMの入力パズルについて、自動的な経路探索と入力の合成が必要な場合に有効化します。

TypingMindでSymbolic Execution Toolsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Symbolic Execution Toolsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにSymbolic Execution Toolsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/ptn1411/skill/tree/main/symbolic-execution-toolsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Symbolic Execution Toolsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Symbolic Execution Toolsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもSymbolic Execution Toolsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Symbolic Execution Tools」は無料ですか?

ptn1411がGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇