- Experimental purpose.
- Peek(Read) current environment variables in a arbitrary process.
- [WIP] Poke(Overwrite) environment variables in a arbitrary process.
You can do the same things more easily/safely by using gdb.
- Specify a target process as the tracee by pid.
- Search location for libc and __environ of the tracee.
- Exec Ptrace Attach to the tracee.
- By executing Ptrace Peek, read and follow pointers, and read environment variables.
- [WIP] By executing Ptrace Peek, overwrite environment variables.
- Peek environment variables.
$ peek <pid>
- [WIP] Poke environment variables.
$ peek <pid> <key> <value>