在本系列中,运行时威胁检测的事实标准是法尔科我将在一篇文章中介绍一种检测规则。
有关运行时安全性和 Falco 本身的概述博客文章在这里请参阅。
这次介绍的检测规则是“create_files_below_dev”是。
规则说明
- rule: Create files below dev
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 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
and not user_known_create_files_below_dev_activities
output: "File created below /dev by untrusted program (user=%user.name user_loginuid=%user.loginuid command=%proc.cmdline file=%fd.name container_id=%container.id image=%container.image.repository)"
priority: ERROR
tags: [filesystem, mitre_persistence]
规则概述
/devディレクトリ配下に、ファイルが作成されたことを検知します。
/devはLinuxのデバイスファイルが配置されているディレクトリで、一般的にデバイス管理を行うプログラム以外によってファイルが作成されることはありません。
由于该目录在正常使用时很少被用户访问,因此可能会被rootkits等用作文件的隐藏位置,但使用此规则可以检测到。
健康)状况
fd.directory = /dev
/devディレクトリで、
and (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
文件名不以 /dev/tty 开头,
and not user_known_create_files_below_dev_activities
/dev配下でのファイル作成の既知の条件にも合致しない場合
输出
不受信任的程序在 /dev 下创建了一个文件。
%user.name
用户名
%user.loginuid
用户的登录 UID
%proc.cmdline
命令行
%fd.name
文件名
%container.id
容器 ID
%container.image.repository
容器镜像仓库
原创声明:本文系作者授权爱码网发表,未经许可,不得转载;
原文地址:https://www.likecs.com/show-308624381.html