Skip to content

[Experimental] peek and poke environment variables

License

Notifications You must be signed in to change notification settings

rail44/peke_envs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

peke_envs (peek poke environment variables)

asciicast

Concepts

  • 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.

How it works

  • 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.

Usage

  • Peek environment variables.
$ peek <pid>
  • [WIP] Poke environment variables.
$ peek <pid> <key> <value>

License

MIT

Author

Satoshi Tajima

About

[Experimental] peek and poke environment variables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 90.7%
  • Shell 6.9%
  • Makefile 2.4%