bitmapper
bitmapper answers "what is this machine actually talking to, and which process is doing it?"
bitcollector reads the host's state. bitscanner looks outward at the segment. bitmapper
watches the traffic itself: live packets on the host's own interfaces, tracked into flows
and attributed to the process that owns the socket.
- bitmapper delivers flow records, not traffic. Endpoints, ports, protocol, counters, connection state and the process that owns the socket. No payload bytes, no packet captures and no process command lines.
- Process names need root. With root, most flows are attributed to a process. Without root, most flows arrive without one.
- It is passive. It never sends a packet.
- Linux
amd64only. The sections below give the detail and list what is not wired.
| Release | 0.7.0-ga |
| Platforms | linux/amd64 only. macOS, Windows and arm64 are not published, and why |
| Supply chain | Reproducible build, CycloneDX SBOM, cosign signature, SBOM attestation, signed SHA256SUMS (same family key as the other bits) |
| Status | Captures, attributes and tracks connections; writes flow records and edges to a local spool, and bitcollector delivers them |
| Inbound network surface | Nothing listens. The HTTP/WebSocket and gRPC servers were deleted from the code, and no key can open a port |
| Outbound | None. bitmapper makes no network request and holds no platform credential. It writes files to a local spool (handoff.root) and bitcollector delivers them |
| Privileges | Elevated: root, or CAP_NET_RAW + CAP_NET_ADMIN |
| Build requirement | CGO and libpcap, linked statically into the published binary |
In short​
- Question it answers: What is this host really doing on the wire?
- What it never does: It never sends a packet, never inventories the host and never changes the host.
- By plan: Starter and Pro. Not included in Free.
- Safety: Passive capture only, with a kernel filter. It needs root to name the process behind a flow; without root most flows arrive without a process name. It sends flow records: no payload bytes, no packet captures, no command lines. It holds no platform credential.
- Install and upgrade: Add it from Agent Fleet with Add modules. Cert-IX installs and upgrades it automatically, and bitcollector delivers its data.
Where it sits among the bits​
The four agents answer four different questions, and the boundary is what each one looks at:
| Looks at | Answers | |
|---|---|---|
bitcollector | The host's own state | "What is this machine, and what state is it in?" |
bitscanner | The segment around the host | "What else is on this wire that I do not know about?" |
bitmapper | The packets crossing the host's interfaces: TCP and UDP by default, more if you ask | "What is this machine talking to, and which process is doing it?" |
bitenforcer | The host's configuration | "Does this machine match the policy I set?" |
A neighbour table tells you a device exists. A capture tells you it is being talked to, by what, and how often, which is the difference between an inventory and a dependency map.
What works today​
Present and wired into the capture command's code path:
- Live packet capture: libpcap through
gopacket, statically linked into the published Linux binary, with BPF filter, snaplen, promiscuous mode and capture buffer size. - Kernel-side capture filtering:
capture.filter,capture.protocols,capture.portsandcapture.exclude_portsare compiled into one BPF expression and enforced by the kernel, so excluded traffic is never copied into the agent at all. The compiled expression is logged at start-up. Note the default:capture.protocolsis["tcp", "udp"]even when your file omits it, which means ICMP, SCTP, GRE and ESP are not captured unless you say so. See filtering. - Multi-interface capture: a named list of interfaces, or every interface that is up and non-loopback when you name none.
- Process attribution: PID, process name, executable path and user, resolved from the
host's socket tables at the end of the flow that owns the socket. The lookup is retried on
the flow's later packets, with an on-demand re-read of the kernel socket tables when a socket
is newer than the last snapshot, and once more before the record is exported. Every process
carries an
attributionfield:socket(read from the flow's own socket) orlistening_socket(a TCP flow whose socket was already gone, named from the listener). The second value declines rather than guesses: it takes no identity from a listening socket unless the address is on this host and exactly one process is proven to hold the socket (one nginx socket on the development host is held by 17 processes), and it never infers for UDP, which has no LISTEN state. A blank process field is a refusal, not a failure. When an end has no owner, the record carriesprocess_attribution_scope(complete,restrictedorprotocol_limited) saying whether that absence is a finding, a permission limit or a limit for non-TCP flows. Measured on a development host: 87% of TCP flows named as root, 6% with onlyCAP_NET_RAWandCAP_NET_ADMIN. See process attribution. - Stateful connection tracking: bidirectional flow matching, a TCP state machine
(
SYN_SENT→ESTABLISHED→ … →CLOSED), per-connection packet and byte counters, a size-capped table with eviction, and periodic garbage collection of idle connections. - In-process event stream: packet, new-connection and statistics events fanned out to subscribers inside the process.
- Periodic statistics: packet, byte, drop and connection counters written as structured
JSON on
performance.stats_interval. - Edge aggregation: per export interval, flows are folded into edges keyed by (process,
local role
serverorclient, remote address, service port, protocol), with bytes, packets and flows, and a direction class:east_west,egress,ingressorlocal. The agent draws no graph: the platform builds the map from the edges. - Flow export: every tracked connection is handed from the capture path to the exporter
and written to the spool as a flow record. Every flow produces at least one record, and its
last record is marked final with complete counters; a long-lived connection is refreshed once
per
batch_export.batch_intervalif its counters moved, so you see it before it ends. - Hand-off to bitcollector: flow records and edges are written atomically as
certix.bits.handoff/v1files intooutbox/bitmapperunderhandoff.root. A file is at most 4 MiB (a larger batch is split), and at most 512 unread files or 256 MiB are held: at that point bitmapper stops writing and counts the refusals. bitcollector attests and delivers the files.bitmapper statuslists the spool. - Narrow-only platform policy: files in
inbox/bitmappercan switch capture off, restrict it to a subset of the file's ports and protocols, or lengthen the export interval. Never wider. A policy that does not validate is set aside and the previous one stays in force. A tenant whose plan does not include network mapping receives a policy that switches capture off. - Bounded resources: the Go memory limit is 256 MiB unless you set
performance.memory_limitorGOMEMLIMIT,performance.cpu_limitcaps the CPUs used, and the capture rings are capped bycapture.max_total_buffer_bytes. - Export filtering that actually filters:
output.filter(exclude_cidrs,exclude_loopback,protocols,ports) is applied at intake, before a record is built, so an excluded flow is never held in memory and can never be sent. Exclusions match either endpoint: excluding10.0.0.0/8means "do not tell Cert-IX about that network", and reporting that10.1.2.3opened a connection outward tells them about10.1.2.3just as completely. An entry that cannot be compiled refuses the run rather than degrading to "export everything". - Fail-fast configuration validation: the agent refuses to start on an invalid configuration, or on a key that asks for something nothing implements, rather than starting in a weakened state.
What is not wired​
Stated explicitly, so nobody has to discover it by reading the source:
- There is no server. The HTTP/WebSocket and gRPC servers and the security middleware
behind them were deleted, so bitmapper exposes no inbound port and
server.*andsecurity.*enforce nothing (they are refused, see below). - No graph in the agent. The
ServiceTopologyandServiceEdgetypes exist but are never built. The agent supplies aggregated edges, and the platform builds and draws the topology. - No Prometheus metrics and no
/metricsendpoint. - No network-policy detection.
- No heartbeat of its own. bitcollector reports this module in its heartbeat, by observing the spool.
Configuration that is refused​
Keys that no code consumes are no longer accepted silently. Since 0.7.0-ga the agent stops at
start, naming the key and never its value, when you set any of these to anything but the value
the previous shipped file carried (so a copied old file still starts):
output.backend, output.kafka, output.nats, output.redis, output.webhook,
output.file, kubernetes.*, storage.*, logging.*, server.*, security.*,
performance.batch_size, performance.connection_pooling.
The keys of the removed platform connection (control_plane.*, batch_export.forward.*,
batch_export.max_batch_bytes and the BITMAPPER_CONTROL_PLANE_* variables) stop the agent
with an error that names handoff.root and bitcollector. performance.memory_limit and
performance.cpu_limit are no longer in this category: they are enforced.
Command-line flags are still mostly inert. --log-level and --log-format are registered
and read by nothing: the logger is a fixed zap production logger (JSON, info level). The
capture flags (--interfaces, --filter, --snaplen, --promiscuous, --buffer-size,
--workers, --queue-size, --stats-interval) are parsed and ignored, and --help now says
NO EFFECT on each and names the configuration key that works. --enable-grpc and
--enable-http were removed with the servers. --config is the only flag that changes
behaviour. Put everything else in the YAML file.
Three things look inert and are not, and the distinctions matter:
output.filteris read and enforced on the export path (since0.1.0-ga). It used to be listed as inert, and while the agent exported nothing at all that was merely dead weight. Once flow records began leaving the host it would have become a false privacy claim: an operator excluding a sensitive subnet getting no protection, no error, and no way to tell. It is now applied at intake. Four keys that could never act on anything (export_packets,export_stats,min_packet_size,require_payload) were removed from the schema instead of left parsing, and the agent names them at start-up if your file still sets one.capture.protocols,capture.portsandcapture.exclude_portsare compiled into the kernel BPF filter and enforced there. An earlier version of this page listed all three as validated-but-inert, and that was wrong. See the correction below.capture.exclude_interfacesis read and applied on the live capture path. See choosing interfaces.
capture.exclude_ports is a working privacy controlUntil 0.1.0-ga this page named capture.protocols, capture.ports and
capture.exclude_ports among the keys that "parse and do nothing", and the
capture page repeated it. That was the opposite of the truth: all three
compile into the BPF filter and are enforced by the kernel before a packet reaches the agent.
capture.exclude_ports is the one to act on. The configuration bitmapper ships sets
exclude_ports: [22] ("do not capture SSH"), and it works. If you read the old text and
deleted the key as dead weight, you removed a control that was protecting you and started
collecting traffic you had deliberately excluded, with nothing to indicate the change. Check
what your deployed configuration says before you assume you were unaffected.
capture.protocols needs the opposite kind of attention: it defaults to ["tcp", "udp"] whether
or not you set it, so a stock deployment silently captures no ICMP, ICMPv6, SCTP, GRE, ESP or
AH. The protocol default explains how to widen it.
A key that parses cleanly and does nothing reads as a working feature. That is why 0.7.0-ga
refuses the keys above at start instead of accepting them. Assume a key has no effect unless
it appears under what works today.
The Kubernetes enrichment package was removed rather than left dormant. It had no importers
and built its own HTTP client, which followed redirects and could leak a service-account bearer
token to a plaintext destination when a kubeconfig pointed at a redirecting server. The
kubernetes.* block is consumed by nothing and is refused when it asks for anything.
Running it​
bitmapper is a single binary with four commands:
# What you have
bitmapper version
# Bitmapper 0.7.0-ga
# Git Commit: <commit>
# Build Date: <date>
# Which interfaces this host can capture on
bitmapper interfaces
# Capture, with the configuration you supply
bitmapper capture --config /etc/bitmapper/config.yaml
# The hand-off spool: files waiting for bitcollector, whether the outbox is full,
# and what the platform left in the inbox. Read only, works with the agent stopped
bitmapper status --config /etc/bitmapper/config.yaml
--config, --log-level and --log-format are persistent flags on the root command, but
only --config does anything. There is no way to turn up logging detail while you are
setting it up: the logger is fixed at JSON, info level. What the agent does tell you at start-up
is the compiled capture filter and the interfaces it selected, and on
performance.stats_interval it logs packet, byte, drop and connection counters; that is the
evidence to read while you are commissioning a host.
It needs elevated privileges​
Packet capture is privileged. On the published platform:
| Platform | What it needs |
|---|---|
| Linux | CAP_NET_RAW and CAP_NET_ADMIN (or root) |
It needs CGO, and the published binary already has it​
Capture goes through gopacket/pcap, which is a C library binding. A build with
CGO_ENABLED=0 still compiles, but capture and interface listing refuse at runtime:
packet capture requires CGO (build with CGO_ENABLED=1 and libpcap installed)
That is deliberate: a binary that silently captured nothing would be worse than one that says why it cannot. This is also the single fact that decides which platforms are published, and it is why the release pipeline refuses any binary that was not built with CGO, is not statically linked, or has no libpcap inside it. See platforms.
The download you get needs no libpcap installed on the host: libpcap is linked statically into the published binary.
How the data leaves: the spool​
bitmapper holds no platform credential, does not enrol and makes no network request. bitcollector, the host's one enrolled agent, carries its data. The two meet in a local spool:
handoff:
root: "/var/lib/certix-bits" # config FILE only
inbox_allowed_uids: [] # extra trusted inbox owners (a non-root bitcollector's uid)
- bitmapper writes flow files to
outbox/bitmapperunderhandoff.root, and bitcollector reads, attests and delivers them. - bitcollector writes the platform's policy, suspend and reactivate files to
inbox/bitmapper, and bitmapper reads them. - Install bitcollector on the host first: its installer creates the spool. Without it bitmapper still starts and captures locally, and says on every start and on every statistics line that nothing is being handed off.
handoff.rootis read from the configuration file only.BITMAPPER_HANDOFF_ROOTis refused, because the root decides where this process writes and whose commands it obeys.- Old configuration that still carries
control_plane.*, an enrolment token or a gateway URL is refused at start with an error that nameshandoff.root. Silently ignoring it would leave you believing this process ships your topology to the platform on its own.
Configuration​
bitmapper reads a YAML configuration file, conventionally /etc/bitmapper/config.yaml,
passed on every command:
bitmapper capture --config /etc/bitmapper/config.yaml
The keys that decide what it actually does are covered in detail on this page: which
interfaces it binds to under Choosing interfaces, and what it is
permitted to observe under Filtering, four keys that compile down to a single
kernel filter. Where the data goes is set by handoff.root, described under
how the data leaves.
Keys that nothing reads are refused at start rather than ignored. Configuration that is refused lists them, so you can tell a real setting from a leftover.
What it costs on the host​
Packet capture is the most expensive thing any of the bits do, and the cost scales with traffic rather than with host size. It was measured with the release binary in a sandbox, with the shipped defaults, on one interface carrying UDP:
| Load | CPU (% of one core) | Resident memory | Written to the spool |
|---|---|---|---|
| Idle | 0.8 | 86 MiB | 0 |
| 200 packets/s | 7.4 | 98 MiB | 3.9 MiB/h |
| 2,000 packets/s | 12.1 | 101 MiB | 51.3 MiB/h |
| 10,000 packets/s (5,000 flows) | 22.7 | 109 MiB (113 MiB peak) | 255.9 MiB/h |
There were no kernel drops at any level. These figures do not cover TCP under load, more than one interface, or process attribution across containers. Your numbers depend on your traffic. Two controls matter most:
- A BPF filter is the cheapest possible reduction: it drops packets in the kernel before they are ever copied to the agent.
- The connection table is size-capped (100,000 entries by default) with eviction and periodic GC of idle entries, so a host seeing many short-lived connections does not grow the table without bound.
Memory and CPU are bounded by configuration. performance.memory_limit sets the Go soft memory
limit (256 MiB by default, -1 for none, otherwise at least 64 MiB), performance.cpu_limit
caps the CPUs the runtime uses, and capture.buffer_size (32 MiB per interface by default) is
capped across all interfaces by capture.max_total_buffer_bytes (512 MiB). Your init system's
MemoryMax= and CPUQuota= remain available on top.
Flows held awaiting export are bounded separately by batch_export.max_buffered_connections
(20,000), not by performance.connection_table_size. The spool is bounded too: 512 unread
files or 256 MiB, whichever comes first, so a stopped bitcollector cannot fill the disk. Every
drop is counted and logged; none of them is silent.
Platforms​
0.7.0-ga publishes one signed binary. That is the narrowest platform list in the family,
and every omission below is a measured decision rather than an oversight:
| Platform | Published | Why not |
|---|---|---|
Linux amd64 | Yes | |
Linux arm64 | No | Prepared but not released: it builds by cross-compiling and has only been run under emulation, never on native arm64 hardware, and its C library choice is still open |
macOS amd64/arm64 | No | Needs clang and the macOS SDK |
Windows amd64 | No | Builds, but has never been run on Windows (see below) |
The single cause behind all of it is that bitmapper is the one bit that needs a C
toolchain. Capture is gopacket → libpcap → CGO, so a build needs a real C compiler and a
real libpcap for the target. Every other bit is pure Go, and GOOS/GOARCH is all it takes.
The trap this creates is specific and worth naming. internal/capture carries a //go:build !cgo stub that compiles on every platform and captures nothing. A CGO_ENABLED=0 build
therefore succeeds: it produces a binary that starts, runs without error
and never sees a packet. So the release pipeline gates on the artefact rather than on the build
command: it refuses any binary that was not built with CGO, is not statically linked, or has no
libpcap inside it.
Windows is the interesting one, and the honest one. It genuinely builds (gopacket's Windows
support is pure Go and loads wpcap.dll at runtime), so we could publish it today. It has
never been run on Windows. That makes it a testing gap rather than a toolchain gap, and
publishing it would mean shipping a signed binary whose capture path no one has ever watched
work. A signed binary that cannot capture is worse than no binary, because the signature is
read as a statement about fitness. It is withheld until someone has run it.
If you need this data from a macOS, Windows or arm64 host today, bitmapper is not the answer
for that host. bitcollector ships on all five platforms and reports
that host's established network peers, a coarser answer than per-flow attribution, but a real
one on the machine you actually have.
Next steps​
- How capture works: interfaces, BPF filters, process attribution and the connection state machine, and what each of them puts in memory.
- bitscanner: the agent that finds devices your inventory does not contain.
- bitcollector: the inward-facing host inventory.
- Verifying your downloads: the trust anchor, and why it matters more than the signature.
- What is bits?: how the agents fit together.
Questa pagina ti è stata utile?