Vulnerabilities > CVE-2003-1412 - Code Injection vulnerability in Gonicus System Administration 1.0

047910
CVSS 6.8 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
gonicus
CWE-94
nessus
exploit available

Summary

PHP remote file inclusion vulnerability in index.php for GONiCUS System Administrator (GOsa) 1.0 allows remote attackers to execute arbitrary PHP code via the plugin parameter to (1) 3fax/1blocklists/index.php; (2) 6departamentadmin/index.php, (3) 5terminals/index.php, (4) 4mailinglists/index.php, (5) 3departaments/index.php, and (6) 2groupd/index.php in 2administration/; or (7) the base parameter to include/help.php.

Vulnerable Configurations

Part Description Count
Application
Gonicus
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Manipulating User-Controlled Variables
    This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An attacker can override environment variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the attacker can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.

Exploit-Db

descriptionGONiCUS System Administrator 1.0 Remote File Include Vulnerability. CVE-2003-1412. Shellcode exploit for php platform
idEDB-ID:22279
last seen2016-02-02
modified2003-02-24
published2003-02-24
reporterKarol Wiesek
sourcehttps://www.exploit-db.com/download/22279/
titleGONiCUS System Administrator 1.0 - Remote File Include Vulnerability

Nessus

NASL familyCGI abuses
NASL idGOSA_CODE_INJECTION.NASL
descriptionThe remote web server is hosting GOnicus System Administrator (GOsa), a PHP-based administration tool for managing accounts and systems in LDAP databases. The version of GOsa installed on the remote host fails to sanitize user input to the
last seen2020-06-01
modified2020-06-02
plugin id11275
published2003-02-27
reporterThis script is Copyright (C) 2003-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/11275
titleGOsa Multiple Script plugin Parameter Remote File Inclusion
code
#
# (C) Tenable Network Security, Inc.
#

# Ref:
# From: Karol Wiesek <[email protected]>
# To: [email protected]
# Subject: GOnicus System Administrator php injection
# Message-ID: <[email protected]>


include("compat.inc");

if(description)
{
  script_id(11275);
  script_version ("1.29");

  script_cve_id("CVE-2003-1412");
  script_bugtraq_id(6922);

  script_name(english:"GOsa Multiple Script plugin Parameter Remote File Inclusion");
  script_summary(english:"Checks for the presence of remotehtmlview.php");

  script_set_attribute(attribute:"synopsis",value:
"The remote web server contains a PHP application that is affected by
multiple remote file include vulnerabilities." );
  script_set_attribute(attribute:"description", value:
"The remote web server is hosting GOnicus System Administrator (GOsa),
a PHP-based administration tool for managing accounts and systems in
LDAP databases.

The version of GOsa installed on the remote host fails to sanitize
user input to the 'plugin' parameter of several scripts before using
it to include PHP code.

An unauthenticated, remote attacker can leverage these issues to view
arbitrary files or possibly to execute arbitrary PHP code, possibly
taken from third-party hosts.

Note that GOsa reportedly doesn't support disabling PHP's
'register_globals' setting." );
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2003/Feb/327");
  script_set_attribute(attribute:"solution", value: "Unknown at this time." );
  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:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2003-1412");
  script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_cwe_id(94);
  script_set_attribute(attribute:"vuln_publication_date", value:"2003/02/23");
  script_set_attribute(attribute:"plugin_publication_date", value:"2003/02/27");
  script_cvs_date("Date: 2019/06/03 10:01:42");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_copyright(english:"This script is Copyright (C) 2003-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
  script_family(english:"CGI abuses");

  script_dependencie("find_service1.nasl", "http_version.nasl");
  script_require_ports("Services/www", 80);
  script_exclude_keys("Settings/disable_cgi_scanning");
  script_require_keys("www/PHP");
  exit(0);
}

#
# The script code starts here
#

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, "Web server does not support PHP scripts.");



function check(loc)
{
 local_var r;
 r = http_send_recv3(method:"GET",
     item:string(loc, "/include/help.php?base=http://example.com"),
 		port:port);	
 if (isnull(r)) exit(1, "The web server failed to respond.");

 if(egrep(pattern:".*http://example.com/include/common\.inc", string:r[2]))
 {
 	security_hole(port);
	exit(0);
 }
}

foreach dir (cgi_dirs())
{
 check(loc:dir);
}