System Network Discovery - Linux
A Sigma rule for process creation on Linux, by Ömer Günal and remotephone, oscd.community.
informational 1 ATT&CK technique 9 programs it names 170 everyday examples trip it
What it looks for
detection:
selection_cli:
CommandLine|contains: '/etc/resolv.conf'
selection_img:
Image|endswith:
- '/firewall-cmd'
- '/ufw'
- '/iptables'
- '/netstat'
- '/ss'
- '/ip'
- '/ifconfig'
- '/systemd-resolve'
- '/route'
condition: 1 of 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 Ömer Günal and remotephone, 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 :443IdentifyView all available firewall zones and rules in their runtime configuration state on the page for firewall-cmd
firewall-cmd --list-all-zonesIdentifyPermanently move the interface into the block zone, effectively blocking all communication on the page for firewall-cmd
firewall-cmd --permanent --zone block --change-interface enp1s0IdentifyPermanently open the port for a service in the specified zone (like port 443 when in the public zone) on the page for firewall-cmd
firewall-cmd --permanent --zone public --add-service httpsIdentifyPermanently close the port for a service in the specified zone (like port 80 when in the public zone) on the page for firewall-cmd
firewall-cmd --permanent --zone public --remove-service httpIdentifyPermanently forward a port for incoming packets in the specified zone (like port 443 to 8443 when entering the public zone) on the page for firewall-cmd
firewall-cmd --permanent --zone public --add-rich-rule 'rule family "ipv4" forward-port port "443" protocol "udp" to-port "8443"'IdentifyReload firewalld to lose any runtime changes and force the permanent configuration to take effect immediately on the page for firewall-cmd
firewall-cmd --reloadIdentifyAnd 158 more examples on CmdID’s program pages.
The commands documented for ip, ss, systemd-resolve trip it too: each is on its program’s page, read by CmdID.