rule(Create files below dev): correct condition to catch openat

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
This commit is contained in:
Leonardo Grasso 2020-06-04 15:58:03 +02:00 committed by poiana
parent a5ce61f03f
commit 578ef7f64d

View File

@ -2238,7 +2238,7 @@
desc: creating any files below /dev other than known programs that manage devices. Some rootkits hide files in /dev. desc: creating any files below /dev other than known programs that manage devices. Some rootkits hide files in /dev.
condition: > condition: >
fd.directory = /dev and fd.directory = /dev and
(evt.type = creat or (evt.type = open and evt.arg.flags contains O_CREAT)) (evt.type = creat or ((evt.type = open or evt.type = openat) and evt.arg.flags contains O_CREAT))
and not proc.name in (dev_creation_binaries) and not proc.name in (dev_creation_binaries)
and not fd.name in (allowed_dev_files) and not fd.name in (allowed_dev_files)
and not fd.name startswith /dev/tty and not fd.name startswith /dev/tty