cargo
Rust package manager (36 subcommands).
miasm-symbolic
Miasm reverse engineering framework for symbolic execution, IR lifting, and binary analysis. Interoperates with blackhat-go via adversarial bisimulation games and GF(3) conservation.
Full skill instructions
Status: ✅ Production Ready
Source: CEA-SEC Miasm Framework (3.8K stars)
Interop: blackhat-go adversarial bisimulation games
GF(3): ERGODIC (0) - transformation/mediation role
The conscious hacker recognizes that offensive and defensive security are dual:
blackhat-go (attack chains) ←→ miasm-symbolic (program understanding)
↓ ↓
Order matters (Ungar) State equivalence (Bisim)
↓ ↓
MINUS (-1) ERGODIC (0)
Together with a defense verification skill (+1), this maintains GF(3) conservation.
Miasm provides:
| Component | Trit | Role |
|---|---|---|
| Disassembly (r2/miasm) | -1 | MINUS - deconstruction |
| IR Lifting (miasm) | 0 | ERGODIC - transformation |
| Symbolic Exec (miasm) | +1 | PLUS - construction |
Conservation: (-1) + (0) + (+1) = 0 ✓
When blackhat-go executes an Ungar game attack chain, miasm can verify semantics:
from miasm_r2_bridge import MiasmR2Bridge
# blackhat-go attack: shellcode injection
attack_chain = ["go-concurrency", "shellcode-inject", "process-hollow"]
# miasm verification: does shellcode do what attacker claims?
bridge = MiasmR2Bridge(shellcode_path, "x86_64")
# Lift to IR and symbolically execute
ir = bridge.lift_to_ir(entry_point, shellcode_bytes)
symbolic_state = bridge.symbolic_exec(ir)
# Check: does shellcode reach claimed goal state?
goal_reached = symbolic_state.check_constraint(goal_condition)
Two binaries are bisimilar if miasm symbolic execution shows they produce equivalent observable states:
def check_binary_bisimilar(bin1: bytes, bin2: bytes) -> bool:
"""
Check if two binaries are behaviorally equivalent.
Used in blackhat-go bisimulation games for defense validation.
"""
bridge1 = MiasmR2Bridge(bin1, "x86_64")
bridge2 = MiasmR2Bridge(bin2, "x86_64")
sym1 = bridge1.symbolic_exec_full()
sym2 = bridge2.symbolic_exec_full()
# Compare final symbolic states
return sym1.is_equivalent(sym2)
{
"type": "miasm/verify",
"game_id": "bisim-001",
"player": "arbiter",
"action": {
"operation": "symbolic_equivalence_check",
"binary1_hash": "abc123",
"binary2_hash": "def456"
},
"result": {
"bisimilar": true,
"constraints_matched": 42,
"paths_explored": 1337
},
"trit": 0
}
from miasm.analysis.machine import Machine
ARCHITECTURES = Machine.available_machine()
# ['arml', 'armb', 'armtl', 'armtb', 'sh4', 'x86_16', 'x86_32', 'x86_64',
# 'msp430', 'mips32b', 'mips32l', 'aarch64l', 'aarch64b', 'ppc32b',
# 'mepl', 'mepb']
from miasm_r2_bridge import MiasmR2Bridge, GayColor
bridge = MiasmR2Bridge("/path/to/binary", "x86_64")
colors = GayColor(seed=1069)
instrs = bridge.disassemble_function(0x1000, code_bytes)
for instr in instrs:
print(f"{instr['addr']}: {instr['mnemonic']} | {instr['color']}")
# Lift x86_64 instruction to miasm IR
ir = bridge.lift_to_ir(0x1000, shellcode)
# Result: {'addr': '0x1000', 'asm': 'MOV RAX, 0x42',
# 'ir': [{'dst': 'RAX', 'src': '0x42'}]}
from miasm.ir.symbexec import SymbolicExecutionEngine
from miasm.expression.expression import ExprId, ExprInt
# Create symbolic state
symbols = {
ExprId("RAX", 64): ExprId("RAX_init", 64), # Symbolized
ExprId("RBX", 64): ExprInt(0, 64), # Concrete
}
# Execute symbolically
engine = SymbolicExecutionEngine(ir_arch, symbols)
final_state = engine.run_at(ir_cfg, entry_addr)
# Query: what value does RAX hold?
rax_expr = final_state.eval_expr(ExprId("RAX", 64))
from miasm.ir.translators.z3_ir import TranslatorZ3
translator = TranslatorZ3()
z3_expr = translator.from_expr(rax_expr)
# Solve for input that makes RAX == 0x1337
import z3
solver = z3.Solver()
solver.add(z3_expr == 0x1337)
if solver.check() == z3.sat:
model = solver.model()
print(f"Input to reach RAX=0x1337: {model}")
// blackhat-go side
game := NewUngarGame(kb)
game.AttackerMove("shellcode-inject")
// MCP message to miasm
msg := MCPMessage{
Type: "miasm/verify_attack",
Payload: AttackVerification{
Technique: "shellcode-inject",
Shellcode: shellcodeBytes,
ClaimedBehavior: "spawns /bin/sh",
},
}
// miasm verifies via symbolic execution
response := miasmService.Verify(msg)
if response.Verified {
game.ArbiterVerify() // GF(3) balance maintained
}
// blackhat-go: are two defenses equivalent?
bisim := NewBisimulationGame(kb, defense1, defense2)
// Use miasm to check binary-level equivalence
miasmCheck := miasm.CheckBisimilar(defense1.Binary, defense2.Binary)
if miasmCheck.Equivalent {
// Defender wins: defenses are observationally equivalent
bisim.DefenderWins()
}
# Requires pyparsing < 3 for miasm compatibility
uv venv --python 3.11 /tmp/miasm_venv
source /tmp/miasm_venv/bin/activate
uv pip install "pyparsing==2.4.7" miasm future
# Optional: Z3 for constraint solving
uv pip install z3-solver
| World | Seed | miasm Role | blackhat-go Role |
|---|---|---|---|
| 🔴 ZAHN | 1069 | Verify attack semantics | Execute attack chains |
| 🟢 JULES | 69 | Check binary equivalence | Validate defenses |
| 🔵 FABRIZ | 0 | Arbiter symbolic proofs | Arbiter game state |
{
"tools": [
{
"name": "miasm_disassemble",
"description": "Disassemble bytes with miasm",
"parameters": {
"arch": "x86_64",
"bytes": "base64-encoded",
"addr": "0x1000"
}
},
{
"name": "miasm_lift_ir",
"description": "Lift assembly to miasm IR",
"parameters": {
"arch": "x86_64",
"bytes": "base64-encoded"
}
},
{
"name": "miasm_symbolic_exec",
"description": "Run symbolic execution",
"parameters": {
"ir": "ir-json",
"symbols": {"RAX": "symbolic"}
}
},
{
"name": "miasm_check_bisimilar",
"description": "Check if two binaries are bisimilar",
"parameters": {
"binary1": "base64",
"binary2": "base64",
"depth": 100
}
}
]
}
| Skill | Trit | Role |
|---|---|---|
| blackhat-go | -1 | Attack chains, Ungar games |
| miasm-symbolic | 0 | IR lifting, symbolic exec |
| narya-proofs | +1 | Formal verification |
Conservation: (-1) + (0) + (+1) = 0 ✓
| Contributor | Role | Followers |
|---|---|---|
| serpilliere | Creator | 107 |
| commial (Camille Mougey) | Core dev | 286 |
| mrphrazer (Tim Blazytko) | Contributor | 521 |
| mrexodia (Duncan Ogilvie) | x64dbg creator | 3,334 |
~/.claude/skills/miasm-symbolic/SKILL.md # This skill
~/iii/src/miasm_r2_bridge.py # Bridge implementation
~/iii/r2con-integration/ # r2con integration
"The conscious hacker uses miasm not to attack, but to understand—and through understanding, to protect."
The interaction IS the skill improving itself.
Every use of this skill is an opportunity for worlding:
Add Interaction Exemplars here as the skill is used.
Rust package manager (36 subcommands).
Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma...
**Status**: 🌳 Production Ready (upstream in StringZilla v3+) **Type**: High-Performance String Operations / SIMD-Accelerated Text Processing **Principle**: Zero-copy views, SIMD/SWAR acceleration, deterministic hashing **Frame**: Cross-language interoperability (C, C++, Python, Rust, Go, Swift, ...
Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations
Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.
Systems programming and performance optimization using Zig. Provides low-level abstractions, memory-safe compiled code, and performance benchmarking. Use for system-level operations, optimization, and interoperability with C/POSIX APIs.
PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.
Unison language - content-addressed functional programming with abilities for effects, distributed computing, and structural types. Use for pure functional code, effect management, distributed systems, and refactoring-safe codebases.
Google Tasks management via TasksACSet. Transforms task operations into GF(3)-typed Interactions, routes to triadic queues, detects saturation for task-zero-as-condensed-state.
World C Skill
Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.
Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience