how safe are environment variables?

  • Thread starter Thread starter perl coder
  • Start date Start date
P

perl coder

Is it possible for a (non-admin) user to somehow retrieve the
environment variables of a running process? (either a service or a
program in use by another user).

I'm mainly concerned about passwords.
 
perl said:
Is it possible for a (non-admin) user to somehow retrieve the
environment variables of a running process? (either a service or a
program in use by another user).

I'm mainly concerned about passwords.

Of a running process or global variables?

Environment variables are not inherently safe.
 
Each process inherits the environmental variables of the
parent that launches it. It then creates its own local
environmental variables. They are invisible to any other
process (unless you manage to write a program that
manages to access the memory space used by another
application). When a process terminates, its environmental
variables die.

You can easily demonstrate this by launching a number
of Command Processors and setting some variables.
 
Back
Top