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 ingest fleet

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

Overview

Concrete tool for multi-binary fleet ingestion with firmware carving and ABI resolution, provided by the 0verse fleet module.

Description

The ingest_fleet function triages and resolves the ABI for every binary in a fleet spec, decompiling each (unless decompile=False). Firmware images in the spec are carved first via firmware.unpack_firmware (binwalk). The fleet spec can be a directory (all files triaged), a manifest file (one path per line), or a list of paths. Each binary becomes a FleetMember with triage info, ABI, and optionally decompiled code.

Usage

Import this function when you need to prepare a set of binaries for variant detection. It is Step 2 of the fleet variant analysis workflow.

Code Reference

Source Location

  • Repository: 0security
  • File: 0verse/src/zeroverse/fleet.py:L409-426 (ingest_fleet), fleet.py:L368-406 (_expand_spec, _carve_firmware), 0verse/src/zeroverse/firmware.py:L78+ (unpack_firmware)

Signature

def ingest_fleet(
    spec: str | Path | Sequence[str | Path],
    *,
    decompile: bool = True,
    workdir: str | Path | None = None,
) -> list[FleetMember]:
    """Triage + resolve ABI for every binary; decompile each (unless decompile=False)."""

@dataclass
class FleetMember:
    path: str
    triage: Triage
    abi: Abi | None
    decompiled: dict[str, str]   # function -> C code (empty if no decompiler)
    note: str                    # e.g. "no decompiler — cheap symbol pass only"

    @property
    def name(self) -> str: ...    # basename of path

Import

from zeroverse.fleet import ingest_fleet, FleetMember

I/O Contract

Inputs

Name Type Required Description
spec Path \| Sequence Yes Directory, manifest file, or path list
decompile bool No /// Whether to decompile each binary (default True)
workdir Path No /// Unpack directory for firmware

Outputs

Name Type Description
return list[FleetMember] Each member with path, triage, abi, decompiled code, note

Usage Examples

From a directory of binaries

from zeroverse.fleet import ingest_fleet

members = ingest_fleet("/firmware/images/")
for m in members:
    print(f"{m.name}: {m.triage.fmt} {m.triage.arch} — {len(m.decompiled)} functions")

From a manifest file

from zeroverse.fleet import ingest_fleet

# manifest.txt: one binary path per line
members = ingest_fleet("manifest.txt", decompile=True)

Detection only (no decompilation)

from zeroverse.fleet import ingest_fleet

members = ingest_fleet("/binaries/", decompile=False)
# decompiled is empty; detect_variants falls back to symbol pass

Related Pages

Implements Principle

Requires Environment

Page Connections

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