Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Amcrest Camera/NVR Multiple Vulnerabilities

Critical

Synopsis

Tenable has discovered a couple of vulnerabilities in the port 37777 interface found on a variety of Amcrest/Dahua IP camera and NVR devices. Initially, we verified these vulnerabilities to be present on the Amcrest IP2M-841 and Amcrest 1080-Lite 8CH, and Amcrest verified the issue on a number of their other products. We also assume the vulnerabilities are present among other Dahua developed devices.

CVE-2020-5735: Remote Authenticated Stack Buffer Overflow

A remote authenticated attacker can send a crafted message to port 37777 and overflow a stack-based buffer. Specifically, using command 0x62 with subcommand 0x04 invoke DDNS testing logic within the device. When providing the DDNS testing logic with a large Protocol field value a memcpy() will write beyond the bounds of a stack buffer. At the very least, the resulting crash force the camera to reboot. We also believe that this could be used to execute arbitrary code.

We've created a proof of concept that reproduces the crash. You can find it on our GitHub.

CVE-2020-5736: Remote Authenticated Null Ptr Dereference

A remote authenticated attacker can send a crafted message to port 37777 and crash the device. Specifically, invoking command 0xa2 to reach the log search functionality and providing a payload length of 0 results in the crash due to a NULL pointer dereference

We've created a proof of concept that reproduces the crash. You can find it on our GitHub.

Brute forcing over port 37777

Amcrest / Dahua have taken steps to ensure that login brute force attacks cannot take place over the HTTP interface. For example, the NVR under test only allows 10 login attempts and the camera under test allows 30 attempts. However, there is no restriction on the number of login attempts over port 37777 despite using the same credentials. Furthemore, this interface offers all the administrative capabilities and video/audio streaming offered by the HTTP interface. The only thing preventing brute force attacks on port 37777 is a proprietary login algorithm which we have obviously have implemented in our PoC.

As such, we suggest user's not expose this port to the internet. However we observe that Shodan has flagged ~1.3 million hosts exposing this interface.

Solution

Amcrest passed the following solution to Tenable.

Amcrest_SD-Mao-Rhea_Eng_N_Stream3_AMCREST_V2.623.00AC004.0.R.200316.bin applies to the following models:
IP2M-853EW
IP2M-858W
IP4M-1053EW
IP2M-866W
IP2M-866EW

Amcrest_XVR5x04-X1_Eng_N_Amcrest_V4.000.00AC000.0.R.200218.bin applies to the following models:
AMDV10814-H5

Amcrest_IPC-AWXX_Eng_N_AMCREST_V2.420.AC00.18.R.20200217.bin applies to the following models:
IP2M-841
IPM-721
IPM-HX1

Amcrest_IPC-HX2(1)XXX-Sag_Eng_N_AMCREST_V2.800.00AC000.0.R.200330.bin applies to the following models:
IP8M-2597E

Amcrest_IPC-Consumer-Web-Mao-Molec_Eng_N_AMCREST_V2.800.0000000.6.R.200314.bin applies to the following models:
IP2M-841-V3

Amcrest_IPC-HX5X3X-Rhea_Eng_NP_Stream3_AMCREST_V2.622.00AC000.0.R.200320.bin applies to the following models:
IP8M-2493EB
IP8M-2496EB
IP8M-2454EW
IP8M-T2499EW
IP8M-MT2544EW
IP8M-MB2546EW

Disclosure Timeline

01/07/2020 - Tenable reaches out to known contact asking for a current security contact.
01/07/2020 - Amcrest responds with good contact.
01/08/2020 - Tenable discloses. CC's Dahua contact. 90 Day is April 7.
01/15/2020 - Tenable asks Amcrest/Dahua to confirm receipt of the disclosure.
01/15/2020 - Amcrest confirms.
02/17/2020 - Tenable asks for an update.
02/17/2020 - Amcrest indicates they'll send a test firmware.
02/18/2020 - Amcrest sends a test firmware.
02/19/2020 - Tenable asks about coordination with Dahua.
02/24/2020 - Amcrest discusses approach to patching.
02/28/2020 - Amcrest asks Tenable if they've tested.
02/28/2020 - Tenable indicates inability to test due to travel.
03/02/2020 - Tenable and Amcrest exchange emails discussing Tenable's inability to test.
04/06/2020 - Tenable asks Amcrest if there will be a release.
04/07/2020 - Amcrest indicates there will be a release.
04/07/2020 - Amcrest provides a list of firmware.
04/07/2020 - Tenable thanks Amcrest.

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Try for Free Buy Now

Try Tenable.io

FREE FOR 30 DAYS

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Sign up now.

Buy Tenable.io

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

65 assets

Choose Your Subscription Option:

Buy Now
Try for Free Buy Now

Try Nessus Professional Free

FREE FOR 7 DAYS

Nessus® is the most comprehensive vulnerability scanner on the market today. Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy Nessus Professional

Nessus® is the most comprehensive vulnerability scanner on the market today. Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy a multi-year license and save. Add Advanced Support for access to phone, community and chat support 24 hours a day, 365 days a year. Full details here.

Try for Free Buy Now

Try Tenable.io Web Application Scanning

FREE FOR 30 DAYS

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable.io platform. Safely scan your entire online portfolio for vulnerabilities with a high degree of accuracy without heavy manual effort or disruption to critical web applications. Sign up now.

Buy Tenable.io Web Application Scanning

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

5 FQDNs

$3,578

Buy Now

Try for Free Contact Sales

Try Tenable.io Container Security

FREE FOR 30 DAYS

Enjoy full access to the only container security offering integrated into a vulnerability management platform. Monitor container images for vulnerabilities, malware and policy violations. Integrate with continuous integration and continuous deployment (CI/CD) systems to support DevOps practices, strengthen security and support enterprise policy compliance.

Buy Tenable.io Container Security

Tenable.io Container Security seamlessly and securely enables DevOps processes by providing visibility into the security of container images – including vulnerabilities, malware and policy violations – through integration with the build process.

Learn More about Industrial Security

Get a Demo of Tenable.sc

Please fill out the form below with your contact information and a sales representative will contact you shortly to schedule a demo. You may also include a short comment (limited to 255 characters). Please note that fields with asterisks (*) are mandatory.

Try for Free Contact Sales

Try Tenable Lumin

FREE FOR 30 DAYS

Visualize and explore your Cyber Exposure, track risk reduction over time and benchmark against your peers with Tenable Lumin.

Buy Tenable Lumin

Contact a Sales Representative to see how Lumin can help you gain insight across your entire organization and manage cyber risk.

Request a demo of Tenable.ot

Get the Operational Technology Security You Need.
Reduce the Risk You Don’t.