Multiple Command Injection Vulnerabilities in Grandstream Products - Nessus

Critical   Plugin ID: 123520

This page contains detailed information about the Multiple Command Injection Vulnerabilities in Grandstream Products Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 123520
Name: Multiple Command Injection Vulnerabilities in Grandstream Products
Filename: grandstream_2019_003.nasl
Vulnerability Published: 2019-03-22
This Plugin Published: 2019-04-01
Last Modification Time: 2022-02-09
Plugin Version: 1.9
Plugin Type: remote
Plugin Family: Misc.
Dependencies: grandstream_www_detect.nbin
Required KB Items [?]: installed_sw/Grandstream Phone

Vulnerability Information


Severity: Critical
Vulnerability Published: 2019-03-22
Patch Published: 2019-03-22
CVE [?]: CVE-2019-10655, CVE-2019-10656, CVE-2019-10657, CVE-2019-10658, CVE-2019-10659, CVE-2019-10660, CVE-2019-10661, CVE-2019-10662, CVE-2019-10663
CPE [?]: N/A

Synopsis

The remote device is vulnerable and can be compromised

Description

Multiple Vulnerabilities in Grandstream devices.

- The affected devices are: GAC2500, GVC3202, GXP2200, GXV3275, GXV3240, GXV3611IR_HD, GXV3611IR_HD, GXV3611IR_HD, UCM6204, GXV3370, WP820, GWN7000, & GWN7610.

- A remote command execution vulnerability exists in the 'priority' and 'logserver' parameters. An unauthenticated, remote attacker can exploit them to bypass authentication and execute arbitrary commands with root privileges.

- A blind command injection vulnerability exists in the 'filename' and 'file-backup' parameters. An unauthenticated, remote attacker can exploit this to bypass authentication and obtain a root shell.

Solution

Update to the fixed version as per the advisory.

Public Exploits


Target Network Port(s): 80, 443
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Multiple Command Injection Vulnerabilities in Grandstream Products vulnerability:

  1. Metasploit: exploit/linux/http/grandstream_gxv3175_settimezone_unauth_cmd_exec
    [Grandstream GXV3175 'settimezone' Unauthenticated Command Execution]
  2. Metasploit: exploit/linux/http/grandstream_gxv31xx_settimezone_unauth_cmd_exec
    [Grandstream GXV31XX 'settimezone' Unauthenticated Command Execution]
  3. Metasploit: exploit/linux/http/grandstream_ucm62xx_sendemail_rce
    [Grandstream UCM62xx IP PBX sendPasswordEmail RCE]
  4. GitHub: https://github.com/scarvell/grandstream_exploits
    [CVE-2019-10655]
  5. GitHub: https://github.com/scarvell/grandstream_exploits
    [CVE-2019-10656]
  6. GitHub: https://github.com/scarvell/grandstream_exploits
    [CVE-2019-10658]
  7. GitHub: https://github.com/scarvell/grandstream_exploits
    [CVE-2019-10659]
  8. GitHub: https://github.com/scarvell/grandstream_exploits
    [CVE-2019-10660]
  9. GitHub: https://github.com/scarvell/grandstream_exploits
    [CVE-2019-10662]

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 Score Source [?]: CVE-2019-10661
CVSS V2 Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.3 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.3 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.1 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.1 (Critical)

Go back to menu.

Plugin Source


This is the grandstream_2019_003.nasl nessus plugin source code. This script is Copyright (C) 2019-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#
# (C) Tenable Network Security, Inc.
#

include('compat.inc');

if (description)
{
  script_id(123520);
  script_version("1.9");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/02/09");

  script_cve_id(
    "CVE-2019-10655",
    "CVE-2019-10656",
    "CVE-2019-10657",
    "CVE-2019-10658",
    "CVE-2019-10659",
    "CVE-2019-10660",
    "CVE-2019-10661",
    "CVE-2019-10662",
    "CVE-2019-10663"
  );

  script_name(english:"Multiple Command Injection Vulnerabilities in Grandstream Products");

  script_set_attribute(attribute:"synopsis", value:
"The remote device is vulnerable and can be compromised");
  script_set_attribute(attribute:"description", value:
"Multiple Vulnerabilities in Grandstream devices.

   - The affected devices are: GAC2500, GVC3202, GXP2200,
     GXV3275, GXV3240, GXV3611IR_HD, GXV3611IR_HD, GXV3611IR_HD,
     UCM6204, GXV3370, WP820, GWN7000, & GWN7610.

   - A remote command execution vulnerability exists in the 'priority'
     and 'logserver' parameters. An unauthenticated, remote attacker can exploit
     them to bypass authentication and execute arbitrary commands
     with root privileges.

   - A blind command injection vulnerability exists in the 'filename'
     and 'file-backup' parameters. An unauthenticated, remote
     attacker can exploit this to bypass authentication and obtain a root shell.");
  # https://www.trustwave.com/en-us/resources/security-resources/security-advisories/?fid=23920
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?0e9e1acb");
  script_set_attribute(attribute:"solution", value:
"Update to the fixed version as per the advisory.");
  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:F/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-10661");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Grandstream GXV31XX settimezone Unauthenticated Command Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2019/03/22");
  script_set_attribute(attribute:"patch_publication_date", value:"2019/03/22");
  script_set_attribute(attribute:"plugin_publication_date", value:"2019/04/01");

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

  script_category(ACT_GATHER_INFO);
  script_family(english:"Misc.");

  script_copyright(english:"This script is Copyright (C) 2019-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("grandstream_www_detect.nbin");
  script_require_keys("installed_sw/Grandstream Phone");
  script_require_ports("Services/www", 80, 443);

  exit(0);
}

include('vcf.inc');
include('vcf_extras.inc');

port = get_http_port(default:80, embedded:TRUE);
app_info = vcf::get_app_info(app:'Grandstream Phone', port:port);

models = {
  'GAC2500'      : { 'constraints': [{'max_version' : '1.0.3.35',  'fixed_version' : '1.0.3.37',  'fixed_display' : '1.0.3.37 (Beta)'}]},
  'GVC3200'      : { 'constraints': [{'max_version' : '1.0.3.51',  'fixed_version' : '1.0.3.57',  'fixed_display' : '1.0.3.57 (Beta)'}]},
  'GVC3202'      : { 'constraints': [{'max_version' : '1.0.3.51',  'fixed_version' : '1.0.3.57',  'fixed_display' : '1.0.3.57 (Beta)'}]},
  'GXP2200'      : { 'constraints': [{'max_version' : '1.0.3.27',  'fixed_display' : 'Contact Vendor'}]},
  'GXV3240'      : { 'constraints': [{'max_version' : '1.0.3.210', 'fixed_version' : '1.0.3.219', 'fixed_display' : '1.0.3.219 (Beta)'}]},
  'GXV3275'      : { 'constraints': [{'max_version' : '1.0.3.210', 'fixed_version' : '1.0.3.219', 'fixed_display' : '1.0.3.219 (Beta)'}]},
  'GXV3611IR_HD' : { 'constraints': [{'max_version' : '1.0.3.21',  'fixed_version' : '1.0.3.23',  'fixed_display' : '1.0.3.23'}]},
  'UCM6204'      : { 'constraints': [{'max_version' : '1.0.18.12', 'fixed_version' : '1.0.19.20', 'fixed_display' : '1.0.19.20 (Beta)'}]},
  'GXV3370'      : { 'constraints': [{'max_version' : '1.0.1.33',  'fixed_version' : '1.0.1.41',  'fixed_display' : '1.0.1.41 (Beta)'}]},
  'WP820'        : { 'constraints': [{'max_version' : '1.0.1.15',  'fixed_version' : '1.0.3.6',   'fixed_display' : '1.0.3.6'}]},
  'GWN7000'      : { 'constraints': [{'max_version' : '1.0.4.12',  'fixed_version' : '1.0.6.32',  'fixed_display' : '1.0.6.32'}]},
  'GWN7610'      : { 'constraints': [{'max_version' : '1.0.8.9',   'fixed_version' : '1.0.8.18',  'fixed_display' : '1.0.8.18'}]}
};

vcf::grandstream::check_version_and_report(app_info:app_info, constraints:models[app_info.model]['constraints'], severity:SECURITY_HOLE);

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

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

Go back to menu.

How to Run


Here is how to run the Multiple Command Injection Vulnerabilities in Grandstream Products 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 Misc. plugin family.
  6. On the right side table select Multiple Command Injection Vulnerabilities in Grandstream Products plugin ID 123520.
  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 grandstream_2019_003.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - grandstream_2019_003.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 grandstream_2019_003.nasl -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 123796 - Blind Command Injection Vulnerability in Grandstream Products
  • 124173 - Multiple Command Injection Vulnerabilities in Grandstream Products
  • 160530 - Grandstream Networks UCM6200 Series SQLi (Phone Web UI)
  • 160531 - Grandstream Networks UCM6200 Series SQLi (Web UI)
  • 160532 - Grandstream Networks UCM6200 Series SQLi (SIP)
  • 11197 - Multiple Ethernet Driver Frame Padding Information Disclosure (Etherleak)
  • 49217 - Multiple Switch Vendors '__super' Account Backdoor
  • 44937 - Multiple Adobe Products XML External Entity (XXE) Injection (APSB10-05)
  • 49003 - Multiple Vulnerabilities in the IOS FTP Server
  • 49017 - Multiple Cisco Products Vulnerable to DNS Cache Poisoning Attacks
  • 139545 - Multiple Vulnerabilities in Treck IP Stack Affecting Cisco Products: June 2020 (cisco-sa-treck-ip-stack-JyBQ5GyC)
  • 11748 - Multiple Dangerous CGI Script Detection
  • 33447 - Multiple Vendor DNS Query ID Field Prediction Cache Poisoning
  • 10821 - Multiple FTPD glob Command Arbitrary Command Execution
  • 10084 - Multiple FTP Server Command Handling Overflow
  • 10930 - Multiple Web Server on Windows MS/DOS Device Request Remote DOS
  • 11337 - Multiple Linux rpc.mountd Remote Overflow
  • 10176 - Multiple Vendor phf CGI Arbitrary Command Execution
  • 10249 - Multiple Mail Server EXPN/VRFY Information Disclosure
  • 40449 - Multiple Vendor HMAC Authentication SNMPv3 Authentication Bypass
  • 10282 - Multiple Vendor test-cgi Arbitrary File Access
  • 11136 - Multiple OS /bin/login Remote Overflow
  • 80475 - Multiple Slider Plugins for WordPress 'img' Parameter Local File Inclusion Vulnerability
  • 31683 - Multiple Vendor NIS rpc.ypupdated YP Map Update Arbitrary Remote Command Execution

Version


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

Go back to menu.