netcap

package module
v0.16.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: BSD-3-Clause, GPL-3.0 Imports: 3 Imported by: 2 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Documentation · Releases · First capture

License Golang Linux macOS windows GoDoc Homepage Documentation FOSSA Status Ask DeepWiki

Netcap (NETwork CAPture) converts live traffic and PCAP/PCAPNG files into structured Protocol Buffer audit records for security monitoring, forensic analysis and dataset preparation. The net CLI combines concurrent packet/stream decoding, investigation tools and a local web UI.

Protocol hierarchy in the web UI — more screenshots

Features

Capability Summary and details
Protocol analysis Packet decoding and stream reassembly for network, application and OT/ICS protocols, including HTTP, TLS, DNS, SMB and S7Comm. Coverage and limits; record schema.
Analyst web UI Record browsing, filters, protocol/host visualizations, alerts and investigation workspaces. Web interface.
Security analysis JA4 TLS ClientHello fingerprints (JA4+ requires an opt-in source build under separate terms), credential harvesting, file extraction, optional YARA-X scanning and Magika classification, plus software/CVE enrichment. TLS, credentials, files, vulnerabilities.
Detection rules YAML expressions, thresholds and sequences over audit records, including OT/ICS hunts. Rule engine; S7 hunting.
Enrichment DNS, GeoIP/ASN and MAC vendor lookups, with optional native DPI. Resolvers, DPI, database sources and updates.
Output and integrations Protocol Buffers, CSV/JSON, Elasticsearch, Prometheus/Grafana, Maltego and Suricata/custom dataset labels. Export, Elasticsearch, metrics, Maltego, labeling.
Distributed capture Remote agents deliver audit records over mutually authenticated TLS with acknowledgments and reconnects. Distributed collection; sealed offline sensor bundles.
AI-agent access Stdio MCP server for capture analysis and investigation. MCP guide.

Network detections

Capture-time scans, DNS anomalies, periodic connections and application-policy observations run alongside YAML rules. Network detections explains thresholds, indicator configuration and coverage; a match alone does not establish compromise.

Hunting evidence

DNS transaction timing, DCE/RPC operations, connection byte ratios and capture-derived host/account identities support investigation. Use net triage and the record definitions to inspect observations and their qualifications.

Evidence linking

Related-record timelines, hashed packet-subset exports, retained packets/streams and capture-health manifests preserve investigation context. Check scope, gaps and unavailable counters before drawing conclusions; DNS-to-connection links remain candidates. Evidence guide.

Behavioral monitoring

Opt-in device/service discovery and traffic models detect changes against an explicitly approved baseline, scoped by sensor, interface and VLAN. Learning does not grant trust. Baseline lifecycle and walkthrough.

Quick Start

Install a release archive using the installation guide, then analyze an existing capture into a fresh output directory:

net --version
net capture -read traffic.pcap -out analysis -dpi=false -geoDB=false
net triage -read analysis

# Analyze again and keep the local web UI running
net capture -read traffic.pcap -out browser-audit -dpi=false -geoDB=false \
  -http 127.0.0.1:8080

Open http://127.0.0.1:8080 and sign in at /auth with the per-run token printed in the terminal as Local Web UI access token: …. Keep tokens out of URLs. First capture covers recording traffic and exporting records; live capture and service mode cover other entrypoints.

Capture archives support Linux libc/musl, macOS (DPI: 26+, nodpi: 15+) and Windows amd64 nodpi. Windows offline analysis without BPF needs no Npcap driver; live capture and BPF filtering require Npcap and remain unqualified. Keep bundled runtimes with the executable. Installation covers platform limits and source builds, including UI assets and native dependencies.

Subcommands

Run net COMMAND -h for installed options or browse the command guide.

Investigation tools

net investigate provides bounded flow rankings, NetFlow/IPFIX/sFlow collection and queries, packet evidence and controlled protocol experiments. Flow analysis, file-transfer walkthrough and protocol experiments cover the workflows. Qualification tests cover declared fixtures and limits, not arbitrary traffic or hardware.

Application firewall

