, , ,

Get Environment Variable memory Address

Ahmad Avatar

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 #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 }

 

 

Enjoying this article?

Subscribe to get new posts delivered straight to your inbox. No spam, unsubscribe anytime.

No spam. Unsubscribe anytime.

You may also like

See All Bash →

One response to “Get Environment Variable memory Address”

  1. Javahn Avatar

    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!

Leave a Comment

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.