System Network Connections Discovery - Linux
A Sigma rule for process creation on Linux, by Daniil Yugoslavskiy, oscd.community.
low 1 ATT&CK technique 4 programs it names 37 everyday examples trip it
What it looks for
detection:
selection:
Image|endswith:
- '/lsof'
- '/netstat'
- '/sockstat'
- '/ss'
condition: selection
The rule’s detection, its selections and fields in order of name. The whole rule, with its references and false positives, is on SigmaHQ, by Daniil Yugoslavskiy, oscd.community, under the Detection Rule License 1.1. CmdID evaluates it on a command line alone: a test on what a command line cannot show, such as the parent process or the user, is not met.
Command lines that trip it
Show all TCP sockets connected to the local HTTPS port (443) on the page for ss
ss --tcp src :443IdentifyList files opened by the given command or process on the page for lsof
lsof -c process_or_command_nameIdentifyList files opened by a specific process, given its PID on the page for lsof
lsof -p process_idIdentifyFind the process that is listening on a local IPv6 TCP port and don't convert network or port numbers on the page for lsof
lsof -i6TCP:port -sTCP:LISTEN -n -PIdentifyAnd 25 more examples on CmdID’s program pages.
The commands LOLBAS or GTFOBins documents for ss trip it too: each is on its program’s page, read by CmdID.