netcap-firewall is a separate, CGO-free executable for a reverse-proxy WAF, protocol gateways, policy/fleet control and optional Linux packet enforcement. Standalone release archives target Linux amd64/arm64 and contain no capture runtime; the full CLI exposes the same commands under net firewall. The capture decoder-policy bridge evaluates decoded records after the fact. See the firewall quickstart and deployment modes.

Docker

Use the container guide for matched native builder/runtime images and service mode; Dockerfiles live in docker/.

Documentation

Start here Reference
User guide Local documentation index
Releases Changelog and migration
Original thesis DeepWiki

Contributing

See contributing, macOS development and testing. Use the bug report template when reporting a problem.

License

Netcap's public Go source is GPL-3.0-or-later, a strong-copyleft license. LICENSE and the license guide cover source, native-runtime and dataset boundaries, optional JA4+ terms and the separately negotiated commercial alternative.

Documentation

Overview

Package netcap is a framework for network traffic analysis. Learn more at https://netcap.io.

Index

Constants

This section is empty.

Variables

View Source
var Commit = "development"

Commit is the git commit id of the current version.

View Source
var GopacketVersion = "v1.7.7+v1.1.16-0.20261108153543-61002f918d93"

GopacketVersion is the version of gopacket library used.

View Source
var Version = "v0.16.11"

Version is the current version identifier for netcap.

Functions

func LicenseNames added in v0.15.4

func LicenseNames() []string

LicenseNames returns the paths of all license documents embedded in Netcap.

func ReadLicense added in v0.15.4

func ReadLicense(name string) ([]byte, error)

ReadLicense returns an embedded license document by its listed path.

Types

This section is empty.

Directories

