Renice or Ulimit Execution from Unusual Parent
Description
This rule detects the execution of the renice or ulimit commands from an unusual parent, which are used to change the priority of processes or set resource limits for processes. Threat actors may abuse these commands to change the priority of malicious processes. This is commonly used by miner malware to increase the priority of mining processes to maximize the mining performance.
Query · eql
process where event.type == "start" and event.action == "exec" and (
process.name in ("ulimit", "renice") or (
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and process.args == "-c" and
process.command_line like ("*ulimit*", "*renice*")
)
) and process.parent.executable != null and
(process.parent.executable like ("/tmp/*", "/var/tmp/*", "/dev/shm/*") or process.parent.name like ".*") and
not (
process.parent.command_line in ("/bin/sh /usr/bin/byobu-status tmux_right", "runc init") or
process.parent.executable like (
"/tmp/newroot/*", "/tmp/vmis.*/vmware-installer/vmis-launcher", "/tmp/baum/easybuild/*", "/tmp/wbrashear/easybuild/*",
"/tmp/par-*/temp-*/nbsu"
) or
process.parent.name in ("java", "make", "python3.10.real")
)