Delete or rename shell history
Description
Detect shell history deletion, frequently used by unsophisticated adversaries to eliminate evidence. Note that it can also trigger when exiting a Terminal shell, such as with kubectl exec, which may introduce some noise.
Query · falco
(modify_shell_history or truncate_shell_history) and not var_lib_docker_filepath and not proc.name in (docker_binaries)
Rule dependencies
Depends on
-
composes · Falco macro
modify_shell_historyA shared condition, not a detection — not indexed on this site. -
composes · Falco macro
truncate_shell_historyA shared condition, not a detection — not indexed on this site. -
composes · Falco macro
var_lib_docker_filepathA shared condition, not a detection — not indexed on this site.
Analyst notes
Shell history deleted or renamed | file=%fd.name name=%evt.arg.name path=%evt.arg.path oldpath=%evt.arg.oldpath evt_type=%evt.type user=%user.name user_uid=%user.uid user_loginuid=%user.loginuid process=%proc.name proc_exepath=%proc.exepath parent=%proc.pname command=%proc.cmdline terminal=%proc.tty