Suspicious File Creation in /etc for Persistence

edit

Suspicious File Creation in /etc for Persistence

edit

Detects the manual creation of files in specific etc directories, via user root, used by Linux malware to persist and elevate privileges on compromised systems. File creation in these directories should not be entirely common and could indicate a malicious binary or script installing persistence for long term access.

Rule type: eql

Rule indices:

  • logs-*

Severity: medium

Risk score: 80

Runs every: 5 minutes

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References:

Tags:

  • Elastic
  • Host
  • Linux
  • Threat Detection
  • Persistence
  • Orbit
  • Lightning Framework Added (Elastic Stack release): 8.4.0

Last modified (Elastic Stack release): 8.4.0

Rule authors: Elastic

Rule license: Elastic License v2

Rule query

edit
file where event.action == "creation" and user.name == "root" and
file.path : ("/etc/ld.so.conf.d/*", "/etc/cron.d/*",
"/etc/sudoers.d/*", "/etc/rc.d/init.d/*", "/etc/systemd/system/*") and
not process.executable : ("*/dpkg", "*/yum", "*/apt", "*/dnf",
"*/systemd")

Threat mapping

edit

Framework: MITRE ATT&CKTM