Path Synopsis
cmd
analyze command
dbs-server command
firewall
Package firewall supplies the shared CLI for the standalone and net commands.
Package firewall supplies the shared CLI for the standalone and net commands.
inject
Package inject provides the inject subcommand for inline packet manipulation.
Package inject provides the inject subcommand for inline packet manipulation.
mcp
Package mcp implements the `net mcp` subcommand: a stdio Model Context Protocol server suitable for use by desktop LLM clients (Claude Desktop, Claude Code, mcp-inspector).
Package mcp implements the `net mcp` subcommand: a stdio Model Context Protocol server suitable for use by desktop LLM clients (Claude Desktop, Claude Code, mcp-inspector).
net command
netcap-firewall command
Package defaults contains default settings for the netcap core.
Package defaults contains default settings for the netcap core.
helpers module
internal
aggregate
Package aggregate provides private, bounded resident storage for capture state.
Package aggregate provides private, bounded resident storage for capture state.
analyst
Package analyst implements finite, explicitly included capture investigations.
Package analyst implements finite, explicitly included capture investigations.
apipolicy
Package apipolicy implements positive API validation from pinned local artifacts.
Package apipolicy implements positive API validation from pinned local artifacts.
appliance
Package appliance provisions operator-owned named network topologies.
Package appliance provisions operator-owned named network topologies.
archive
Package archive provides utilities for working with compressed archives.
Package archive provides utilities for working with compressed archives.
behavior
Package behavior maintains scoped, passive observations and approved baselines.
Package behavior maintains scoped, passive observations and approved baselines.
behavior/command
Package command supplies the capture and agent behavioral-monitoring flags.
Package command supplies the capture and agent behavioral-monitoring flags.
collector
Package collector provides a mechanism to collect network packets from a network interface on macOS, linux and windows
Package collector provides a mechanism to collect network packets from a network interface on macOS, linux and windows
cryptoutils
Package cryptoutils provides hashing and random token helpers.
Package cryptoutils provides hashing and random token helpers.
dbs
decoder/db
Package db holds the vulnerability and exploit database handles used by the stream decoders.
Package db holds the vulnerability and exploit database handles used by the stream decoders.
decoder/packet
Package packet Package decoder implements decoders to transform network packets into protocol buffers for various protocols
Package packet Package decoder implements decoders to transform network packets into protocol buffers for various protocols
decoder/stream/network
Package network handles network-layer protocol conversations (ICMP, IGMP, GRE, etc.) that don't have a transport layer.
Package network handles network-layer protocol conversations (ICMP, IGMP, GRE, etc.) that don't have a transport layer.
decoder/stream/quic
Package quic implements QUIC protocol analysis for both gQUIC and IETF QUIC.
Package quic implements QUIC protocol analysis for both gQUIC and IETF QUIC.
delimited
Package delimited implements a simple reader and writer for streams of length-delimited byte records.
Package delimited implements a simple reader and writer for streams of length-delimited byte records.
delivery
Package delivery provides opt-in, at-least-once webhook delivery.
Package delivery provides opt-in, at-least-once webhook delivery.
devicecatalog
Package devicecatalog reads explicitly selected, offline device catalogues.
Package devicecatalog reads explicitly selected, offline device catalogues.
distributed
Package distributed implements netcap's agent → collector transport.
Package distributed implements netcap's agent → collector transport.
dnscontext
Package dnscontext snapshots packet-ingress DNS evidence before dispatch.
Package dnscontext snapshots packet-ingress DNS evidence before dispatch.
dpi
Package dpi implements an interface for application layer classification via bindings to nDPI and libprotoident
Package dpi implements an interface for application layer classification via bindings to nDPI and libprotoident
enforcer
Package enforcer provides opt-in, finite source-address blocks for one immutable network scope.
Package enforcer provides opt-in, finite source-address blocks for one immutable network scope.
enrichment
Package enrichment implements an optional, offline-readable channel independent of netcap.sqlite.
Package enrichment implements an optional, offline-readable channel independent of netcap.sqlite.
entropy
Package entropy calculates Shannon entropy over byte distributions.
Package entropy calculates Shannon entropy over byte distributions.
env
Package env contains static environment variable names that netcap uses.
Package env contains static environment variable names that netcap uses.
evidencelink
Package evidencelink links audit records across protocols: records of one connection (Community ID within the connection's time span), the DNS answer that resolved a connection's destination, connections opened to resolved addresses, and alerts raised on any of them.
Package evidencelink links audit records across protocols: records of one connection (Community ID within the connection's time span), the DNS answer that resolved a connection's destination, connections opened to resolved addresses, and alerts raised on any of them.
firewall
Package firewall provides iptables integration for automated response actions.
Package firewall provides iptables integration for automated response actions.
firewallaudit
Package firewallaudit projects decoder records into retrospective policy events.
Package firewallaudit projects decoder records into retrospective policy events.
firewallauth
Package firewallauth provides bootstrap-bound identities shared by firewall APIs.
Package firewallauth provides bootstrap-bound identities shared by firewall APIs.
firewallfleet
Package firewallfleet distributes immutable policy revisions to explicitly enrolled targets.
Package firewallfleet distributes immutable policy revisions to explicitly enrolled targets.
firewallstate
Package firewallstate provides authoritative, scoped shared counters.
Package firewallstate provides authoritative, scoped shared counters.
firewalltransport
Package firewalltransport gates complete messages before releasing their wire headers.
Package firewalltransport gates complete messages before releasing their wire headers.
firewallui
Package firewallui serves the standalone, embedded administrative console.
Package firewallui serves the standalone, embedded administrative console.
gateway
Package gateway implements bounded explicit application gateways.
Package gateway implements bounded explicit application gateways.
helpers
Package helpers provides utilities for testing Netcap components
Package helpers provides utilities for testing Netcap components
hsmatch
Package hsmatch is a thin, build-tag gated wrapper around the gohs (Hyperscan / Vectorscan) library.
Package hsmatch is a thin, build-tag gated wrapper around the gohs (Hyperscan / Vectorscan) library.
httputil
Package httputil provides small HTTP-related helpers used across Netcap.
Package httputil provides small HTTP-related helpers used across Netcap.
injection
Package injection provides packet manipulation and injection capabilities for offensive security testing and network research.
Package injection provides packet manipulation and injection capabilities for offensive security testing and network research.
ja4
Package ja4 implements BSD-3-Clause-licensed JA4 TLS client fingerprinting.
Package ja4 implements BSD-3-Clause-licensed JA4 TLS client fingerprinting.
label
Package label implements mapping alerts from suricata to netcap audit records
Package label implements mapping alerts from suricata to netcap audit records
magika
Package magika provides AI-based file type classification using the Google Magika Rust CLI.
Package magika provides AI-based file type classification using the Google Magika Rust CLI.
mcp
Package mcp implements a Model Context Protocol server that exposes netcap's analytical capabilities as tools, resources, and prompts.
Package mcp implements a Model Context Protocol server that exposes netcap's analytical capabilities as tools, resources, and prompts.
mcp/bindings
Package bindings implements immutable operator-enrolled MCP authorities.
Package bindings implements immutable operator-enrolled MCP authorities.
metrics
Package metrics provides primitives for instrumentation via prometheus
Package metrics provides primitives for instrumentation via prometheus
netio
Package io implements IO primitives
Package io implements IO primitives
networkfirewall
Package networkfirewall implements a routed, verdict-producing packet firewall.
Package networkfirewall implements a routed, verdict-producing packet firewall.
packetmeta
Package packetmeta persists the capture metadata consumed by deferred readers.
Package packetmeta persists the capture metadata consumed by deferred readers.
packetview
Package packetview supplies bounded, scope-preserving inner datagram views.
Package packetview supplies bounded, scope-preserving inner datagram views.
packetview/testutil
Package testutil builds deterministic, fictional packet-pipeline fixtures.
Package testutil builds deterministic, fictional packet-pipeline fixtures.
policy
Package policy compiles bounded application policies independently of alerts.
Package policy compiles bounded application policies independently of alerts.
policycontrol
Package policycontrol manages one in-process policy attachment.
Package policycontrol manages one in-process policy attachment.
policystate
Package policystate evaluates native policies in an authoritative transaction.
Package policystate evaluates native policies in an authoritative transaction.
reassembly
Package reassembly provides TCP stream re-assembly.
Package reassembly provides TCP stream re-assembly.
resolvers
Package resolvers implements primitives to resolve various identifiers against external data
Package resolvers implements primitives to resolve various identifiers against external data
responseactions
Package responseactions dispatches admitted policy intents to operator-configured enforcers.
Package responseactions dispatches admitted policy intents to operator-configured enforcers.
runtimebudget
Package runtimebudget leaves GC headroom inside Linux container memory limits.
Package runtimebudget leaves GC headroom inside Linux container memory limits.
runtimeobs
Package runtimeobs owns per-instance Prometheus registries.
Package runtimeobs owns per-instance Prometheus registries.
servicesignatures
Package servicesignatures identifies passive service greetings using bounded protocol parsers.
Package servicesignatures identifies passive service greetings using bounded protocol parsers.
table
Package table provides simple ASCII table rendering for terminal output.
Package table provides simple ASCII table rendering for terminal output.
tlsdecrypt
Package tlsdecrypt authenticates passive TLS records using captured NSS key logs.
Package tlsdecrypt authenticates passive TLS records using captured NSS key logs.
tools/audit-semantics command
Command audit-semantics exports owned cross-language wire/export fixtures.
Command audit-semantics exports owned cross-language wire/export fixtures.
tools/licenses command
Command licenses generates and verifies the third-party license bundle shipped with netcap.
Command licenses generates and verifies the third-party license bundle shipped with netcap.
transparentfirewall
Package transparentfirewall places explicitly configured TCP message gateways on a routed service path.
Package transparentfirewall places explicitly configured TCP message gateways on a routed service path.
vulndb
Package vulndb reads and writes netcap.sqlite, the vulnerability and exploit database shared by the Go and Rust implementations.
Package vulndb reads and writes netcap.sqlite, the vulnerability and exploit database shared by the Go and Rust implementations.
waf
Package waf implements a bounded HTTP reverse-proxy inspection boundary.
Package waf implements a bounded HTTP reverse-proxy inspection boundary.
webtech
Package webtech recognizes advertised, transaction-scoped web technology.
Package webtech recognizes advertised, transaction-scoped web technology.
webtech/publication
Package publication prepares the two optional catalogues and their scoped source evidence.
Package publication prepares the two optional catalogues and their scoped source evidence.
webtech/testfixture
Package testfixture creates synthetic signing material, never a production grant.
Package testfixture creates synthetic signing material, never a production grant.
Package types Contains the type definitions for the supported network protocols
Package types Contains the type definitions for the supported network protocols

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL