BEWARD N100 H.264 VGA IP Camera M2.1.6 Root Remote Code Execution

Title: BEWARD N100 H.264 VGA IP Camera M2.1.6 Root Remote Code Execution
Advisory ID: ZSL-2019-5512
Type: Remote/Local
Impact: System Access, DoS
Risk: (4/5)
Release Date: 04.02.2019
Summary
The N100 compact color IP camera with support for a more efficient compression format is optimized for low-speed networks, thanks to which it transmits a real-time image over the network with minimal delays. The camera supports the switching of the broadcast modes, and in the event of a break in communication with the remote file storage, it can continue recording to the microSDHC memory card. N100 is easy to install and configure, has all the necessary arsenal for the organization of low-cost professional video surveillance systems.
Description
The camera suffers from two authenticated command injection vulnerabilities. The issues can be triggered when calling ServerName and TimeZone GET parameters via the servertest page. This can be exploited to inject arbitrary system commands and gain root remote code execution.
Vendor
Beward R&D Co., Ltd - https://www.beward.net
Affected Version
M2.1.6.04C014
Tested On
Boa/0.94.14rc21
Farady ARM Linux 2.6
Vendor Status
[26.01.2019] Vulnerability discovered.
[28.11.2018] Vendor contacted.
[03.02.2019] No response from the vendor.
[04.02.2019] Public security advisory released.
PoC
beward_root.txt
Credits
Vulnerability discovered by Gjoko Krstic - <gjoko@zeroscience.mk>
References
[1] https://www.exploit-db.com/exploits/46319
[2] https://packetstormsecurity.com/files/151531
[3] https://exchange.xforce.ibmcloud.com/vulnerabilities/156599
[4] https://cxsecurity.com/issue/WLB-2019020042
Changelog
[04.02.2019] - Initial release
[10.02.2019] - Added reference [1], [2], [3] and [4]
Contact
Zero Science Lab

Web: http://www.zeroscience.mk
e-mail: lab@zeroscience.mk