Directory traversal monitored file read
Description
Web applications can be vulnerable to directory traversal attacks that allow accessing files outside of the web app's root directory (e.g. Arbitrary File Read bugs). System directories like /etc are typically accessed via absolute paths. Access patterns outside of this (here path traversal) can be regarded as suspicious. This rule includes failed file open attempts.
Query · falco
(open_read or open_file_failed) and (etc_dir or user_ssh_directory or
fd.name startswith /root/.ssh or
fd.name contains "id_rsa")
and directory_traversal and not proc.pname in (shell_binaries)
Rule dependencies
Depends on
-
composes · Falco macro
directory_traversalA shared condition, not a detection — not indexed on this site. -
composes · Falco macro
etc_dirA shared condition, not a detection — not indexed on this site. -
composes · Falco macro
open_file_failedA shared condition, not a detection — not indexed on this site. -
composes · Falco macro
open_readA shared condition, not a detection — not indexed on this site. -
composes · Falco macro
user_ssh_directoryA shared condition, not a detection — not indexed on this site.
Analyst notes
Read monitored file via directory traversal | file=%fd.name fileraw=%fd.nameraw gparent=%proc.aname[2] ggparent=%proc.aname[3] gggparent=%proc.aname[4] 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