Multiple Cross Site Scripting and SQL Injection vulnerabilities in XRMS

2009-03-15T00:00:00
ID OPENVAS:1361412562310101008
Type openvas
Reporter Christian Eric Edjenguele <christian.edjenguele@owasp.org>
Modified 2017-02-08T00:00:00

Description

XRMS is a web-based application for managing business entities such as employees, customers, contacts, activities. The application is vulnerable to simple Cross Site Scripting, which can be used for several isues.

                                        
                                            ###############################################################################
# OpenVAS Vulnerability Test
# $Id: XRMS_CVE-2008-3664.nasl 5231 2017-02-08 11:52:34Z teissa $
#
# Multiple Cross Site Scripting (XSS) and SQL injection Vulnerabilities in XRMS, CVE-2008-3664 
#
# Author:
# Christian Eric Edjenguele <christian.edjenguele@owasp.org>
#
# Copyright:
# Copyright (C) 2009 Christian Eric Edjenguele <christian.edjenguele@owasp.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# (or any later version), as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
###############################################################################

if(description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.101008");
  script_version("$Revision: 5231 $");
  script_tag(name:"last_modification", value:"$Date: 2017-02-08 12:52:34 +0100 (Wed, 08 Feb 2017) $");
  script_tag(name:"creation_date", value:"2009-03-15 21:44:50 +0100 (Sun, 15 Mar 2009)");
  script_tag(name:"cvss_base", value:"4.3");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:M/Au:N/C:N/I:P/A:N");
  script_cve_id("CVE-2008-3664");
  script_name("Multiple Cross Site Scripting and SQL Injection vulnerabilities in XRMS");
  script_category(ACT_ATTACK);
  script_copyright("Christian Eric Edjenguele <christian.edjenguele@owasp.org>");
  script_family("Web application abuses");
  script_dependencies("find_service.nasl", "http_version.nasl", "cross_site_scripting.nasl");
  script_require_ports("Services/www", 80);
  script_exclude_keys("Settings/disable_cgi_scanning");

  script_tag(name:"solution", value:"No solution or patch was made available for at least one year since
  disclosure of this vulnerability. Likely none will be provided anymore. General solution options are to upgrade
  to a newer release, disable respective features, remove the product or replace the product by another one. ");
  script_tag(name:"summary", value:"XRMS is a web-based application for managing business entities such as
  employees, customers, contacts, activities.
  The application is vulnerable to simple Cross Site Scripting, which can
  be used for several isues.");

  script_tag(name:"solution_type", value:"WillNotFix");
  script_tag(name:"qod", value:"50"); # Prone to false positives

  exit(0);
}


include("http_func.inc");
include("http_keepalive.inc");

port = get_http_port( default:80 );

if( ! can_host_php( port:port ) ) exit( 0 );

pages = make_list( "/login.php?target=test<script>alert('attack');</script>",
                   "/activities/some.php?title=test<script>alert('attack');</script>",
                   "/companies/some.php?company_name=test<script>alert('attack');</script>",
                   "/contacts/some.php?last_name=test<script>alert('attack');</script>",
                   "/campaigns/some.php?campaign_title=test<script>alert('attack');</script>",
                   "/opportunities/some.php?opportunity_title=test<script>alert('attack');</script>",
                   "/cases/some.php?case_title=test<script>alert('attack');</script>",
                   "/files/some.php?file_id=test<script>alert('attack');</script>",
                   "/reports/custom/mileage.php?starting=test<script>alert('attack');</script>" );

foreach dir( make_list_unique( "/", "/xrms", cgi_dirs( port:port ) )  ) {

  if( dir == "/" ) dir = "";

  foreach php( pages ) {

    url = dir + php;
    if( http_vuln_check( port:port, url:url, pattern:"<script>alert\('attack'\);</script>", extra_check:"test", check_header:TRUE ) ) {
      report = report_vuln_url( url:url, port:port );
      security_message( port:port, data:report );
      set_kb_item( name:"XRMS/installed", value:TRUE );
      exit( 0 );
    }
  }
}

exit( 99 );