I've got a web page PHP script which runs p7zip on the server:
This passes a user supplied password for encrypting their uploaded files.
Secondly the password is then emailed via PHP to the recipient.
What are the possible locations the password could be stored?
I did a grep -r "Passw0rd" /var/log/* nothing found.
Nothing in bash history either.
Dist is opensuse.
Many thanks!
As this is being passed on the command-line, it's going to be ephemerally stored in the
/proc/
filesystem. Anyone who has a local account can get a list of the running processes and their command-line arguments.Which gives you a string. An example:
Which translates to:
The
cmdline
pseudofile is world-readable, though it is only present when the process is actually running. These are visible intop
after pressing thec
key.Some programs do manipulate that string so it isn't representative of what's actually running, though I don't know if php is one that allows such things.