-
Notifications
You must be signed in to change notification settings - Fork 71
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
new(rules): introduce rule to detect drop and execute pattern in cont… #20
new(rules): introduce rule to detect drop and execute pattern in cont… #20
Conversation
@loresuso: The label(s) In response to this:
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 am putting this on wip because it still needs some more testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@loresuso it goes without saying what a game changer this rule is. Knocking out an entire class of vulnerabilities in one simple rule is 🔥 !!! And our journey won't end here 😉 .
Also thanks for adding limitations into the desc, as also bind mounts wouldn't be on the upper layer.
3d93fa8
to
1f2643a
Compare
rules/falco_rules.yaml
Outdated
Detect if an executable not belonging to the base image of a container is being executed. | ||
The drop and execute pattern can be observed very often after an attacker gained an initial foothold. | ||
is_exe_upper_layer filter field only applies for container runtimes that use overlayfs as union mount filesystem. | ||
condition: spawned_process and container and proc.is_exe_upper_layer=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! @loresuso you should write a blog about this rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Kaizhe, really appreciated! 🙏
Yes, I was thinking about it, I will definitely do it!
The drop and execute pattern can be observed very often after an attacker gained an initial foothold. | ||
is_exe_upper_layer filter field only applies for container runtimes that use overlayfs as union mount filesystem. | ||
condition: spawned_process and container and proc.is_exe_upper_layer=true | ||
output: > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the output is a bit too much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would you drop from here?
…ainers Signed-off-by: Lorenzo Susini <[email protected]>
1f2643a
to
4019073
Compare
Signed-off-by: Lorenzo Susini <[email protected]>
e9d9627
to
e0e74cb
Compare
Signed-off-by: Lorenzo Susini <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
LGTM label has been added. Git tree hash: 32c04abde9da8e38f80376bca3bab474e86b7081
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, loresuso The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This is an incredibly feat @loresuso ! Nice work! |
… new binary in container` Rule was contributed by Lorenzo Susini in #20. Co-authored-by: Lorenzo Susini <[email protected]> Signed-off-by: Jason Dellaluce <[email protected]>
… new binary in container` Rule was contributed by Lorenzo Susini in #20. Co-authored-by: Lorenzo Susini <[email protected]> Signed-off-by: Jason Dellaluce <[email protected]>
… new binary in container` Rule was contributed by Lorenzo Susini in #20. Co-authored-by: Lorenzo Susini <[email protected]> Signed-off-by: Jason Dellaluce <[email protected]>
… new binary in container` Rule was contributed by Lorenzo Susini in #20. Co-authored-by: Lorenzo Susini <[email protected]> Signed-off-by: Jason Dellaluce <[email protected]>
…ainers
Signed-off-by: Lorenzo Susini [email protected]
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area rules
What this PR does / why we need it:
Moving the discussion here from falcosecurity/falco#2306
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: