Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Find out the address of bin/sh?

  1. #1
    Join Date
    Mar 2010
    Beans
    25

    Question Find out the address of bin/sh?

    Hi,

    How to put the string "/bin/sh" into the memory, and get its address. ???
    I read this can be done with the help of Environment variables?
    Am new to linux ,please do explain step by step by procedure...
    Very urgent..pl do help..


    Thank you,
    yasokrish.

  2. #2
    Join Date
    Mar 2010
    Beans
    25

    Question How to find out th address of /bin/sh??

    Hi,

    How to put the string "/bin/sh" into the memory, and get its address. ???
    I read this can be done with the help of Environment variables?
    Am new to linux ,please do explain step by step by procedure...
    Very urgent..pl do help..


    Thank you,
    yasokrish.

  3. #3
    Join Date
    Jun 2008
    Location
    Scotland
    Beans
    280
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to find out th address of /bin/sh??

    First things first, what is this for? Is it a programming problem? If it's a programming issue, which language are you using?

    Please give us more information!

  4. #4
    Join Date
    Mar 2010
    Beans
    25

    Question How to find out the address ?

    Hi,

    How to put the string "/bin/sh" into the memory, and get its address. ???
    I read this can be done with the help of Environment variables?
    Am new to linux ,please do explain step by step by procedure...
    Very urgent..pl do help..for my project?


    Thank you,
    yasokrish.

  5. #5
    Join Date
    Mar 2010
    Beans
    25

    Question How to find out the address ?

    Hi,

    How to put the string "/bin/sh" into the memory, and get its address. ???
    I read this can be done with the help of Environment variables?
    Am new to linux ,please do explain step by step by procedure...
    Very urgent..pl do help..


    Thank you,
    yasokrish.

  6. #6
    Join Date
    Mar 2010
    Beans
    25

    Question Re: How to find out th address of /bin/sh??

    Hi,
    Am doing the project "return to libc attacks"
    I am doing it in C language.


    Thank u,
    yasokrish.

  7. #7
    Join Date
    Mar 2010
    Beans
    25

    Re: How to find out th address of /bin/sh??

    Hi,
    Am doing a project "Return to libc attacks"
    Am doing the project in C programming.

    Thanks,
    Yasokrish

  8. #8
    Join Date
    Nov 2008
    Location
    Massachusetts
    Beans
    434

    Re: How to find out th address of /bin/sh??

    Create an array of eight characters and set its value equal to "/bin/sh\0".

    Print the address by casting the array as an unsigned int and using printf. (Remember that the name A of an array A[] is the same as &A[0].)

    I'm not going to give you the code, but there's the logic.
    Last edited by Chesamo; April 1st, 2010 at 05:58 PM.

  9. #9
    Join Date
    Mar 2010
    Beans
    Hidden!

    Re: Find out the address of bin/sh?

    Code:
    string sh = "/bin/sh";
    string * shPointer = &sh;
    Code:
    Memory address of < /bin/sh >: 0x22ff30

  10. #10
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: How to find out th address of /bin/sh??

    Multiple threads with the same question. Not cool.
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •