diff --git a/rules/falco_rules.yaml b/rules/falco_rules.yaml index d42394e2dd2..42f2093bfb0 100644 --- a/rules/falco_rules.yaml +++ b/rules/falco_rules.yaml @@ -29,13 +29,13 @@ # condition: (syscall.type=read and evt.dir=> and fd.type in (file, directory)) - macro: open_write - condition: (evt.type=open or evt.type=openat) and evt.is_open_write=true and fd.typechar='f' and fd.num>=0 + condition: evt.type in (open,openat,openat2) and evt.is_open_write=true and fd.typechar='f' and fd.num>=0 - macro: open_read - condition: (evt.type=open or evt.type=openat) and evt.is_open_read=true and fd.typechar='f' and fd.num>=0 + condition: evt.type in (open,openat,openat2) and evt.is_open_read=true and fd.typechar='f' and fd.num>=0 - macro: open_directory - condition: (evt.type=open or evt.type=openat) and evt.is_open_read=true and fd.typechar='d' and fd.num>=0 + condition: evt.type in (open,openat,openat2) and evt.is_open_read=true and fd.typechar='d' and fd.num>=0 - macro: never_true condition: (evt.num=0) @@ -2295,7 +2295,7 @@ desc: creating any files below /dev other than known programs that manage devices. Some rootkits hide files in /dev. condition: > fd.directory = /dev and - (evt.type = creat or ((evt.type = open or evt.type = openat) and evt.arg.flags contains O_CREAT)) + (evt.type = creat or (evt.type in (open,openat,openat2) and evt.arg.flags contains O_CREAT)) and not proc.name in (dev_creation_binaries) and not fd.name in (allowed_dev_files) and not fd.name startswith /dev/tty @@ -2986,7 +2986,7 @@ - rule: Container Drift Detected (open+create) desc: New executable created in a container due to open+create condition: > - evt.type in (open,openat,creat) and + evt.type in (open,openat,openat2,creat) and evt.is_open_exec=true and container and not runc_writing_exec_fifo and diff --git a/test/rules/tagged_rules.yaml b/test/rules/tagged_rules.yaml index de0929a529e..02534424140 100644 --- a/test/rules/tagged_rules.yaml +++ b/test/rules/tagged_rules.yaml @@ -15,7 +15,7 @@ # limitations under the License. # - macro: open_read - condition: (evt.type=open or evt.type=openat) and evt.is_open_read=true and fd.typechar='f' + condition: evt.type in (open,openat,openat2) and evt.is_open_read=true and fd.typechar='f' - rule: open_1 desc: open one