📄 apache_slash.nasl
字号:
## This script was written by John Lampe (j_lampe@bellsouth.net)## changes by rd : - script description# - more verbose report# - check for k < 16 in find_index()# - script id## See the Nessus Scripts License for details#if(description){ script_id(10440); script_bugtraq_id(1284); script_version ("$Revision: 38 $"); script_cve_id("CVE-2000-0505"); script_name(english:"Check for Apache Multiple / vulnerability"); desc["english"] = "Certain versions of Apache for Win32 have a bug wherein remote userscan list directory entries. Specifically, by appending multiple /'sto the HTTP GET command, the remote Apache server will list all filesand subdirectories within the web root (as defined in httpd.conf).Solution : Upgrade to the most recent version of Apache at www.apache.orgRisk factor : Low"; script_description(english:desc["english"]); script_summary(english:"Send multiple /'s to Windows Apache Server"); script_category(ACT_GATHER_INFO); script_family(english:"Remote file access"); script_copyright(english:"By John Lampe....j_lampe@bellsouth.net"); script_dependencies("find_service.nes", "http_version.nasl", "www_fingerprinting_hmap.nasl"); script_require_keys("www/apache"); script_require_ports("Services/www", 80); exit(0);}## The script code starts hereinclude("http_func.inc");include("http_keepalive.inc");include("global_settings.inc");function find_index(k) { if(k < 16)k = 17; for (q=k-16; q<k; q=q+1) { buf = http_get(item:crap(length:q, data:"/"), port:port); incoming = http_keepalive_send_recv(port:port, data:buf); if ( incoming == NULL ) exit(0); if ("Index of /" >< incoming) { my_warning = "It is possible to list a directories contents by appending multiple /'sin the HTTP GET command, this is onlya vulnerability on Apache/Win32 based webservers. "; my_warning = my_warning + string (q, " slashes will cause the directory contents to be listed", "\n\n"); my_warning = my_warning +"Solution : Upgrade to the most recent version of Apache at www.apache.orgRisk factor : Low"; security_warning(port:port, data:my_warning); http_close_socket(soc); exit(0); } } exit(0);}port = get_http_port(default:80);banner = get_http_banner(port:port);if ( ! banner ) exit(0);if ( "Apache" >!< banner ) exit(0);if ( !thorough_tests && "Win32" >!< banner ) exit(0);req = http_get(item:"/", port:port);res = http_keepalive_send_recv(port:port, data:req);if ( res == NULL ) exit(0);if ( "Index of /" >< res ) exit(0);if(get_port_state(port)) { for (i=2; i < 512; i=i+16) { buf = http_get(item:crap(length:i, data:"/"), port:port); incoming = http_keepalive_send_recv(port:port, data:buf); if(incoming == NULL)exit(0); if ("Forbidden" >< incoming) { find_index(k:i); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -