Principle:0sec labs 0 Seed Construction
| Knowledge Sources | |
|---|---|
| Domains | Binary_Analysis, Variant_Analysis, Bug_Classification |
| Last Updated | 2026-10-30 00:00 GMT |
Overview
Technique for building a reusable vulnerability seed matcher from a bug archetype, a reference vulnerable function, or a confirmed finding that can be swept across a fleet of binaries.
Description
Seed construction is the principle of "find a bug once, then sweep its siblings." A seed encodes the bug class, sink/source symbols, the confirmation route (userland, firmware, kernel-verify), and optionally a reference shape for binary-diff similarity ranking. Three construction paths exist: from an archetype id (a known bug class like cmdi or overflow), from a reference vulnerable function (decompile it, classify its archetype by running every lens, capture its shape), or from an already-confirmed finding (the cheapest seed — prior analysis already proved the bug is real). The seed is a frozen, immutable dataclass that can be reused across many fleet members.
Usage
Use this principle when you need to scale from a single known vulnerability to finding its variants across a fleet of binaries. The seed construction method determines the matcher type (bugclass lens vs. seedbug pattern) and the confirmation route.
Theoretical Basis
The seed encodes both the what (bug class, sink/source symbols) and the how (confirmation route, matcher kind):
# Abstract data model (NOT real implementation)
@dataclass(frozen=True)
class FleetSeed:
bug_class: str # what to look for
sink_symbols: tuple # where the dangerous operation is
source_symbols: tuple # where untrusted data comes from
route: str # how to confirm (userland/firmware/kernel)
matcher_kind: str # how to detect (bugclass lens / seedbug pattern)
reference: Shape | None # optional binary-diff reference for ranking
The archetype resolution hierarchy:
- Bug-class form (cmdi) → bugclass lens matcher
- Seed-bug-class form (firmware:cgi-cmdi) → seedbug pattern matcher
- Catalog uid form (kernel/DRV-01) → resolves to an engine_lens, then to one of the above