Lucene search

K
nessusThis script is Copyright (C) 2005-2022 and is owned by Tenable, Inc. or an Affiliate thereof.PHPCOIN_122_20051213.NASL
HistoryDec 14, 2005 - 12:00 a.m.

phpCOIN < 1.2.2 2005-12-13 Fix-File Multiple Vulnerabilities

2005-12-1400:00:00
This script is Copyright (C) 2005-2022 and is owned by Tenable, Inc. or an Affiliate thereof.
www.tenable.com
117

7.5 High

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

0.076 Low

EPSS

Percentile

94.2%

The remote host appears to be running phpCOIN, a software package for web-hosting resellers to handle clients, orders, helpdesk queries, and the like.

The version of phpCOIN installed on the remote host fails to sanitize user-supplied input to the ‘_CCFG[_PKG_PATH_DBSE]’ parameter of the ‘config.php’ script before using it in a PHP ‘require_once’ function. Provided PHP’s ‘register_globals’ setting is enabled, an unauthenticated attacker may be able to exploit this flaw to read arbitrary files on the remote host and/or run arbitrary code, possibly taken from third-party hosts, subject to the privileges of the web server user id.

In addition, the application uses the ‘phpcoinsessid’ cookie for database queries in the ‘coin_cfg.php’ script without sanitizing it, which opens the application up to SQL injection attacks provided PHP’s ‘magic_quotes_gpc’ setting is disabled.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(20300);
  script_version("1.25");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2005-4211", "CVE-2005-4212", "CVE-2005-4213");
  script_bugtraq_id(15830, 15831);

  script_name(english:"phpCOIN < 1.2.2 2005-12-13 Fix-File Multiple Vulnerabilities");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a PHP application that is prone to
several vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The remote host appears to be running phpCOIN, a software package for
web-hosting resellers to handle clients, orders, helpdesk queries, and
the like. 

The version of phpCOIN installed on the remote host fails to sanitize
user-supplied input to the '_CCFG[_PKG_PATH_DBSE]' parameter of the
'config.php' script before using it in a PHP 'require_once' function. 
Provided PHP's 'register_globals' setting is enabled, an
unauthenticated attacker may be able to exploit this flaw to read
arbitrary files on the remote host and/or run arbitrary code, possibly
taken from third-party hosts, subject to the privileges of the web
server user id. 

In addition, the application uses the 'phpcoinsessid' cookie for
database queries in the 'coin_cfg.php' script without sanitizing it,
which opens the application up to SQL injection attacks provided PHP's
'magic_quotes_gpc' setting is disabled.");
  # https://web.archive.org/web/20120402161859/http://retrogod.altervista.org/phpcoin122.html
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?45852225");
  script_set_attribute(attribute:"see_also", value:"http://forums.phpcoin.com/index.php?showtopic=5469");
  script_set_attribute(attribute:"solution", value:
"Upgrade to 1.2.2 with the 2005-12-13 fix-file or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");

  script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"false");

  script_set_attribute(attribute:"vuln_publication_date", value:"2005/12/12");
  script_set_attribute(attribute:"plugin_publication_date", value:"2005/12/14");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:coinsoft_technologies:phpcoin");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2005-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("http_version.nasl");
  script_require_keys("www/PHP");
  script_exclude_keys("Settings/disable_cgi_scanning");
  script_require_ports("Services/www", 80);

  exit(0);
}


include("global_settings.inc");
include("misc_func.inc");
include("http.inc");

port = get_http_port(default:80);
if (!can_host_php(port:port)) exit(0);

# Loop through directories.
if (thorough_tests) dirs = list_uniq("/phpcoin", cgi_dirs());
else dirs = make_list(cgi_dirs());

# There's a problem if...
# there's an entry for root or...
# we get an error saying "failed to open stream" or "failed opening".
re = "(root:.*:0:[01]:)|(/etc/passwd.+failed to open stream)|(Failed opening required '/etc/passwd)";

test_cgi_xss(port: port, cgi: "/config.php", dirs: dirs, pass_re: re,
  high_risk: 1, sql_injection: 1,
  qs: "_CCFG[_PKG_PATH_DBSE]=/etc/passwd%00");
VendorProductVersionCPE
coinsoft_technologiesphpcoincpe:/a:coinsoft_technologies:phpcoin

7.5 High

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

0.076 Low

EPSS

Percentile

94.2%

Related for PHPCOIN_122_20051213.NASL