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

Principle:0sec labs 0 Static Hypothesis Generation

From Leeroopedia
Knowledge Sources
Domains Binary_Analysis, Static_Analysis, Taint_Analysis
Last Updated 2026-10-30 00:00 GMT

Overview

Technique for generating vulnerability hypotheses by performing backward source-to-sink taint slicing and bug-class pattern matching over decompiled code.

Description

Static hypothesis generation produces candidate vulnerability findings without executing the binary. It combines two approaches: (1) backward taint slicing — tracing data flow from dangerous sinks (system, strcpy, memcpy) back to untrusted sources (getenv, read, network input), and (2) bug-class lens matching — applying pattern-based detectors for command injection, buffer overflow, integer overflow, format string, and use-after-free over decompiled C. Each finding is tagged by origin (slice, foxguard, bugclass:*, seed:*) so the downstream triage funnel can prioritize effectively.

Usage

Use this principle when you need to find candidate vulnerabilities in a binary without running it. It produces high recall (many hypotheses) at the cost of precision, which is then filtered by the LLM triage funnel and dynamic confirmation.

Theoretical Basis

The core mechanism is backward taint slicing:

# Abstract algorithm (NOT real implementation)
sources = identify_source_calls(instructions)  # getenv, read, recv
sinks = identify_sink_calls(instructions)       # system, strcpy, sprintf
for sink in sinks:
    for source in sources:
        path = backward_slice(source, sink)      # trace data flow
        if path.exists:
            findings.append(Finding(source, sink, path))

Bug-class lenses apply pattern-matching rules over decompiled C:

  • cmdi: untrusted data reaches system/execve without sanitization
  • overflow: unbounded copy (strcpy, memcpy) from attacker-controlled source
  • intoverflow: arithmetic on attacker-controlled values used as sizes
  • fmtstring: attacker-controlled data used as a format string
  • uaf: freed memory accessed through a stale pointer

Related Pages

Implemented By

Page Connections

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