Vulnerabilities > CVE-2003-0395 - Code Injection vulnerability in Myupb Ultimate PHP Board 1.9

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

Summary

Ultimate PHP Board (UPB) 1.9 allows remote attackers to execute arbitrary PHP code with UPB administrator privileges via an HTTP request containing the code in the User-Agent header, which is executed when the administrator executes admin_iplog.php.

Vulnerable Configurations

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

descriptionUltimate PHP Board 1.9 admin_iplog.PHP Arbitrary PHP Execution Vulnerability. CVE-2003-0395 . Webapps exploit for php platform
idEDB-ID:22642
last seen2016-02-02
modified2003-05-24
published2003-05-24
reportereuronymous
sourcehttps://www.exploit-db.com/download/22642/
titleUltimate PHP Board 1.9 admin_iplog.PHP Arbitrary PHP Execution Vulnerability

Nessus

NASL familyCGI abuses
NASL idUPB_CODE_INJECTION.NASL
descriptionThe remote host is running Ultimate PHP Board (UPB). There is a flaw in this version which may allow an attacker to execute arbitrary code on this host, by sending a malformed user-agent which contains PHP commands. Once the user-agent has been sent, it is stored in the logs. When the administrator of this website will read the logs through admin_ip.php, the code will be executed.
last seen2020-06-01
modified2020-06-02
plugin id11671
published2003-05-29
reporterThis script is Copyright (C) 2003-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/11671
titleUltimate PHP Board admin_iplog.php Arbitrary Code Execution
code
# 
# (C) Tenable Network Security, Inc.
#


include("compat.inc");

if(description)
{
 script_id(11671);
 script_version ("1.16");
 script_cve_id("CVE-2003-0395");
 script_bugtraq_id(7678);
 
 script_name(english:"Ultimate PHP Board admin_iplog.php Arbitrary Code Execution");

 script_set_attribute(attribute:"synopsis", value:
"The remote host has a PHP script that may allow arbitrary code
execution on the remote system." );
 script_set_attribute(attribute:"description", value:
"The remote host is running Ultimate PHP Board (UPB).

There is a flaw in this version which may allow an attacker
to execute arbitrary code on this host, by sending a malformed
user-agent which contains PHP commands.  Once the user-agent
has been sent, it is stored in the logs. When the administrator
of this website will read the logs through admin_ip.php,
the code will be executed." );
 script_set_attribute(attribute:"solution", value:
"Upgrade to the latest version of this CGI." );
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
 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:"plugin_publication_date", value: "2003/05/29");
 script_set_attribute(attribute:"vuln_publication_date", value: "2003/05/23");
 script_cvs_date("Date: 2018/08/06 14:03:14");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_end_attributes();

 
 script_summary(english:"Checks for UPB");
 
 script_category(ACT_GATHER_INFO);
 
 script_copyright(english:"This script is Copyright (C) 2003-2018 Tenable Network Security, Inc.");
 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, "The remote web server does not support PHP.");

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

foreach d (dirs)
{
 res = http_send_recv3(method:"GET", item:string(d, "/index.php"), port:port);
 if(isnull(res) ) exit(1,"Null response to index.php request.");
 if(egrep(pattern:"Powered by<br>UPB Version :.* 1\.(0[^0-9]|[0-9])", string:res[2]))
  {
    security_hole(port);
    exit(0);
  }
}