pspy tool - Monitor linux processes without root permissions
pspy - unprivileged Linux process snoopingpspy is a command line tool designed to snoop on processes without need for root permissions. It allows you to see commands run by other users, cron jobs, etc. as they execute. Great for enumeration of Linux systems in CTFs. Also great to demonstrate your colleagues why passing secrets as arguments on the command line is a bad idea.
The tool gathers the info from procfs scans. Inotify watchers placed on selected parts of the file system trigger these scans to catch short-lived processes.
DownloadGet the tool onto the Linux machine you want to inspect. First get the binaries. Download the released binaries here:
- 32 bit big, static version:
- 64 bit big, static version:
- 32 bit small version:
- 64 bit small version:
Some complex examples:
# print both commands and file system events and scan procfs every 1000 ms (=1sec) ./pspy64 -pf -i 1000 # place watchers recursively in two directories and non-recursively into a third ./pspy64 -r /path/to/first/recursive/dir -r /path/to/second/recursive/dir -d /path/to/the/non-recursive/dir # disable printing discovered commands but enable file system events ./pspy64 -p=false -f