in reply to Reading streams, perl variables when script is running

On a UNIX/Linux system, anyone who is logged in as root or as the same user that the daemon is running as, can have complete access to the memory of the daemon and can thus (in principle) read the value of any variable. This could be done crudely with hexdump or strings and grep, or more sophisticatedly, by running gdb against the perl process.

Also they can (using strace for example) see all the data that is read from STDIN or any other file handle.

I don't know about Windows, but I would expect similar caveats to apply.

Dave.

  • Comment on Re: Reading streams, perl variables when script is running

Replies are listed 'Best First'.
Re^2: Reading streams, perl variables when script is running
by Corion (Patriarch) on Jan 04, 2014 at 12:03 UTC

    On Windows, it is quite similar, except that there is a separate privilege your user account needs, "Debug Privilege", to attach a debugger to a process not owned by you. As the article says, you can debug your own processes without that.

      Modern Linux also uses such privileges, called capabilities. CAP_SYS_PTRACE lets you trace arbitrary processes. It is also possible to give capabilities to an executable.