Binary Executed from Shared Memory Directory
Description
Identifies the execution of a binary Linux shared memory directories: (/dev/shm/, /run/shm/). This activity is to be considered highly abnormal and should be investigated. Threat actors have placed executables used for persistence on high-uptime servers in these directories as system backdoors. Binaries executed from these directories are memory resident making them harder to detect and allowing them to remain hidden for long periods of time.
Query · eql
process where event.type == "start" and event.action == "exec" and process.executable like ("/dev/shm/*", "/run/shm/*") and
not (
(process.executable like "/dev/shm/gitlab/*" and process.pid == 0) or
(process.executable like "/dev/shm/ansible-tmp*")
)