Re: Linux Security

From: E. Charters (echarters_at_sympatico.ca)
Date: 02/18/05

  • Next message: dude84: "Re: Linux Security"
    Date: Fri, 18 Feb 2005 02:04:13 -0500
    
    

    did you terminate the string you stacked with a newline character?
    --> "\n" ??

    otherwise the standard C function printf will fail when you pass it the
    address of the stack, which is what I presume you passed it.

    The other problem is that stdio.h was not known to be included in your
    routine. How do you include it, such that the function knows where to
    send the io?

    C may be low level and all, but mixing it with assembler may be fraught
    with problemos.

    EC<:-}

    dude84 wrote:
    > Hi,
    >
    > I need assistance with learning how to write assembler code (custom)
    > that will work with computer security related issues like a stack based
    > buffer overflow. Can anyone point me in the direction of a newsgroup
    > that could help me with this?
    > I've written a piece of assembler that calls the printf function, and
    > when I pass it into the buffer on my machine it does nothing and
    > segmentation faults. I'm using gas with gcc. I push the string onto
    > the stack call the function, add the memory space back to the stack, and
    > call the function to exit the program. I need someone's help to explain
    > why the hex code from this program does nothing.
    >
    >


  • Next message: dude84: "Re: Linux Security"

    Relevant Pages

    • Re: Linux Security
      ... otherwise the standard C function printf will fail when you pass it the ... address of the stack, which is what I presume you passed it. ... C may be low level and all, but mixing it with assembler may be fraught ... I push the string onto ...
      (comp.os.linux.security)
    • Re: Does MSIL Qualify?
      ... The term stack is not entirely to confuse with the x86 CPU stack. ... this is enough to determine it isnt asm. ... The way a string is stored could have a very significant impact on speed, ... If wolfgangs code on avarage is 16 times faster than other code then this means that his code can run on far slower software, and he will allways have years ahead of HLL developers because of this. ...
      (alt.lang.asm)
    • Problems with Search
      ... % then the matching string ... /MLinfo exch def % set to original ... string, still on the stack. ... prematch strcat ...
      (comp.lang.postscript)
    • Re: Is MASM32 an evil Microsoft plot?
      ... Now your next blunder is to call the default windows message handler ... > you could use most any assembler and the whole advocacy for MASM disappears. ... C3;; retn ... Is there supposed to be some profundity at addressing the stack ...
      (alt.lang.asm)
    • Re: Problems with Search
      ... The ifelse removes the boolean and the two procedures from the stack ... % then the matching string ... /MLinfo exch def % set to original ... prematch strcat ...
      (comp.lang.postscript)