falcosecurity / rules

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

new(rules): add "Disallowed SSH Connection Non Standard Port" rule #147

Closed incertum closed 1 year ago

incertum commented 1 year 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:

During the latest audit I noticed a major coverage gap in the upstream rules wrt SSH connections. This rule adds yet another detection to the upstream rules to alert on various types of payloads that can be used in command injection attacks that can lead to RCE.

@loresuso @darryk10 @leogr

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

github-actions[bot] commented 1 year ago

Rules files suggestions

falco_rules.yaml

Comparing 8ddd10259d39f329f3cf6b80cde2220127528b81 with latest tag falco-rules-1.0.1

Major changes:

Minor changes:

Patch changes:

poiana commented 1 year ago

LGTM label has been added.

Git tree hash: 311b518002ff43be1da7ad553b6ed066e27de36f

incertum commented 1 year ago

Thanks @darryk10 agreed this one can be bumped to Stable afterwards similarly to how we plan it for the memfd + exec case.

poiana commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

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

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)~~ [Andreagit97,incertum] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment