Elastic Defend high stable eql

Scheduled Job Executing Binary in Unusual Location

This rule detects the systemd and cron process executing a binary in an unusual location. This behavior is commonly seen in malware that is attempting to evade detection by persisting as a system service or a cron job, executing a backdoor in non-standard locations.

View Source

Detection Logic

process where event.type == "start" and event.action == "exec" and (
  (process.parent.name == "systemd" and process.args like~ (
    "/boot/*", "/dev/shm/*", "/etc/cron.*/*", "/etc/update-motd.d/*", "/run/*", "/var/tmp/*"
  ) and process.args_count == 1) or
  (process.parent.name in ("cron", "crond") and process.name in (
    "bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish"
    ) and process.args == "-c" and process.args like~ (
    "/boot/*", "/dev/shm/*", "/etc/update-motd.d/*", "/run/*", "/var/tmp/*"
    )
  )
) and not (
  process.command_line in (
    "sh -c /usr/lib/rsyslog/rsyslog-rotate logrotate_script /var/log/syslog",
    "/bin/sh -c /var/tmp/dionk/tftpboot_cleanup"
  ) or
  process.command_line like~ "*/etc/cron.daily/*" or
  process.args like~ "/run/jaws-ansible-processors/pcaps/pcap_processor.sh*" or
  process.executable like "/nix/store/*/bin/.Hyprland-wrapped"
)

Field Validations

Loading…

Comments (0)

Loading comments...