Rapid7 Vulnerability & Exploit Database

Hikvision IP Camera Unauthenticated Command Injection

Back to Search

Hikvision IP Camera Unauthenticated Command Injection

Disclosed
09/18/2021
Created
02/26/2022

Description

This module exploits an unauthenticated command injection in a variety of Hikvision IP cameras (CVE-2021-36260). The module inserts a command into an XML payload used with an HTTP PUT request sent to the `/SDK/webLanguage` endpoint, resulting in command execution as the `root` user. This module specifically attempts to exploit the blind variant of the attack. The module was successfully tested against an HWI-B120-D/W using firmware V5.5.101 build 200408. It was also tested against an unaffected DS-2CD2142FWD-I using firmware V5.5.0 build 170725. Please see the Hikvision advisory for a full list of affected products.

Author(s)

  • Watchful_IP
  • bashis
  • 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/hikvision_cve_2021_36260_blind
msf exploit(hikvision_cve_2021_36260_blind) > show targets
    ...targets...
msf exploit(hikvision_cve_2021_36260_blind) > set TARGET < target-id >
msf exploit(hikvision_cve_2021_36260_blind) > show options
    ...show and set options...
msf exploit(hikvision_cve_2021_36260_blind) > 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

;