Vulnerabilities > CVE-2018-5724 - Unrestricted Upload of File with Dangerous Type vulnerability in Barni Master IP Camera01 Firmware 3.3.4.2103
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
HIGH Integrity impact
HIGH Availability impact
HIGH Summary
MASTER IPCAMERA01 3.3.4.2103 devices allow Unauthenticated Configuration Download and Upload, as demonstrated by restore.cgi.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
OS | 1 | |
Hardware | 1 |
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Accessing Functionality Not Properly Constrained by ACLs In applications, particularly web applications, access to functionality is mitigated by the authorization framework, whose job it is to map ACLs to elements of the application's functionality; particularly URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker may be able to access it with impunity. An attacker with the ability to access functionality not properly constrained by ACLs can obtain sensitive information and possibly compromise the entire application. Such an attacker can access resources that must be available only to users at a higher privilege level, can access management sections of the application or can run queries for data that he is otherwise not supposed to.
- Privilege Abuse An adversary is able to exploit features of the target that should be reserved for privileged users or administrators but are exposed to use by lower or non-privileged accounts. Access to sensitive information and functionality must be controlled to ensure that only authorized users are able to access these resources. If access control mechanisms are absent or misconfigured, a user may be able to access resources that are intended only for higher level users. An adversary may be able to exploit this to utilize a less trusted account to gain information and perform activities reserved for more trusted accounts. This attack differs from privilege escalation and other privilege stealing attacks in that the adversary never actually escalates their privileges but instead is able to use a lesser degree of privilege to access resources that should be (but are not) reserved for higher privilege accounts. Likewise, the adversary does not exploit trust or subvert systems - all control functionality is working as configured but the configuration does not adequately protect sensitive resources at an appropriate level.
Exploit-Db
description | Master IP CAM 01 - Multiple Vulnerabilities. CVE-2018-5723,CVE-2018-5724,CVE-2018-5725,CVE-2018-5726. Remote exploit for Hardware platform |
file | exploits/hardware/remote/43693.txt |
id | EDB-ID:43693 |
last seen | 2018-01-24 |
modified | 2018-01-17 |
platform | hardware |
port | |
published | 2018-01-17 |
reporter | Exploit-DB |
source | https://www.exploit-db.com/download/43693/ |
title | Master IP CAM 01 - Multiple Vulnerabilities |
type | remote |
Packetstorm
data source | https://packetstormsecurity.com/files/download/145935/masteripcam01-bypass.txt |
id | PACKETSTORM:145935 |
last seen | 2018-01-18 |
published | 2018-01-17 |
reporter | Daniele Linguaglossa |
source | https://packetstormsecurity.com/files/145935/Master-IP-CAM-01-Hardcoded-Password-Unauthenticated-Access.html |
title | Master IP CAM 01 Hardcoded Password / Unauthenticated Access |
Seebug
bulletinFamily | exploit |
description | Some time ago I analized this ipcam with my friend Dzonerzy: ![](https://images.seebug.org/1516608424106) ![](https://images.seebug.org/1516608432157) ``` var serialNum="VVVIPCSBC150617Z-06929VjmJH54vkK"; var model="RT_IPC"; var hardVersion="5900-gc1004"; var softVersion="V3.3.4.2103-S50-SBC-B20150721E"; var ipcname="WIFICAM"; var startdate="2017-8-5 0:0:2"; var runtimes="0 day, 0:54"; var sdstatus="Ready"; var sdfreespace="3400608 "; var sdtotalspace="3969024 "; var builddate="Jul 20 2015 "; var productmodel="null"; var vendor="RTJ"; var swver=""; var hwver=""; var mppver="mpp"; ``` We found some vulnerabilities but we might find much more in the next days. In this first article we will describe: * [CVE-2018-5724] Unauthenticated Configuration Download and Upload * [CVE-2018-5723] Hardcoded Password for Root Account * [CVE-2018-5725] Unauthenticated Configuration Change * [CVE-2018-5726] Unauthenticated Sensitive Information Disclousure I will update this post with the new vulnerabilities we will found. ### Introduction First of all we ran nmap: ``` Stone:~ syrion$ nmap 192.168.1.124 -sV -sT -p 1-65535 Starting Nmap 7.40 ( https://nmap.org ) at 2017-12-23 17:41 CET Nmap scan report for 192.168.1.124 Host is up (0.026s latency). Not shown: 65528 closed ports PORT STATE SERVICE VERSION 23/tcp open telnet BusyBox telnetd 80/tcp open http thttpd 2.25b 29dec2003 554/tcp open rtsp HiLinux IP camera rtspd V100R003 (VodServer 1.0.0) 1018/tcp open soap gSOAP 2.8 1235/tcp open mosaicsyssvc1? 8840/tcp open rtsp 60075/tcp open unknown Service Info: Host: RT-IPC; Device: webcam Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 51.44 seconds ``` There were different services running on the camera but we started from the webapp. There was a login page where we could login with admin:admin ![](https://images.seebug.org/1516608488987) Obviously every request was in HTTP (LOL). The web application had not so much functionality but after some researches on google we found this manual with a lot of cgi command like the one we found in our ipcam. ### [CVE-2018-5724] Unauthenticated Configuration Download and Upload We could download the configuration file: ![](https://images.seebug.org/1516608518141) The first step was uncompressing the config_backup.bin file: ``` Stone:Desktop syrion$ tar xvf config_backup.bin ``` There were a lot of configuration files. But let’s look at the webserver.conf: ``` port=80 user=root cgipat=cgi-bin/** nosymlink globalpasswd debug cgilimit=30 ``` From nmap we knew the webserver was thttpd 2.25b 29dec2003, so after read the manual we discovered how to change the root directory of the webserver, so we modified the configuration file as follow: ``` port=80 user=root dir=/etc/ nosymlink globalpasswd debug cgilimit=30 ``` Ok at this point we only needed something to upload the new configuration file. The manual helped us again: ![](https://images.seebug.org/1516608605277) It worked and after some minutes the ipcamera was online again: ![](https://images.seebug.org/1516608630832) ### [CVE-2018-5723] Hardcoded Password for Root Account Good, we got the passwd file with the password hash for user root: ``` root:$1$xFoO/s3I$zRQPwLG2yX1biU31a2wxN/:0:0::/root:/bin/sh ``` With John we cracked it: ![](https://images.seebug.org/1516608677350) And yes, we got root: ![](https://images.seebug.org/1516608687222) ### [CVE-2018-5725] Unauthenticated Configuration Change Without any authentication we could change the port where the server was running: ![](https://images.seebug.org/1516608717912) ![](https://images.seebug.org/1516608728179) ![](https://images.seebug.org/1516608737767) ### [CVE-2018-5726] Unauthenticated Sensitive Information Disclousure That was so magic: ![](https://images.seebug.org/1516608753172) |
id | SSV:97101 |
last seen | 2018-01-22 |
modified | 2018-01-22 |
published | 2018-01-22 |
reporter | Root |
title | Master IP CAM 01 Vulnerabilities |
References
- http://syrion.me/blog/master-ipcam/
- http://syrion.me/blog/master-ipcam/
- https://packetstormsecurity.com/files/145935/Master-IP-CAM-01-Hardcoded-Password-Unauthenticated-Access.html
- https://packetstormsecurity.com/files/145935/Master-IP-CAM-01-Hardcoded-Password-Unauthenticated-Access.html
- https://www.exploit-db.com/exploits/43693/
- https://www.exploit-db.com/exploits/43693/