Lucene search

K
nessusThis script is Copyright (C) 2004-2010 Tenable Network Security, Inc.FREEBSD_FETCH.NASL
HistoryNov 18, 2004 - 12:00 a.m.

FreeBSD : SA-04:16.fetch

2004-11-1800:00:00
This script is Copyright (C) 2004-2010 Tenable Network Security, Inc.
www.tenable.com
11

The remote host is running a version of FreeBSD which contains a flaw in the ‘fetch’ utility.

‘fetch’ is a command-line tool used to retrieve data at a given URL. It is used (among others) by the FreeBSD port collection.

There is an integer overflow condition in the processing of HTTP headers which may result in a buffer overflow.

An attacker may exploit this flaw to execute arbitrary commands on the remote host. To exploit this flaw, an attacker would need to lure a victim on the remote host into downloading a URL from a malicious web server using this utility.

#
# (C) Tenable Network Security, Inc.
#

if ( ! defined_func("bn_random") ) exit(0);

include("compat.inc");

if(description)
{
 script_id(15761);
 script_version ("$Revision: 1.10 $");
 script_bugtraq_id(11702);
 name["english"] = "FreeBSD : SA-04:16.fetch";
 
 script_name(english:name["english"]);
 
 script_set_attribute(attribute:"synopsis", value:
"The remote device is missing a vendor-supplied security patch" );
 script_set_attribute(attribute:"description", value:
"The remote host is running a version of FreeBSD which contains a flaw in the 
'fetch' utility.

'fetch' is a command-line tool used to retrieve data at a given URL. It is used
(among others) by the FreeBSD port collection.

There is an integer overflow condition in the processing of HTTP headers
which may result in a buffer overflow.

An attacker may exploit this flaw to execute arbitrary commands on the remote
host. To exploit this flaw, an attacker would need to lure a victim on the remote
host into downloading a URL from a malicious web server using this utility." );
 script_set_attribute(attribute:"solution", value:
"http://www.vuxml.org/freebsd/759b8dfe-3972-11d9-a9e7-0001020eed82.html" );
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
 script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
 script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
 script_set_attribute(attribute:"exploit_available", value:"true");


 script_set_attribute(attribute:"plugin_publication_date", value: "2004/11/18");
 script_cvs_date("$Date: 2010/10/06 01:41:53 $");
 script_end_attributes();

 
 summary["english"] = "Check for the version of the FreeBSD";
 script_cve_id("CVE-2004-1053");
 script_summary(english:summary["english"]);
 
 script_category(ACT_GATHER_INFO);
 
 script_copyright(english:"This script is Copyright (C) 2004-2010 Tenable Network Security, Inc.");
 family["english"] = "FreeBSD Local Security Checks";
 script_family(english:family["english"]);
 
 script_dependencies("ssh_get_info.nasl");
 script_require_keys("Host/FreeBSD/pkg_info");
 exit(0);
}



include("freebsd_package.inc");

port = 0;

package = get_kb_item("Host/FreeBSD/release");

if ( ! package ) exit(0);

if ( egrep(pattern:"FreeBSD-5\.3", string:package) )
{
 if ( pkg_cmp(pkg:package, reference:"FreeBSD-5.3_1") < 0 )
 {
  security_hole(port);
  exit(0);
 }
}

if ( egrep(pattern:"FreeBSD-5\.2", string:package) )
{
 if ( pkg_cmp(pkg:package, reference:"FreeBSD-5.2.1_12") < 0 )
 {
  security_hole(port);
  exit(0);
 }
}

if ( egrep(pattern:"FreeBSD-5\.1", string:package) )
{
 if ( pkg_cmp(pkg:package, reference:"FreeBSD-5.1.1_18") < 0 )
 {
  security_hole(port);
  exit(0);
 }
}

if ( egrep(pattern:"FreeBSD-5\.0", string:package) )
{
 if ( pkg_cmp(pkg:package, reference:"FreeBSD-5.0_22") < 0 )
 {
  security_hole(port);
  exit(0);
 }
}

if ( egrep(pattern:"FreeBSD-4\.[0-7]([^0-9]|$)", string:package) )
{
 if ( pkg_cmp(pkg:package, reference:"FreeBSD-4.7_28") < 0 )
 {
  security_hole(port);
  exit(0);
 }
}

if ( egrep(pattern:"FreeBSD-4\.8", string:package) )
{
 if ( pkg_cmp(pkg:package, reference:"FreeBSD-4.8_26") < 0 )
 {
  security_hole(port);
  exit(0);
 }
}

if ( egrep(pattern:"FreeBSD-4\.9", string:package) )
{
 if ( pkg_cmp(pkg:package, reference:"FreeBSD-4.9_13") < 0 )
 {
  security_hole(port);
  exit(0);
 }
}

if ( egrep(pattern:"FreeBSD-4\.10", string:package) )
{
 if ( pkg_cmp(pkg:package, reference:"FreeBSD-4.10_4") < 0 )
 {
  security_hole(port);
  exit(0);
 }
}

Related for FREEBSD_FETCH.NASL