falcosecurity / rules

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

new(rules): Exfiltrating Artifacts via Kubernetes Control Plane #139

Closed incertum closed 9 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:

Many of the existing rules focus on sensitive files in the traditional Linux sense, which might not align well with containerized applications.

Moreover, exfiltrating artifacts from for example Kubernetes goes beyond just the usual ways of malware, interactive access or RCE. It also involves the control plane, which attackers can target if they've gained unauthorized access, such as through stolen credentials. For instance, they might use commands like kubectl cp. However, this kind of activity isn't expected to be the norm in production settings. This presents an opportunity to create a broad rule that can catch such behavior without having to individually profile application-specific secrets or artifacts that attackers might try to lift from the container's file system, if applicable.

See https://github.com/falcosecurity/rules/issues/138.

This new rule could not only benefit from feedback, but also expanded testing.

@darryk10 @loresuso @LucaGuerra

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

poiana commented 10 months ago

@incertum: The label(s) area/maturity-incubating cannot be applied, because the repository doesn't have them.

In response to [this](https://github.com/falcosecurity/rules/pull/139): > > >**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](https://github.com/falcosecurity/rules/blob/main/CONTRIBUTING.md#maturity-levels)** > >> 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**: > >Many of the existing rules focus on sensitive files in the traditional Linux sense, which might not align well with containerized applications. > >Moreover, exfiltrating artifacts from for example Kubernetes goes beyond just the usual ways of malware, interactive access or RCE. It also involves the control plane, which attackers can target if they've gained unauthorized access, such as through stolen credentials. For instance, they might use commands like `kubectl cp`. However, this kind of activity isn't expected to be the norm in production settings. This presents an opportunity to create a broad rule that can catch such behavior without having to individually profile application-specific secrets or artifacts that attackers might try to lift from the container's file system, if applicable. > >See https://github.com/falcosecurity/rules/issues/138. > >This new rule could not only benefit from feedback, but also expanded testing. > >@darryk10 @loresuso @LucaGuerra > >**Which issue(s) this PR fixes**: > > > >Fixes # > >**Special notes for your reviewer**: > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
github-actions[bot] commented 10 months ago

Rules files suggestions

falco_rules.yaml

Comparing 60ca6012d9daefdc6be7913ec425a5806561ed7e with latest tag falco-rules-1.0.1

Major changes:

Minor changes:

Patch changes:

leogr commented 10 months ago

Just added the missing labels

/area maturity-incubating

github-actions[bot] commented 10 months ago

Rules files suggestions

falco_rules.yaml

Comparing f097b8683e7e0bf05000679a139da175bf3fd737 with latest tag falco-rules-1.0.1

Major changes:

Minor changes:

Patch changes:

github-actions[bot] commented 10 months ago

Rules files suggestions

falco_rules.yaml

Comparing f097b8683e7e0bf05000679a139da175bf3fd737 with latest tag falco-rules-1.0.1

Major changes:

Minor changes:

Patch changes:

leogr commented 10 months ago

Hey @incertum

could you rebase this PR, please?

poiana commented 9 months ago

LGTM label has been added.

Git tree hash: 5e8154ca31c0edc8b0be016dcc62475b61085e23

poiana commented 9 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