Unexpected K8s NodePort Connection
Description
Detect attempts to utilize K8s NodePorts from a container. K8s NodePorts are accessible on the eth0 interface of each node, and they facilitate external traffic into a Kubernetes cluster. Attackers could misuse them for unauthorized access. The rule uses default port ranges, but check for custom ranges and make necessary adjustments. Also, consider tuning this rule as needed.
Query · falco
inbound_outbound and container and fd.sport >= 30000 and fd.sport <= 32767 and not nodeport_containers
Rule dependencies
Depends on
-
composes · Falco macro
containerA shared condition, not a detection — not indexed on this site. -
composes · Falco macro
inbound_outboundA shared condition, not a detection — not indexed on this site. -
composes · Falco macro
nodeport_containersA shared condition, not a detection — not indexed on this site.
Analyst notes
Unexpected K8s NodePort Connection | connection=%fd.name lport=%fd.lport rport=%fd.rport fd_type=%fd.type fd_proto=%fd.l4proto evt_type=%evt.type user=%user.name user_uid=%user.uid user_loginuid=%user.loginuid process=%proc.name proc_exepath=%proc.exepath parent=%proc.pname command=%proc.cmdline terminal=%proc.tty