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

Conversation

wcc526
Copy link

@wcc526 wcc526 commented Jul 16, 2021

Detecting exploits of CVE-2019-5736: runc container breakout.

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

If contributing rules or changes to rules, please make sure to also uncomment one of the following line:

/kind rule-update

/kind rule-create

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area engine

/area rules

/area tests

/area proposals

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Detecting exploits of CVE-2019-5736: runc container breakout.
@poiana
Copy link
Contributor

poiana commented Jul 16, 2021

@wcc526: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@poiana
Copy link
Contributor

poiana commented Jul 16, 2021

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@poiana
Copy link
Contributor

poiana commented Jul 16, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wcc526
To complete the pull request process, please assign mstemm after the PR has been reviewed.
You can assign the PR to them by writing /assign @mstemm in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana requested review from Kaizhe and mstemm July 16, 2021 08:48
@poiana poiana added the size/S label Jul 16, 2021
@leogr
Copy link
Member

leogr commented Jul 19, 2021

Hi @wcc526

Could you sign off your commit, please?

@leogr leogr added this to the 0.31.0 milestone Sep 28, 2021
@poiana
Copy link
Contributor

poiana commented Dec 27, 2021

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@jasondellaluce
Copy link
Contributor

@wcc526 This is a good contribution but you need to sign off your commit, and perhaps rebase the branch too to fix the failed test.

@leogr
Copy link
Member

leogr commented Jan 25, 2022

/milestone 0.32.0

@poiana poiana modified the milestones: 0.31.0, 0.32.0 Jan 25, 2022
@poiana
Copy link
Contributor

poiana commented Feb 24, 2022

Stale issues rot after 30d of inactivity.

Mark the issue as fresh with /remove-lifecycle rotten.

Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle rotten

@poiana
Copy link
Contributor

poiana commented Mar 26, 2022

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community.
/close

@poiana poiana closed this Mar 26, 2022
@poiana
Copy link
Contributor

poiana commented Mar 26, 2022

@poiana: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jasondellaluce
Copy link
Contributor

/reopen

/remove-lifecycle rotten

@poiana poiana reopened this Mar 27, 2022
@poiana
Copy link
Contributor

poiana commented Mar 27, 2022

@jasondellaluce: Reopened this PR.

In response to this:

/reopen

/remove-lifecycle rotten

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@leogr
Copy link
Member

leogr commented May 25, 2022

/milestone 0.33.0

@poiana poiana modified the milestones: 0.32.0, 0.33.0 May 25, 2022
@darryk10
Copy link
Contributor

darryk10 commented Jun 27, 2022

Hi @wcc526 Thanks for your PR :) For sure it's addressing a specific security use case which is great even though it's related to a 3+ years old vulnerability which has been patched in docker (and others) time ago. For sure this is an abnormal behaviour so I'm currently testing the rule to evaluate the false false positives due to the open_write.

Copy link
Contributor

@darryk10 darryk10 left a comment

Choose a reason for hiding this comment

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

Hi @wcc526 do you mind have a look at the proposed changes.
Thanks

@@ -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.

- 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?

open_write and (fd.name=/proc/self/exe or fd.name startswith /proc/self/fd/) and not docker_procs and container
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.

@leogr
Copy link
Member

leogr commented Sep 2, 2022

The PR author seems to be unresponsive.
Would anyone else rework this and open a new PR?
@darryk10 ?

/milestone 0.34.0

@poiana poiana modified the milestones: 0.33.0, 0.34.0 Sep 2, 2022
@darryk10
Copy link
Contributor

darryk10 commented Sep 2, 2022

@leogr I'll rework that and open a new PR :)

@darryk10
Copy link
Contributor

darryk10 commented Sep 2, 2022

@leogr here is the new #2188.
Thanks

@darryk10
Copy link
Contributor

darryk10 commented Nov 4, 2022

@leogr @jasondellaluce I think we can close this PR since already merged here #2188

@jasondellaluce
Copy link
Contributor

/close

@poiana poiana closed this Nov 4, 2022
@poiana
Copy link
Contributor

poiana commented Nov 4, 2022

@jasondellaluce: Closed this PR.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants