系统二进制文件移动或复制

编辑

此规则监控系统二进制文件的复制或移动。攻击者可能会复制/移动并重命名系统二进制文件以逃避检测。将系统二进制文件复制到不同位置的情况不应经常发生,因此如果发生,应调查该活动。

规则类型: eql

规则索引:

  • logs-endpoint.events.file*

严重性: 中

风险评分: 47

运行频率: 5 分钟

搜索索引起始时间: now-9m (日期数学格式,另请参阅 额外的回溯时间)

每次执行的最大告警数: 100

参考资料:

标签:

  • 域:端点
  • 操作系统:Linux
  • 用例:威胁检测
  • 策略:防御规避
  • 数据源:Elastic Defend

版本: 13

规则作者:

  • Elastic

规则许可证: Elastic License v2

设置

编辑

设置

此规则需要来自 Elastic Defend 的数据。

Elastic Defend 集成设置

Elastic Defend 使用 Fleet 集成到 Elastic Agent 中。配置后,该集成允许 Elastic Agent 监控主机上的事件并将数据发送到 Elastic Security 应用程序。

先决条件

  • Elastic Defend 需要 Fleet。
  • 要配置 Fleet Server,请参阅文档

应执行以下步骤,以便在 Linux 系统上添加 Elastic Defend 集成

  • 转到 Kibana 主页,然后单击“添加集成”。
  • 在查询栏中,搜索“Elastic Defend”,然后选择该集成以查看有关它的更多详细信息。
  • 单击“添加 Elastic Defend”。
  • 配置集成名称,并可选择添加描述。
  • 选择要保护的环境类型,即“传统端点”或“云工作负载”。
  • 选择配置预设。每个预设都带有 Elastic Agent 的不同默认设置,您可以通过配置 Elastic Defend 集成策略来进一步自定义这些设置。帮助指南
  • 我们建议选择“完整 EDR(端点检测和响应)”作为配置设置,该设置提供“所有事件;所有预防”。
  • 在“新代理策略名称”中输入代理策略的名称。如果已经存在其他代理策略,则可以单击“现有主机”选项卡并选择现有策略。有关 Elastic Agent 配置设置的更多详细信息,请参阅帮助指南
  • 单击“保存并继续”。
  • 要完成集成,请选择“将 Elastic Agent 添加到您的主机”,然后继续下一部分以在您的主机上安装 Elastic Agent。有关 Elastic Defend 的更多详细信息,请参阅帮助指南

规则查询

编辑
file where host.os.type == "linux" and event.type == "change" and event.action == "rename" and process.name != null and
file.Ext.original.path : (
  "/bin/*", "/usr/bin/*", "/usr/local/bin/*", "/sbin/*", "/usr/sbin/*", "/usr/local/sbin/*"
) and not (
  process.executable in (
    "/bin/dpkg", "/usr/bin/dpkg", "/bin/dockerd", "/usr/bin/dockerd", "/usr/sbin/dockerd", "/bin/microdnf",
    "/usr/bin/microdnf", "/bin/rpm", "/usr/bin/rpm", "/bin/snapd", "/usr/bin/snapd", "/bin/yum", "/usr/bin/yum",
    "/bin/dnf", "/usr/bin/dnf", "/bin/podman", "/usr/bin/podman", "/bin/dnf-automatic", "/usr/bin/dnf-automatic",
    "/bin/pacman", "/usr/bin/pacman", "/usr/bin/dpkg-divert", "/bin/dpkg-divert", "/sbin/apk", "/usr/sbin/apk",
    "/usr/local/sbin/apk", "/usr/bin/apt", "/usr/sbin/pacman", "/bin/podman", "/usr/bin/podman", "/usr/bin/puppet",
    "/bin/puppet", "/opt/puppetlabs/puppet/bin/puppet", "/usr/bin/chef-client", "/bin/chef-client",
    "/bin/autossl_check", "/usr/bin/autossl_check", "/proc/self/exe", "/dev/fd/*",  "/usr/bin/pamac-daemon",
    "/bin/pamac-daemon", "/usr/lib/snapd/snapd", "/usr/local/bin/dockerd", "/usr/libexec/netplan/generate",
    "/usr/bin/update-alternatives", "/bin/update-alternatives", "/usr/sbin/update-alternatives",
    "/sbin/update-alternatives", "/usr/bin/pip3", "/bin/pip3", "/usr/local/bin/pip3", "/usr/local/bin/node",
    "/bin/node", "/usr/bin/node", "/sbin/apk", "/usr/sbin/apk", "/usr/local/sbin/apk", "/usr/bin/pip", "/bin/pip",
    "/usr/local/bin/pip", "/usr/libexec/platform-python", "/usr/bin/platform-python", "/bin/platform-python",
    "/usr/lib/systemd/systemd", "/usr/sbin/sshd", "/sbin/sshd", "/usr/local/sbin/sshd", "/usr/sbin/crond", "/sbin/crond",
    "/usr/local/sbin/crond", "/usr/sbin/gdm"
  ) or
  process.name like (
    "python*", "packagekitd", "systemd", "ln", "platform-python", "dnf_install", "runc", "apt-get", "ssm-agent-worker",
    "convert-usrmerge", "updatenow.static-cpanelsync", "apk", "exe", "php", "containerd-shim-runc-v2", "dpkg", "sed",
    "platform-python*", "gedit", "crond", "sshd", "ruby", "sudo", "chainctl", "update-alternatives", "pip*"
  ) or
  file.Ext.original.path : (
    "/bin/*.tmp", "/usr/bin/*.tmp", "/usr/local/bin/*.tmp", "/sbin/*.tmp", "/usr/sbin/*.tmp", "/usr/local/sbin/*.tmp"
  ) or
  file.extension in ("swp", "swpx", "swx", "dpkg-remove") or
  file.Ext.original.extension == "dpkg-new" or
  process.executable : ("/nix/store/*", "/var/lib/dpkg/*", "/tmp/vmis.*", "/snap/*", "/dev/fd/*") or
  process.executable == null or
  (process.name == "sed" and file.name : "sed*") or
  (process.name == "perl" and file.name : "e2scrub_all.tmp*")
)

框架: MITRE ATT&CKTM