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

double qoute in rule's condition is not working as expected #1859

Open
Tracked by #3148
developer-guy opened this issue Jan 19, 2022 · 29 comments
Open
Tracked by #3148

double qoute in rule's condition is not working as expected #1859

developer-guy opened this issue Jan 19, 2022 · 29 comments
Assignees
Milestone

Comments

@developer-guy
Copy link

Describe the bug

We use Falco custom rules defined in the Cloud Native Security Hub. For example, we noticed that there is a rule defined for CVE-2019-5736 contains a list of binary names to bypass Falco rules like the following:

items: [dockerd, containerd-shim, "runc:[1:CHILD]"]

These are the proc.name's.

We've fixed it by adding an and condition to the rule.

and proc.name=runc\:\[1\:CHILD\]

When a proc.name escaping the special character such as ", Falco couldn't apply the rule against it and triggers the rule which it shouldn't.

How to reproduce it

Apply the following rule I mentioned above and see it triggers an alert based on that rule even proc.name field equals "runc:[1:CHILD]".

Expected behaviour

It should not trigger an alert

Screenshots

`falco-d2lgx falco {"priority":"Critical","rule":"Modify container entrypoint (CVE-2019-5736)","source":"syscall","tags":[],"time":"2022-01-19T10:51:15.706952699Z", "output_fields": {"container.id":"3ae6b31f8538","evt.time":1642589475706952699,"fd.name":"/proc/self/fd/5","k8s.ns.name":null,"k8s.pod.name":null,"proc.exeline":"runc init","proc.name":"runc:[1:CHILD]"}}`

Environment

  • Falco version: 0.30.0
  • Falco Chart version: 1.16.3
  • System info:
  • Cloud provider or hardware configuration:
  • OS:
  • Kernel:
  • Installation method: Kubernetes

Additional context

@developer-guy
Copy link
Author

@leogr
Copy link
Member

leogr commented Jan 20, 2022

Please note that the Cloud Native Security Hub is not maintained anymore.

Interesting issue anyway. I will take a look! Thank you for having reported it.

@poiana
Copy link
Contributor

poiana commented Apr 20, 2022

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

@leogr
Copy link
Member

leogr commented Apr 20, 2022

/remove-lifecycle stale
/milestone 0.32.0

@poiana poiana added this to the 0.32.0 milestone Apr 20, 2022
@jasondellaluce
Copy link
Contributor

/remove-milestone 0.32.0

/milestone 0.33.0

I fully acknowledge that string escaping is an issue in the Rule Engine. In Falco 0.32, we had many structural refactorings in it, but we aimed to not introduce any breaking changes due to the limited time window. Fixing this is in the roadmap but would mean breaking many existing rulesets, which in turn would mean providing migration guidelines/tools. I personally aim for this for Falco 0.33! In the meanwhile, Falco 0.32 fixes many other bugs in the Falco Engine and the rule loader 👉🏼 #1966

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

poiana commented Aug 24, 2022

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

@leogr
Copy link
Member

leogr commented Aug 24, 2022

/remove-lifecycle stale

@jasondellaluce
Copy link
Contributor

/remove-milestone 0.33.0

/milestone 0.34.0

@poiana poiana modified the milestones: 0.33.0, 0.34.0 Oct 3, 2022
@poiana
Copy link
Contributor

poiana commented Jan 1, 2023

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

@Andreagit97
Copy link
Member

/remove-lifecycle stale

@jasondellaluce
Copy link
Contributor

/milestone 0.35.0

@poiana poiana modified the milestones: 0.34.0, 0.35.0 Jan 10, 2023
@poiana
Copy link
Contributor

poiana commented Apr 10, 2023

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

@Andreagit97
Copy link
Member

/remove-lifecycle stale

@jasondellaluce
Copy link
Contributor

/assign

@Andreagit97
Copy link
Member

/remove-lifecycle rotten

@poiana
Copy link
Contributor

poiana commented Jan 12, 2024

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

@leogr
Copy link
Member

leogr commented Jan 12, 2024

/remove-lifecycle stale

@poiana
Copy link
Contributor

poiana commented Apr 11, 2024

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

@leogr
Copy link
Member

leogr commented Apr 12, 2024

/remove-lifecycle stale

@poiana
Copy link
Contributor

poiana commented Jul 11, 2024

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

@Andreagit97
Copy link
Member

/remove-lifecycle rotten

@leogr leogr modified the milestones: TBD, 1.0.0 Jul 18, 2024
@leogr
Copy link
Member

leogr commented Jul 18, 2024

/remove-lifecycle stale
/assign

@poiana
Copy link
Contributor

poiana commented Oct 16, 2024

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

@leogr
Copy link
Member

leogr commented Oct 17, 2024

/remove-lifecycle stale

@poiana
Copy link
Contributor

poiana commented Jan 15, 2025

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

@leogr
Copy link
Member

leogr commented Jan 16, 2025

/remove-lifecycle stale

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

No branches or pull requests

5 participants