Vulnerability Development mailing list archives

Re: creating shell code for exploits


From: starman jones <starman_jones1 () HOTMAIL COM>
Date: Tue, 2 Jan 2001 02:34:07 -0000

/* shell.c */
void main(){
  char *name[2];

  name[0] = "/bin/sh";
  name[1] = 0x0;
  execve(name[0], name, 0x0);
  exit(0);
}

1.Compile the above program using the -static flag.
2.open it up in gdb and use the "disas main" command
3. take all the unnecessary code
4. change and rewrite it, this time in ASM
5. compile, open it up in gdb and use the "disas main" command
6. use the x/bx command on the addresses of the instructions to recieve the
hex-code.

[Taken from the core zine and smashing the stack for fun and profit]
But all that is unnecessary because there is lots of shellcode available on
the net anyway.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Current thread: