Vulnerabilities > CVE-2007-0485 - Remote File Include vulnerability in Webchat.Org Webchat 0.77

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
webchat-org
nessus
exploit available

Summary

PHP remote file inclusion vulnerability in defines.php in WebChat 0.77 allows remote attackers to execute arbitrary PHP code via a URL in the WEBCHATPATH parameter.

Vulnerable Configurations

Part Description Count
Application
Webchat.Org
1

Exploit-Db

descriptionWebChat 0.77 (defines.php WEBCHATPATH) Remote File Include Vuln. CVE-2007-0485. Webapps exploit for php platform
fileexploits/php/webapps/3169.txt
idEDB-ID:3169
last seen2016-01-31
modified2007-01-21
platformphp
port
published2007-01-21
reporterv1per-haCker
sourcehttps://www.exploit-db.com/download/3169/
titleWebChat 0.77 defines.php WEBCHATPATH Remote File Include Vuln
typewebapps

Nessus

NASL familyCGI abuses
NASL idWEBCHAT_CODE_INJECTION.NASL
descriptionThe version of Webchat installed on the remote host allows an attacker to read local files or execute PHP code, possibly taken from third- party sites, subject to the permissions of the web server user id.
last seen2020-06-01
modified2020-06-02
plugin id11315
published2003-03-03
reporterThis script is Copyright (C) 2003-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/11315
titleWebChat defines.php WEBCHATPATH Parameter Remote File Inclusion
code
#
# (C) Tenable Network Security, Inc.
#

# Ref:
#
# From: "Frog Man" <[email protected]>
# To: [email protected]
# Cc: [email protected]
# Date: Mon, 03 Mar 2003 13:57:43 +0100
# Message-ID: <[email protected]>
# Subject: [VulnWatch] WebChat (PHP)


include("compat.inc");

if(description)
{
  script_id(11315);
  script_version ("1.24");
  script_cve_id("CVE-2007-0485");
  script_bugtraq_id(7000);

  script_name(english:"WebChat defines.php WEBCHATPATH Parameter Remote File Inclusion");
  script_summary(english:"Checks for the presence of Webchat's defines.php");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a PHP application that is affected by a
remote code inclusion flaw." );
  script_set_attribute(attribute:"description", value:
"The version of Webchat installed on the remote host allows an attacker
to read local files or execute PHP code, possibly taken from third-
party sites, subject to the permissions of the web server user id." );
  script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/313606" );
  script_set_attribute(attribute:"solution", value:"Contact the vendor for a patch or remove the application." );
  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_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2007-0485");
  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/03/03");
  script_set_attribute(attribute:"vuln_publication_date", value: "2007/01/21");
  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_exclude_keys("Settings/disable_cgi_scanning");
  script_require_ports("Services/www", 80);
  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);



function check(loc)
{
 local_var r, w;

 w = http_send_recv3(method:"GET", port: port, item:string(loc, "/defines.php?WEBCHATPATH=http://example.com/"));
 if (isnull(w)) exit(0);
 r = w[2];
 if("http://example.com/db_mysql.php" >< r )
 {
 	security_hole(port);
	exit(0);
 }
}


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