Persistence (TA0003)(opens in a new tab or window)
event.category:file and host.os.type:linux and event.type:change and
process.name:(* and not (
dnf or dnf-automatic or dpkg or yum or rpm or yum-cron or anacron or platform-python* or
apk or ansible-admin or systemd or python* or yum or nix-daemon or nix
)
) and
(file.path:(/usr/bin/scp or
/usr/bin/sftp or
/usr/bin/ssh or
/usr/sbin/sshd) or
file.name:libkeyutils.so) and
not process.executable:/usr/share/elasticsearch/*
Install detection rules in Elastic Security
Detect Modification of OpenSSH Binaries 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(opens in a new tab or window).