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: improve rancher macro #652

Merged
merged 2 commits into from
Jun 7, 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
23 changes: 18 additions & 5 deletions rules/falco_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,10 @@
condition: (proc.cmdline startswith "java LiveUpdate" and fd.name in (/etc/liveupdate.conf, /etc/Product.Catalog.JavaLiveUpdate))

- macro: rancher_agent
condition: (proc.name = agent and container.image.repository = rancher/agent)
condition: (proc.name=agent and container.image.repository contains "rancher/agent")

- macro: rancher_network_manager
condition: (proc.name=rancher-bridge and container.image.repository contains "rancher/network-manager")

- macro: sosreport_writing_files
condition: >
Expand Down Expand Up @@ -1040,13 +1043,21 @@
and fd.name startswith "/etc/dd-agent")

- macro: rancher_writing_conf
condition: (((proc.name=healthcheck and container.image.repository contains "rancher/healthcheck") or
(proc.name=lb-controller and container.image.repository contains "rancher/lb-service-haproxy") or
(proc.name=rancher-dns and container.image.repository contains "rancher/dns")) and
condition: ((proc.name in (healthcheck, lb-controller, rancher-dns)) and
(container.image.repository contains "rancher/healthcheck" or
container.image.repository contains "rancher/lb-service-haproxy" or
container.image.repository contains "rancher/dns") and
(fd.name startswith "/etc/haproxy" or fd.name startswith "/etc/rancher-dns"))

- macro: rancher_writing_root
condition: (proc.name=rancher-metadat and container.image.repository contains "rancher/metadata" and fd.name startswith "/answers.json")
condition: (proc.name=rancher-metadat and
fntlnz marked this conversation as resolved.
Show resolved Hide resolved
(container.image.repository contains "rancher/metadata" or container.image.repository contains "rancher/lb-service-haproxy") and
fd.name startswith "/answers.json")

- macro: checkpoint_writing_state
condition: (proc.name=checkpoint and
container.image.repository contains "coreos/pod-checkpointer" and
fd.name startswith "/etc/kubernetes")

- macro: jboss_in_container_writing_passwd
condition: >
Expand Down Expand Up @@ -1231,6 +1242,7 @@
and not openshift_writing_conf
and not keepalived_writing_conf
and not rancher_writing_conf
and not checkpoint_writing_state
and not jboss_in_container_writing_passwd
and not etcd_manager_updating_dns

Expand Down Expand Up @@ -1474,6 +1486,7 @@
and not java_running_sdjagent
and not kubelet_running_loopback
and not rancher_agent
and not rancher_network_manager
output: >
Namespace change (setns) by unexpected program (user=%user.name command=%proc.cmdline
parent=%proc.pname %container.info)
Expand Down