#
# This script was written by BEKRAR Chaouki <bekrar@adconsulting.fr>
#
# Macromedia ColdFusion MX Path Disclosure Vulnerability
#
# http://www.k-otik.com/bugtraq/04.26.coldfusion.php
#

if (description)
{
 script_id(11558);
 script_bugtraq_id(7443);
 script_version ("$Revision: 1.4 $");

 script_name(english:"Macromedia ColdFusion MX Path Disclosure Vulnerability");
 desc["english"] = "
A vulnerability has been reported for Macromedia ColdFusion MX that 
may reveal the physical path information to attackers.

When certain malformed URL requests (port 8500) are received by the server, an 
error message is returned containing the full path of the ColdFusion 
installation.

Solution : Change the 'Debugging Settings' on the Administrator console 
of the ColdFusion server. This can be achieved by disabling the 'Enable 
Robust Exception Information' option.

Risk factor : Low";

 script_description(english:desc["english"]);
 script_summary(english:"Macromedia ColdFusion MX Path Disclosure Vulnerability");
 script_category(ACT_GATHER_INFO);
 script_family(english:"CGI abuses", francais:"Abus de CGI");
 script_copyright(english:"This script is Copyright (C) 2003 A.D.Consulting France");
 script_dependencie("find_service.nes", "http_version.nasl");
 script_require_ports("Services/www", 8500);
 exit(0);
}

include("http_func.inc");
include("http_keepalive.inc");
include("misc_func.inc");

ports = add_port_in_list(list:get_kb_list("Services/www"), port:8500);
foreach port (ports)
{
 if(get_port_state(port))
 {
  dir = make_list(cgi_dirs());
  foreach d (dir)
  {
   url = string(d, "/CFIDE/probe.cfm");
   req = http_get(item:url, port:port);
   buf = http_keepalive_send_recv(port:port, data:req);
   if( buf == NULL ) break;
 
  if( "Error occured in" >< buf)
   {
    if(egrep(pattern:"[A-Z]:\\.*probe\.cfm", string:buf))
	{
    	security_warning(port:port);
    	exit(0);
	}
   }
  }
 }
}

