Vulnerabilities > CVE-2002-0495 - Code Injection vulnerability in Cgiscript Cssearch Professional 2.3

047910
CVSS 0.0 - NONE
Attack vector
UNKNOWN
Attack complexity
UNKNOWN
Privileges required
UNKNOWN
Confidentiality impact
UNKNOWN
Integrity impact
UNKNOWN
Availability impact
UNKNOWN
cgiscript
CWE-94
nessus
exploit available

Summary

csSearch.cgi in csSearch 2.3 and earlier allows remote attackers to execute arbitrary Perl code via the savesetup command and the setup parameter, which overwrites the setup.cgi configuration file that is loaded by csSearch.cgi.

Vulnerable Configurations

Part Description Count
Application
Cgiscript
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

descriptionCSSearch 2.3 Remote Command Execution Vulnerability. CVE-2002-0495. Remote exploit for cgi platform
idEDB-ID:21354
last seen2016-02-02
modified2002-03-26
published2002-03-26
reporterSteve Gustin
sourcehttps://www.exploit-db.com/download/21354/
titleCSSearch 2.3 - Remote Command Execution Vulnerability

Nessus

NASL familyCGI abuses
NASL idCSSEARCH_CGI.NASL
descriptionThe version of csSearch running on the remote host has a command execution vulnerability. Input to the
last seen2020-06-01
modified2020-06-02
plugin id10924
published2002-03-27
reporterThis script is Copyright (C) 2002-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/10924
titlecsSearch csSearch.cgi setup Parameter Arbitrary Command Execution
code
#
# (C) Tenable Network Security, Inc.
#


include("compat.inc");


if(description)
{
 script_id(10924);
 script_version ("1.25");
 script_cve_id("CVE-2002-0495");
 script_bugtraq_id(4368);

 script_name(english:"csSearch csSearch.cgi setup Parameter Arbitrary Command Execution");
 script_summary(english:"Checks for the presence of /cgi-bin/csSearch.cgi");
 
 script_set_attribute(attribute:"synopsis", value:
"A web application running on the remote host has a command execution
vulnerability." );
 script_set_attribute( attribute:"description", value:
"The version of csSearch running on the remote host has a command
execution vulnerability.  Input to the 'print' parameter of
'csSearch.cgi' is not properly sanitized.  A remote attacker could
exploit this by executing arbitrary system commands with the
privileges of the web server." );
 script_set_attribute(
   attribute:"solution", 
   value:"Remove this CGI from the web server."
 );
 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:F/RL:OF/RC:C");
 script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
 script_set_attribute(attribute:"exploit_available", value:"true");
 script_set_attribute(attribute:"plugin_publication_date", value: "2002/03/27");
 script_set_attribute(attribute:"vuln_publication_date", value: "2002/03/25");
 script_cvs_date("Date: 2018/06/13 18:56:26");
 script_set_attribute(attribute:"plugin_type", value:"remote");
 script_end_attributes();
 
 script_category(ACT_ATTACK);
 script_family(english:"CGI abuses");
 
 script_copyright(english:"This script is Copyright (C) 2002-2018 Tenable Network Security, Inc.");

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

 exit(0);
}

#
# The script code starts here
#

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

http_check_remote_code (
			check_request:"/csSearch.cgi?command=savesetup&setup=print%20`id`",
			extra_check:"uid=[0-9]+.*gid=[0-9]+.*",
			command:"id"
			);