Persistence (TA0003)(external, opens in a new tab or window)
Defense Evasion (TA0005)(external, opens in a new tab or window)
endpoint(external, opens in a new tab or window)
sentinel_one_cloud_funnel(external, opens in a new tab or window)
text code block:file where host.os.type == "linux" and event.action in ("rename", "creation") and file.path like ("/usr/lib/python*/site-packages/dnf-plugins/*", "/etc/dnf/plugins/*") and not ( process.executable in ( "/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", "/sbin/apk", "/usr/sbin/apk", "/usr/local/sbin/apk", "/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", "/usr/lib/snapd/snapd", "/usr/local/bin/dockerd", "/usr/libexec/netplan/generate", "./usr/bin/podman", "/usr/bin/dnf5", "/bin/needs-restarting", "/usr/bin/crio", "/usr/bin/insights-client", "/kaniko/executor" ) or file.extension in ("swp", "swpx", "swx") or process.executable : ( "/nix/store/*", "/var/lib/dpkg/*", "/tmp/vmis.*", "/snap/*", "/dev/fd/*", "/usr/lib/*", "/usr/libexec/*", "/etc/kernel/*" ) or process.executable == null or (process.name == "sed" and file.name : "sed*") or (process.name == "perl" and file.name : "e2scrub_all.tmp*") or file.path like~ "/etc/dnf/plugins/.ansible_tmp*" or process.name like~ ("ssm-agent-worker, NinjaOrbit", "python*") )
Install detection rules in Elastic Security
Detect DNF Package Manager Plugin File Creation in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).