Documentation
¶
Index ¶
- Constants
- func CollectLegacyInsecureServices(ctx context.Context) *payload.LegacyInsecureServices
- func CollectListenerPIDs(ctx context.Context) []int32
- func CollectListeners(ctx context.Context, hn *payload.HostNetwork) []payload.Listener
- func CollectServices(ctx context.Context) payload.ServicesBlock
- func CollectTcpWrappersFingerprint(ctx context.Context) *payload.TcpWrappersFingerprint
- func EnrichHostNetwork(ctx context.Context, hn *payload.HostNetwork)
- func ProbeInternetListeners(ctx context.Context, listeners []payload.Listener, hn *payload.HostNetwork) []payload.Listener
Constants ¶
const ModuleName = "network_and_host_firewall"
ModuleName identifies this component module.
Variables ¶
This section is empty.
Functions ¶
func CollectLegacyInsecureServices ¶
func CollectLegacyInsecureServices(ctx context.Context) *payload.LegacyInsecureServices
CollectLegacyInsecureServices reports systemd unit/socket hints and inetd.conf presence.
func CollectListenerPIDs ¶
CollectListenerPIDs returns distinct PIDs that own a TCP LISTEN socket (bounded by maxListeners).
func CollectListeners ¶
CollectListeners lists TCP listeners via gopsutil net.Connections (same idea as psutil net_connections).
func CollectServices ¶
func CollectServices(ctx context.Context) payload.ServicesBlock
CollectServices lists running services: systemd (D-Bus) when pid 1 is systemd, otherwise sysvinit (Debian/Ubuntu-style `service --status-all` parsing).
func CollectTcpWrappersFingerprint ¶
func CollectTcpWrappersFingerprint(ctx context.Context) *payload.TcpWrappersFingerprint
CollectTcpWrappersFingerprint summarizes hosts.allow and hosts.deny (bounded lines).
func EnrichHostNetwork ¶
func EnrichHostNetwork(ctx context.Context, hn *payload.HostNetwork)
EnrichHostNetwork adds resolver snapshot and link-layer flags (IPv6, promiscuous).
func ProbeInternetListeners ¶ added in v0.11.0
func ProbeInternetListeners(ctx context.Context, listeners []payload.Listener, hn *payload.HostNetwork) []payload.Listener
ProbeInternetListeners performs TCP connect probes against internet-exposed listeners via the machine's own public IPs. Only listeners with exposure_risk == "internet_exposed" are probed. The result is a copy of the input slice with WanProbeOpen set.
Types ¶
This section is empty.