static char overflow

From: melsa (3melsa3@mail.ru)
Date: 05/01/02


From: melsa <3melsa3@mail.ru>
To: vuln-dev@securityfocus.com
Date: Wed, 01 May 2002 22:14:10 +0200

hi
i want learn a little bit more about bufferoverflows.

the standart example of the many bufferoverflow tutorials is
----------------------------------------------------------
main(int argc,char **argv)
{
char buf [1024];
strcpy(buf,argv[1]);
printf("%s",buf);
}
---------------------------------------------------

this is very easy to explore , because eip is behind the buffer.

but what about the heap ?

----------------------------------------------------------
main(int argc,char **argv)
{
  static char buf [1024];
strcpy(buf,argv[1]);
printf("%s",buf);
}
---------------------------------------------------

what can you overwrite here to jump into the shellcode ?
i have read the w00w00 tutorial but it doesn't help me.