Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0sec labs 0 check reachability

From Leeroopedia
Knowledge Sources
Domains Binary_Analysis, Symbolic_Execution
Last Updated 2026-10-29 00:00 GMT

Overview

Wrapper for the angr symbolic execution engine that prunes static hypotheses by proving sink reachability.

Description

The check_reachability function symbolically executes a target function with symbolic arguments and stdin, then asks whether a sink instruction address is reachable. It is a Wrapper Doc around angr/claripy: the external tools perform the symbolic execution; 0verse provides the safe wiring contract. The contract is fail-open: unsat (which prunes a finding) is returned only when exploration provably exhausted every path with no timeout, error, or capped states. Any doubt degrades to unknown so the finding still goes to the dynamic oracle.

Usage

Use this between LLM triage and dynamic confirmation to prune provably-unreachable hypotheses and save oracle execution budget. Ghidra-only (requires recovered sink addresses).

Code Reference

Source Location

  • Repository: 0security
  • File: 0verse/src/zeroverse/concolic.py:L84-217

Signature

def check_reachability(
    binary: str | Path,
    func_addr: int,
    sink_addr: int,
    *,
    avoid_addrs: tuple[int, ...] = (),
    config: AngrConfig | None = None,
) -> AngrVerdict:
    """Symbolically execute func_addr; ask whether sink_addr is reachable."""

@dataclass
class AngrConfig:
    timeout_s: float = 30.0       # wall-clock budget
    sym_arg_count: int = 3        # symbolic arg registers
    sym_stdin_len: int = 256      # symbolic stdin bytes

@dataclass
class AngrVerdict:
    outcome: str    # "witness" | "unsat" | "unknown"
    stdin: bytes = b""
    note: str = ""

Import

from zeroverse.concolic import check_reachability, AngrConfig, AngrVerdict

I/O Contract

Inputs

Name Type Required Description
binary Path Yes Target binary file path
func_addr int Yes Target function entry address
sink_addr int Yes Sink instruction address to check
avoid_addrs tuple[int,...] No Addresses to avoid during exploration
config AngrConfig No Timeout, symbolic arg count, stdin length

Outputs

Name Type Description
return AngrVerdict outcome: witness (reachable, carries concretized stdin), unsat (prune), unknown (fall through to oracle)

Usage Examples

Pruning a hypothesis

from zeroverse.concolic import check_reachability, AngrConfig

verdict = check_reachability(
    binary="./target",
    func_addr=0x401000,
    sink_addr=0x401200,
    config=AngrConfig(timeout_s=60.0),
)
if verdict.outcome == "unsat":
    print("Hypothesis pruned: sink is provably unreachable")
elif verdict.outcome == "witness":
    print(f"Reachable! Trigger stdin: {verdict.stdin.hex()}")
else:
    print("Unknown — falling through to dynamic oracle")

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment