All of lore.kernel.org
 help / color / mirror / Atom feed
From: jnf <xjnfx@doityourself.com>
To: linux-c-programming@vger.kernel.org
Subject: Re: exploitable code?
Date: Sun, 30 Jun 2002 21:52:22 -0700 (PDT)	[thread overview]
Message-ID: <20020701045222.F276B2756@sitemail.everyone.net> (raw)

>The exit function may well be a "long jump" that uses the return value for 
>the function "main" as its target.  Therefore, when the exploiting code 
>overwrites the return address for "main" the "exit" call will use the 
>overwritten value.

every value i overwrite is pushed onto the stack and the next used again, the overwritten ret address is fine for main, but exit never returns, i just went through all of exit today and was hoping to find like
pop %eax
jmp %eax

or something to break out of exit, but i didnt find it, So perhaps i missed it, or missed something in strcpy, but exit never returns so that is the problem.

>
>Too bad people aren't required as a matter of course to look at the 
>assembler output of code from compilers anymore.  You learn a lot seeing 
>how your statements get translated to machine code.

if you only knew how much ive learned just getting to this point. I totally agree.


>Satch

j


_____________________________________________________________
Sign up for FREE email from DoItYourself.com at http://doityourself.com

_____________________________________________________________
Promote your group and strengthen ties to your members with email@yourgroup.org by Everyone.net  http://www.everyone.net/?btn=tag

             reply	other threads:[~2002-07-01  4:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-01  4:52 jnf [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-01  3:38 exploitable code? jnf
2002-07-01  4:44 ` Stephen Satchell
2002-07-01  6:45 ` Glynn Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020701045222.F276B2756@sitemail.everyone.net \
    --to=xjnfx@doityourself.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.