falcosecurity / rules

Falco rule repository
https://falcosecurity.github.io/rules/
Apache License 2.0
91 stars 64 forks source link

cleanup(rules): re-balance rules, bump several rules to maturity_incubating #140

Closed incertum closed 10 months ago

incertum commented 10 months ago

What type of PR is this?

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

/kind feature

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

Any specific area of the project related to this PR?

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

/area rules

/area registry

/area build

/area documentation

Proposed rule maturity level

Uncomment one (or more) /area <> lines (only for PRs that add or modify rules):

/area maturity-stable

/area maturity-incubating

/area maturity-sandbox

/area maturity-deprecated

What this PR does / why we need it:

Proposing to re-balance the following rules and assign maturity_incubating.

Execution from /dev/shm 

-> Complementing "Detect release_agent File Container Escapes"

Launch Suspicious Network Tool in Container
Launch Suspicious Network Tool on Host
Launch Ingress Remote File Copy Tools in Container

-> Complementing "Netcat Remote Code Execution in Container" or "Redirect STDOUT/STDIN to Network Connection in Container"

Create files below dev
Read ssh information 

-> Complementing rules around reading sensitive files from the /etc directory

Contact EC2 Instance Metadata Service From Container
Contact cloud metadata service from container

-> Complementing "Contact K8S API Server From Container", "Launch Excessively Capable Container", ...

Schedule Cron Jobs
System procs network activity
Unexpected UDP Traffic
User mgmt binaries
Program run with disallowed http proxy env

-> Of general interest, complementing "Run shell untrusted" and the like from the existing stable and incubating rules

Which issue(s) this PR fixes:

https://github.com/falcosecurity/rules/issues/126

Fixes #

Special notes for your reviewer:

github-actions[bot] commented 10 months ago

Rules files suggestions

falco_rules.yaml

Comparing 643e7ba2f281a739637998841230201a17aa6d77 with latest tag falco-rules-1.0.1

Major changes:

Patch changes:

darryk10 commented 10 months ago

Hi @incertum just a quick question/comment: Looking at the maturity level, the maturity_incubation rules should be set as disabled by default. However I see rules like Update Package Repository, Write below etc, Launch Sensitive Mount Container and others still enabled. If we decide to upgrade the maturity level we should also disable them by default. In general I agree with the change and all the rules in the PR are stable and in the ruleset since a lot of time.

incertum commented 10 months ago

Hi @incertum just a quick question/comment: Looking at the maturity level, the maturity_incubation rules should be set as disabled by default.

We need to update the document as with the intention of splitting the rules, disabled now means we don't ship them by default. Taking a note of that in the tracking issue.

However I see rules like Update Package Repository, Write below etc, Launch Sensitive Mount Container and others still enabled. If we decide to upgrade the maturity level we should also disable them by default. In general I agree with the change and all the rules in the PR are stable and in the ruleset since a lot of time.

Thank you and agreed, I have removed them from the upgrade for now.

github-actions[bot] commented 10 months ago

Rules files suggestions

falco_rules.yaml

Comparing 3317ef20fa63916f1063352e96a51aa2551e0ea3 with latest tag falco-rules-1.0.1

Major changes:

Patch changes:

leogr commented 10 months ago

We need to update the document as with the intention of splitting the rules, disabled now means we don't ship them by default. Taking a note of that in the tracking issue.

:+1:

poiana commented 10 months ago

LGTM label has been added.

Git tree hash: b322c83e6fb512fb030aca7dfdaffdc8d48f31e2

poiana commented 10 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: darryk10, incertum, leogr

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: - ~~[OWNERS](https://github.com/falcosecurity/rules/blob/main/OWNERS)~~ [incertum,leogr] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment