OneOrZero Helpdesk tinfo.php Arbitrary File Upload - Nessus

High   Plugin ID: 35261

This page contains detailed information about the OneOrZero Helpdesk tinfo.php Arbitrary File Upload Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 35261
Name: OneOrZero Helpdesk tinfo.php Arbitrary File Upload
Filename: oneorzero_tinfo_arbitrary_upload.nasl
Vulnerability Published: N/A
This Plugin Published: 2008-12-23
Last Modification Time: 2022-04-11
Plugin Version: 1.13
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: http_version.nasl
Required KB Items [?]: www/PHP
Excluded KB Items: Settings/disable_cgi_scanning

Vulnerability Information


Severity: High
Vulnerability Published: N/A
Patch Published: N/A
CVE [?]: N/A
CPE [?]: N/A

Synopsis

The remote web server contains a PHP application that is affected by an arbitrary file upload vulnerability.

Description

The remote host is running OneOrZero Helpdesk, a web-based helpdesk application written in PHP.

The version of OneOrZero HelpDesk installed on the remote host allows uploads of arbitrary files via the 'tinfo.php' script provided the 'send_email' POST parameter is set. By uploading a file with, say, arbitrary PHP code, an unauthenticated, remote attacker can likely leverage this issue to execute code subject to the privileges of the web server user id.

Note that successful exploitation of this issue requires that 'Task Attachments' be enabled, which is true by default.

Note that there is also reportedly a SQL injection issue involving the Content_Type for uploaded files and affecting this version of OneOrZero Helpdesk, although Nessus has not checked for it.

Solution

Log in to the application's control panel as the administrator and disable 'Task Attachments' (under 'OneOrZero Settings').

Public Exploits


Target Network Port(s): 80
Target Asset(s): Services/www
Exploit Available: True (Exploit-DB)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the OneOrZero Helpdesk tinfo.php Arbitrary File Upload vulnerability:

  1. Exploit-DB: exploits/php/webapps/7528.pl
    [EDB-7528: OneOrZero helpdesk 1.6.x. - Arbitrary File Upload]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:F/RL:U/RC:ND
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:7.1 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.1 (High)

Go back to menu.

Plugin Source


This is the oneorzero_tinfo_arbitrary_upload.nasl nessus plugin source code. This script is Copyright (C) 2008-2022 Tenable Network Security, Inc.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

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

if (description)
{
  script_id(35261);
  script_version("1.13");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");
  script_bugtraq_id(32959);
  script_xref(name:"EDB-ID", value:"7528");

  script_name(english:"OneOrZero Helpdesk tinfo.php Arbitrary File Upload");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a PHP application that is affected by
an arbitrary file upload vulnerability.");
  script_set_attribute(attribute:"description", value:
"The remote host is running OneOrZero Helpdesk, a web-based helpdesk
application written in PHP. 

The version of OneOrZero HelpDesk installed on the remote host allows
uploads of arbitrary files via the 'tinfo.php' script provided the
'send_email' POST parameter is set.  By uploading a file with, say,
arbitrary PHP code, an unauthenticated, remote attacker can likely
leverage this issue to execute code subject to the privileges of the
web server user id. 

Note that successful exploitation of this issue requires that 'Task
Attachments' be enabled, which is true by default. 

Note that there is also reportedly a SQL injection issue involving the
Content_Type for uploaded files and affecting this version of
OneOrZero Helpdesk, although Nessus has not checked for it.");
  script_set_attribute(attribute:"solution", value:
"Log in to the application's control panel as the administrator and
disable 'Task Attachments' (under 'OneOrZero Settings').");
  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:U/RC:ND");

  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:"2008/12/23");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2008-2022 Tenable Network Security, Inc.");

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

  exit(0);
}


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


port = get_http_port(default:80);
if (!get_port_state(port)) exit(0);
if (!can_host_php(port:port)) exit(0);


# Loop through directories.
if (thorough_tests) dirs = list_uniq(make_list("/ooz", "/oneorzero", "/helpdesk", "/help", cgi_dirs()));
else dirs = make_list(cgi_dirs());

foreach dir (dirs)
{
  magic = unixtime();
  url = string(dir, "/tinfo.php?id=", magic);

  # Make sure we're looking at OneOrZero Helpdesk.
  res = http_send_recv3(port:port, method:"GET", item:url);
  if (isnull(res)) exit(0);

  if (string('<B>Task #', magic, '</B>') >< res[2])
  {
    # Try to upload an incomplete file.
    bound = "nessus";
    boundary = string("--", bound);

    postdata = string(
      boundary, "\r\n", 
      'Content-Disposition: form-data; name="send_mail"', "\r\n",
      "\r\n",
      "1", "\r\n",

      boundary, "\r\n", 
      'Content-Disposition: form-data; name="SelectedFile"; filename="nessus.php"', "\r\n",
      "Content-Type: ' text\r\n",
      "\r\n",
      # nb: without the content, the upload should fail.
      # SCRIPT_NAME, "\r\n",

      boundary, "--", "\r\n"
    );

    res = http_send_recv3(
      port        : port,
      method      : "POST", 
      item        : url, 
      data        : postdata,
      add_headers : make_array(
        "Content-Type", 
        "multipart/form-data; boundary="+bound
      )
    );
    if (isnull(res)) exit(0);

    # There's a problem if we see an error complaining about a partial upload.
    if ("The file was only partially uploaded." >< res[2])
    {
      security_hole(port);
      exit(0);
    }
  }
}

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/oneorzero_tinfo_arbitrary_upload.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\oneorzero_tinfo_arbitrary_upload.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/oneorzero_tinfo_arbitrary_upload.nasl

Go back to menu.

How to Run


Here is how to run the OneOrZero Helpdesk tinfo.php Arbitrary File Upload as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select OneOrZero Helpdesk tinfo.php Arbitrary File Upload plugin ID 35261.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl oneorzero_tinfo_arbitrary_upload.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a oneorzero_tinfo_arbitrary_upload.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - oneorzero_tinfo_arbitrary_upload.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state oneorzero_tinfo_arbitrary_upload.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 35805 - OneOrZero Helpdesk default_language Local File Inclusion
  • 130263 - Adobe ColdFusion File Upload (APSB18-33) (CVE-2018-15961)
  • 39790 - Adobe ColdFusion FCKeditor 'CurrentFolder' File Upload
  • 16061 - e107 Image Manager Unauthorized File Upload
  • 39806 - FCKeditor 'CurrentFolder' Arbitrary File Upload
  • 21780 - FCKeditor on Apache connector.php Crafted File Extension Arbitrary File Upload
  • 69273 - Joomla! 2.5.x < 2.5.14 / 3.x < 3.1.5 .php. File Upload RCE
  • 64470 - Collector Component for Joomla! File Upload RCE
  • 79420 - Creative Contact Form Component for Joomla! File Upload RCE
  • 25736 - Expose for Joomla! File Upload RCE
  • 118310 - jQuery-File-Upload Arbitrary File Upload Vulnerability (Remote Check)
  • 58654 - Lenovo ThinkManagement Console RunAMTCommand Operation -PutUpdateFileCore Command Parsing Arbitrary File Upload
  • 22367 - Limbo Contact Component (com_contact) contact.html.php contact_attach Unrestricted File Upload
  • 82078 - ManageEngine Desktop Central statusUpdate Arbitrary File Upload RCE (intrusive check)
  • 82079 - ManageEngine Desktop Central Arbitrary File Upload and RCE (Safe Check)
  • 71217 - ManageEngine Desktop Central AgentLogUploadServlet Arbitrary File Upload RCE (intrusive check)
  • 71218 - ManageEngine Desktop Central AgentLogUploadServlet Arbitrary File Upload
  • 143600 - ManageEngine ServiceDesk Plus < 10.0 Build 10012 Arbitrary File Upload
  • 63638 - MoinMoin twikidraw.py Traversal File Upload Arbitrary File Overwrite
  • 47581 - Novell 'modulemanager' Servlet Arbitrary File Upload (intrusive check)
  • 47582 - Novell 'modulemanager' Servlet Arbitrary File Upload (safe check)
  • 66914 - Novell ZENworks Control Center File Upload Remote Code Execution (intrusive check)
  • 49271 - OpenX Open Flash Chart ofc_upload_image.php File Upload Arbitrary Code Execution
  • 51119 - Sitefinity CMS Arbitrary File Upload
  • 22303 - TikiWiki jhot.php Arbitrary File Upload
  • 56735 - TimThumb Cache Directory 'src' Parameter Arbitrary PHP File Upload
  • 61517 - Umbraco codeEditorSave.asmx SaveDLRScript Operation Traversal File Upload Arbitrary Command Execution
  • 80083 - Visual Mining NetCharts Server Arbitrary File Upload
  • 105732 - Western Digital MyCloud Unauthenticated File Upload
  • 79421 - Creative Contact Form Plugin for WordPress File Upload RCE
  • 76526 - MailPoet Newsletters for WordPress Arbitrary File Upload
  • 105372 - WP Symposium Plugin Arbitrary File Upload
  • 160208 - WSO2 Multiple Products File Upload Remote Command Execution (CVE-2022-29464)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file oneorzero_tinfo_arbitrary_upload.nasl version 1.13. For more plugins, visit the Nessus Plugin Library.

Go back to menu.