Results 1 to 4 of 4

Thread: Shellcodes: I cannot execute them :(

  1. #1
    Junior Member
    Join Date
    May 2005
    Posts
    5

    Shellcodes: I cannot execute them :(

    Hello everyone,

    I've just started my "buffer overflow study" ... To begin, I thought it was a good idea to compile and understand some generic shellcodes, like whose we find on millw0rm.
    Anyway, I took this one:

    giving me a stupid shell...

    What a surprise when I compiled it and saw that nothing happened ! So why ? I tried to debug it, but without success :/.

    For information, I've GCC i686-pc-linux-gnu-4.1.1, and I compiled my shellcode with

    gcc -o shell shell.c -Wall -g (-pedantic)

    Thank you for your help !

    bulk'

  2. #2
    AO Curmudgeon rcgreen's Avatar
    Join Date
    Nov 2001
    Posts
    2,716
    Code:
    printf("Shellcode lenght=%d\n",strlen(shellcode));
    They misspelled the word "length" LOL
    I came in to the world with nothing. I still have most of it.

  3. #3
    Senior Member
    Join Date
    Dec 2003
    Location
    Pacific Northwest
    Posts
    1,675

    Re: Shellcodes: I cannot execute them :(

    Originally posted here by bulkangel
    ...
    What a surprise when I compiled it and saw that nothing happened ! So why ? I tried to debug it, but without success :/.
    Don't be surprised by that. It is a fairly common practice to toss errors in, remove lines of code, etc. Helps reduce the likelyhood that the skiddies can just c/p. In this case though, it looks like just sloppiness....

    Connection refused, try again later.

  4. #4
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    That code works fine for me. I compiled it with
    gcc -o shell shell.c
    ran it as
    ./shell
    and it print the shellcode length and gave me a shell. Maybe you're on the wrong architecture or something.

Posting Permissions

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