[Plugins-writers] Plugin for w3who.dll ISAPI DLL

From: Nicolas Gregoire (ngregoire@private)
Date: Mon Dec 06 2004 - 03:56:29 PST


Hello,

I attached to this message a plugin detecting the Microsoft w3who.dll
ISAPI. The non safe_checks code will try to do a localization proof
pattern matching but it may generate some false positives (as discussed
this week-end with Michel Arboi).

-- 
Nicolas Gregoire ----- Consultant en Sécurité des Systèmes d'Information
ngregoire@private ------[ ExaProbe ]------ http://www.exaprobe.com/
PGP KeyID:CA61B44F  FingerPrint:1CC647FF1A55664BA2D2AFDACA6A21DACA61B44F


# 
# (C) Nicolas Gregoire <ngregoire@private>
#
#

if(description)
{
 script_id(9999999999999999999999999999999999999);
 script_version ("$Revision: 1.0 $");
 script_cve_id("CAN-2004-1133");
 script_cve_id("CAN-2004-1134");

 name["english"] = "w3who.dll overflow and XSS";

  
 script_name(english:name["english"]);
 
 desc["english"] = "
The Windows 2000 Resource Kit shipped with a DLL that displays
the browser client context. It lists security identifiers,
privileges and $ENV variables. Nessus has determined that the
remote host has the file installed. 

The w3who.dll ISAPI may allow an attacker to execute
arbitrary commands on this host, through a buffer overflow,
or to mount XSS attacks.

Risk Factor : High";


 script_description(english:desc["english"]);
 
 summary["english"] = "Determines the presence of w3who.dll";


 script_summary(english:summary["english"]);
 
 script_category(ACT_MIXED_ATTACK);
 
 
 script_copyright(english:"This script is Copyright (C) 2004 Nicolas Gregoire <ngregoire@private>");

 family["english"] = "CGI abuses";
 family["francais"] = "Abus de CGI";

 script_family(english:family["english"], francais:family["francais"]);
 
 script_dependencie("find_service.nes", "http_version.nasl", "www_fingerprinting_hmap.nasl");
 script_require_ports("Services/www", 80);
 exit(0);
}

#
# The script code starts here
#

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

port = get_http_port(default:80);

sig = get_kb_item("www/hmap/" + port + "/description");
if ( sig && "IIS" >!< sig ) exit(0);

req  = http_get(item:"/scripts/w3who.dll", port:port);
res  = http_keepalive_send_recv(port:port, data:req);
if("Access Token" >< res)
{
 if(safe_checks()) {
   security_warning(port);
   exit(0);
   }
  
  
  req = string("GET /scripts/w3who.dll?", crap(600), " HTTP/1.1\r\n",
  "Host: ", get_host_name(), "\r\n",
  "User-Agent: Nessus\r\n";

 soc = http_open_socket(port);
 if(!soc)exit(0);
 send(socket:soc, data:req);
 r = http_recv(socket:soc);

 # The page content is subject to localization
 # Matching on headers and title
 if("HTTP/1.1 500 Server Error" >< r &&
    "<html><head><title>Error</title>" >< r) security_hole(port);
}
exit(0);


_______________________________________________
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 Dec 06 2004 - 04:29:54 PST