Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rule update: add exception for rule change thread namespace #678

Merged
merged 1 commit into from
Jun 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions rules/falco_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
items: [docker, dockerd, exe, docker-compose, docker-entrypoi, docker-runc-cur, docker-current, dockerd-current]

- list: k8s_binaries
items: [hyperkube, skydns, kube2sky, exechealthz, weave-net, loopback, bridge, openshift-sdn]
items: [hyperkube, skydns, kube2sky, exechealthz, weave-net, loopback, bridge, openshift-sdn, openshift]

- list: lxd_binaries
items: [lxd, lxcfs]
Expand Down Expand Up @@ -243,7 +243,7 @@
# A canonical set of processes that run other programs with different
# privileges or as a different user.
- list: userexec_binaries
items: [sudo, su, suexec, critical-stack]
items: [sudo, su, suexec, critical-stack, dzdo]

- list: known_setuid_binaries
items: [
Expand Down Expand Up @@ -1470,14 +1470,20 @@
- list: user_known_change_thread_namespace_binaries
items: []

- list: network_plugin_binaries
items: [aws-cni, azure-vnet]

- macro: calico_node
condition: (container.image.repository endswith calico/node and proc.name=calico-node)

- rule: Change thread namespace
desc: >
an attempt to change a program/thread\'s namespace (commonly done
as a part of creating a container) by calling setns.
condition: >
evt.type = setns
and not proc.name in (docker_binaries, k8s_binaries, lxd_binaries, sysdigcloud_binaries,
sysdig, nsenter, calico, oci-umount)
sysdig, nsenter, calico, oci-umount, network_plugin_binaries)
and not proc.name in (user_known_change_thread_namespace_binaries)
and not proc.name startswith "runc"
and not proc.cmdline startswith "containerd"
Expand All @@ -1487,6 +1493,7 @@
and not kubelet_running_loopback
and not rancher_agent
and not rancher_network_manager
and not calico_node
output: >
Namespace change (setns) by unexpected program (user=%user.name command=%proc.cmdline
parent=%proc.pname %container.info container_id=%container.id image=%container.image.repository)
Expand Down