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

Update falco_rules.yaml #1694

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 12 additions & 0 deletions rules/falco_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3077,4 +3077,16 @@
# Application rules have moved to application_rules.yaml. Please look
# there if you want to enable them by adding to
# falco_rules.local.yaml.
- list: docker_binaries
items: [dockerd, containerd-shim, "runc:[1:CHILD]"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
items: [dockerd, containerd-shim, "runc:[1:CHILD]"]
items: [dockerd, containerd-shim, "runc:[1:CHILD]", pause]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During the time I tested the rule I've seen some noise generated by proc.name = pause which should be whitelisted.


- macro: docker_procs
condition: proc.name in (docker_binaries)

- rule: Modify Container Entrypoint
desc: Detect file write activities on container entrypoint symlink (/proc/self/exe)
condition: >
open_write and (fd.name=/proc/self/exe or fd.name startswith /proc/self/fd/) and not docker_procs and container
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During the time I tested the rule I also see some noise with proc.cmdline = "runc:[1:CHILD] init". Do you mind add it in the condition?

output: >
%fd.name is open to write by process (%proc.name, %proc.exeline)
priority: WARNING
Copy link
Contributor

@darryk10 darryk10 Jun 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During my tests I saw the rule generating false positives on falcosidekick and argo which are two components which can word together this Falco. As we know the open_write isn't that accurate but it's the only option since we can use the write syscall. However the rule address a CVE and it's a good security use case.
My suggestion is to add the rule to the falco ruleset but with the enabled: false option to disable by default due to the noise that can generate.