Get Environment Variable memory Address
Date: December 4, 2014
Categories: Security
some time u put the shellcode inside the environment and u will need the address of it to build ur payload
here is a simple C code to get the address
1 2 3 4 5 6 7 8 9 |
1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main(int argc, char *argv[]) 5 { 6 char *nix = getenv("NIX"); 7 printf("%p\n", nix); 8 return 0; 9 } |
An impressive share, I siplmy given this onto a colleague who was doing slightly analysis on this. And he in truth purchased me breakfast as a result of I discovered it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to debate this, I really feel strongly about it and love studying more on this topic. If potential, as you turn out to be experience, would you thoughts updating your weblog with extra details? It’s extremely helpful for me. Huge thumb up for this blog post!