Everyone knows environment variables (PATH, USER, LOGNAME, etc...) Well you can overwrite these variables (export <VAR>="<new content>") and that can be quite handy with buffer overflows. But what I find hard is after I run a program (say I did a buffer overflow) and I want to find the environment variable USER and it's content in the stack.
I had some piece of code that supposed to get me the address (in hex):
Yeah, it's STS :p But I was passing on the environment variables the wrong way. Once you pass them on correctly (with execve()) they are quite easy to find ;)