[Plugins-writers] Correct bug in regx for mod_ssl_hook_functions_format_string_vuln.nasl

From: Sarju Bhagat (sarju@private)
Date: Mon Aug 09 2004 - 06:47:12 PDT


Hi,

Corrected a bug in the regular expression not to include mod_ssl 2.8.19.

Regards

Sarju

-- 
Sarju Bhagat
Software Engineer
Westpoint Limited
Albion Wharf, 19 Albion Street,
Manchester, M1 5LN
England
Tel: +44 (0)161 237 1028
Fax: +44 (0)161 237 1031
email: sarju@private
web: www.westpoint.ltd.uk 



#
#  This script was written by David Maciejak <david dot maciejak at kyxar dot fr>
#  based on work from
# (C) Tenable Network Security
#
# ref: mod_ssl team July 2004

if(description)
{
 script_id(13651);
 script_bugtraq_id(10736);
 script_version("$Revision: 1.2 $");

 name["english"] = "mod_ssl hook functions format string vulnerability";

 script_name(english:name["english"]);

 desc["english"] = "
The remote host is using a version vulnerable of mod_ssl which is
older than 2.8.19. There is a format string condition in the
log functions of the remote module which may allow an attacker to
execute arbitrary code on the remote host.

*** Some vendors patched older versions of mod_ssl, so this
*** might be a false positive. Check with your vendor to determine
*** if you have a version of mod_ssl that is patched for this
*** vulnerability

Solution : Upgrade to version 2.8.19 or newer
Risk factor : High";

 script_description(english:desc["english"], francais:desc["francais"]);

 summary["english"] = "Checks for version of mod_ssl";
 summary["francais"] = "Vérifie la version de mod_ssl";

 script_summary(english:summary["english"], francais:summary["francais"]);

 script_category(ACT_GATHER_INFO);


 script_copyright(english:"This script is Copyright (C) 2004 David Maciejak",
    francais:"Ce script est Copyright (C) 2004 David Maciejak");
 family["english"] = "Gain a shell remotely";
 script_family(english:family["english"]);
 script_dependencie("http_version.nasl");
 script_require_ports("Services/www", 80);
 script_require_keys("www/apache");
 exit(0);
}

#
# The script code starts here
#
include("http_func.inc");

port = get_http_port(default:80);

if(get_port_state(port))
{
 banner = get_http_banner(port:port);
 if(!banner)exit(0);

 serv = strstr(banner, "Server");
 if("Apache/2" >< serv) exit(0);
 if("Apache-AdvancedExtranetServer/2" >< serv)exit(0);

 if(ereg(pattern:".*mod_ssl/(1.*|2\.([0-7]\..*|8\.([0-9]|1[0-8])[^0-9])).*", string:serv))
 {
   security_hole(port);
 }
}


*** /usr/local/lib/nessus/plugins/mod_ssl_hook_functions_format_string_vuln.nasl	Tue Jul 27 11:33:17 2004
--- mod_ssl_hook_functions_format_string_vuln.nasl	Mon Aug  9 12:09:23 2004
***************
*** 65,71 ****
   if("Apache/2" >< serv) exit(0);
   if("Apache-AdvancedExtranetServer/2" >< serv)exit(0);
  
!  if(ereg(pattern:".*mod_ssl/(1.*|2\.([0-8]\..*|8\.[0-18][^0-9])).*", string:serv))
   {
     security_hole(port);
   }
--- 65,71 ----
   if("Apache/2" >< serv) exit(0);
   if("Apache-AdvancedExtranetServer/2" >< serv)exit(0);
  
!  if(ereg(pattern:".*mod_ssl/(1.*|2\.([0-7]\..*|8\.([0-9]|1[0-8])[^0-9])).*", string:serv))
   {
     security_hole(port);
   }


_______________________________________________
Plugins-writers mailing list
Plugins-writers@private
http://mail.nessus.org/mailman/listinfo/plugins-writers



This archive was generated by hypermail 2.1.3 : Mon Aug 09 2004 - 06:56:26 PDT