CmdID

CmdID / Commands

sockstat

List open Internet or UNIX domain sockets. tldr-pages

On Linux, FreeBSD, NetBSD 1 Sigma rule name it

Opens CmdID with your command. It is read in your browser and sent nowhere.

Show information for IPv4 and IPv6 sockets for both listening and connected sockets

sockstatIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Show information for IPv4/IPv6 sockets listening on specific ports using a specific pRotocol

sockstat -4 -l -R tcp -p port1,port2...Identify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Also show connected sockets and unix sockets

sockstat -cuIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Only show sockets of the specified process_id or process

sockstat -P process_idIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Only show sockets of the specified user_id or user

sockstat -U user_idIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Only show sockets of the specified group_id or group

sockstat -G group_idIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

FreeBSD

from tldr-pages, CC BY 4.0

View which users/processes are listening on which ports

sockstat -lIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Show information for IPv4/IPv6 sockets listening on specific ports using a specific Protocol

sockstat -4 -l -P tcp -p port1,port2...Identify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Also show connected sockets, not resolving numeric UIDs to user names and using a wider field size

sockstat -cnwIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Only show sockets that belong to a specific jail ID or name in verbose mode

sockstat -jvIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Display the protocol state and the remote UDP encapsulation port number, if applicable (these are currently only implemented for SCTP and TCP)

sockstat -sUIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Display the Congestion control module and the protocol Stack, if applicable (these are currently only implemented for TCP)

sockstat -CSIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Only show Internet sockets if the local and foreign addresses are not in the loopback network prefix 127.0.0.0/8, or do not contain the IPv6 loopback address ::1

sockstat -LIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Do not show the header (quiet mode), showing unix sockets and displaying the inp_gencnt

sockstat -quiIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

NetBSD

from tldr-pages, CC BY 4.0

List open Internet or UNIX domain sockets. Note: This program is a rewrite for NetBSD 3.0 from FreeBSD's sockstat.

Show information for IPv4, IPv6, and Unix sockets for both listening and connected sockets

sockstatIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Show information for IPv4/IPv6 sockets listening on specific ports using a specific Protocol

sockstat -4 -l -P tcp -p port1,port2...Identify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Also show connected sockets, showing unix sockets

sockstat -cuIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Only show numeric output, without resolving symbolic names for addresses and ports

sockstat -nIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

Only list sockets of the specified address family

sockstat -f inetIdentify

Trips 1 Sigma rule: lowSystem Network Connections Discovery - Linux by Daniil Yugoslavskiy, oscd.community

What detects it

Sigma process creation rules that name sockstat
lowSystem Network Connections Discovery - LinuxDaniil Yugoslavskiy, oscd.community