Skip to content

Commit

Permalink
new(rules): add rule for detecting fileless execution via memfd_create
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Susini <susinilorenzo1@gmail.com>
  • Loading branch information
loresuso committed Jul 12, 2023
1 parent 4126981 commit 1fdc9da
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions rules/falco_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3416,6 +3416,21 @@
priority: CRITICAL
tags: [container, mitre_persistence, TA0003]

- rule: Fileless execution via memfd_create
desc:
Detect if a binary is executed from memory using the memfd_create technique.
This is a well-known defense evasion technique for executing malware on victim machine without storing payload on disk.
condition: >
spawned_process
and proc.is_exe_from_memfd=true
output: >
Executing binary not part of base image (user=%user.name user_loginuid=%user.loginuid user_uid=%user.uid comm=%proc.cmdline exe=%proc.exe container_id=%container.id
image=%container.image.repository proc.name=%proc.name proc.sname=%proc.sname proc.pname=%proc.pname proc.aname[2]=%proc.aname[2] exe_flags=%evt.arg.flags
proc.exe_ino=%proc.exe_ino proc.exe_ino.ctime=%proc.exe_ino.ctime proc.exe_ino.mtime=%proc.exe_ino.mtime proc.exe_ino.ctime_duration_proc_start=%proc.exe_ino.ctime_duration_proc_start
proc.exepath=%proc.exepath proc.cwd=%proc.cwd proc.tty=%proc.tty container.start_ts=%container.start_ts proc.sid=%proc.sid proc.vpgid=%proc.vpgid evt.res=%evt.res)
priority: CRITICAL
tags: [mitre_defense_evasion, T1620]

# Application rules have moved to application_rules.yaml. Please look
# there if you want to enable them by adding to
# falco_rules.local.yaml.

0 comments on commit 1fdc9da

Please sign in to comment.