Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions rules/falco_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1230,10 +1230,15 @@
tags: [maturity_stable, host, container, network, process, mitre_execution, T1059]

- list: known_memfd_execution_binaries
items: []
items: [runc]

- macro: known_memfd_execution_processes
condition: (proc.name in (known_memfd_execution_binaries))
condition: >
(proc.name in (known_memfd_execution_binaries))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there! thanks for opening the PR.
I am not sure though this will work since:

  • when we execute from memfd, usually we use the proc filesystem reference to the fd to do so. The process name will be a numeric value such as "3"
  • IIRC, Falco doesn't resolve exepath and exe that way
    Possibly, the best option would be to tune the rule by using ancestors information, such as proc.pname and proc.aname

or (proc.pname in (known_memfd_execution_binaries))
or (proc.exepath = "memfd:runc_cloned:/proc/self/exe")
or (proc.exe = "memfd:runc_cloned:/proc/self/exe")


- rule: Fileless execution via memfd_create
desc: >
Expand Down