Lucene search
K

osTicket setup.php Accessibility

🗓️ 14 Jul 2004 00:00:00Reported by TenableType 
nessus
 nessus
🔗 www.tenable.com👁 16 Views

osTicket setup.php allows unauthenticated access, risking attacks on configuration and data loss.

Code
#%NASL_MIN_LEVEL 70300
#
# This script was written by George A. Theall, <[email protected]>.
#
# See the Nessus Scripts License for details.
#



include('deprecated_nasl_level.inc');
include('compat.inc');

if (description) {
  script_id(13647);
  script_version("1.11");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/08/15");
 
  script_name(english:"osTicket setup.php Accessibility");
 
 script_set_attribute(attribute:"synopsis", value:
"Application data may be modified or delete on this host." );
 script_set_attribute(attribute:"description", value:
"The target is running at least one instance of an improperly secured
installation of osTicket and allows access to setup.php.  Since that
script does not require authenticated access, it is possible for an
attacker to modify osTicket's configuration using a specially crafted
call to setup.php to perform the INSTALL actions. 

For example, if config.php is writable, an attacker could change the
database used to store ticket information, even redirecting it to
another site.  Alternatively, regardless of whether config.php is
writable, an attacker could cause the loss of all ticket information by
reinitializing the database given knowledge of its existing
configuration (gained, say, from reading config.php)." );
 script_set_attribute(attribute:"solution", value:
"Remove both setup.php and gpcvar.php and ensure permissions
on config.php are 644." );
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:P");
 script_set_attribute(attribute:"plugin_publication_date", value: "2004/07/14");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_end_attributes();

 
  summary["english"] = "Checks Accessibility of osTicket's setup.php";
  script_summary(english:summary["english"]);
 
  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2004-2022 George A. Theall");

  script_family(english:"CGI abuses");

  script_dependencie("global_settings.nasl", "http_version.nasl", "osticket_detect.nasl");
  script_require_ports("Services/www", 80);
  script_require_keys("www/osticket");
  exit(0);
}

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

host = get_host_name();
port = get_http_port(default:80, embedded:TRUE);
dbg::detailed_log(lvl:1, src: SCRIPT_NAME,
    msg:"Searching for setup.php Accessibility vulnerability in osTicket on "+ host +":"+ port +".");

if (!get_port_state(port)) exit(0);

# Check each installed instance, stopping if we find a vulnerability.
installs = get_kb_list(string("www/", port, "/osticket"));
if (isnull(installs)) exit(0);
foreach install (installs) {
  matches = eregmatch(string:install, pattern:"^(.+) under (/.*)$");
  if (!isnull(matches)) {
    ver = matches[1];
    dir = matches[2];
    dbg::detailed_log(lvl:1, src: SCRIPT_NAME, msg:"Checking version "+ ver +" under "+ dir +".");

    # Get osTicket's setup.php.
    url = string(dir, "/setup.php");
    dbg::detailed_log(lvl:1, src: SCRIPT_NAME, msg:"Checking "+ url +".");
    req = http_get(item:url, port:port);
    res = http_keepalive_send_recv(port:port, data:req);
    if (res == NULL) exit(0);           # can't connect
    dbg::detailed_log(lvl:1, src: SCRIPT_NAME, msg:"resp =>>"+ res +"<<");

    # If successful, there's a problem.
    if (egrep(pattern:"title>osTicket Install", string:res, icase:TRUE)) {
      security_warning(port:port);
      exit(0);
    }
  }
}

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation