To exploit this vulnerability, an attacker must be on the same network as the vulnerable device. In other words, if the attacker is able to view the log in screen of a vulnerable device, they could attack it.
If they cannot get to the login screen of a vulnerable device, they are not able to exploit the vulnerability
Well, you cannot be sure about anything really, but my gut-feeling this is not intentional - however, maybe this is how it supposed to be, who really knows ?i didnt try on my camera but this code ... you sure this is an unintentional bug?
but wow
Read the explanations linked to in post #1 that covers this.you sure this is an unintentional bug?
Read the explanations linked to in post #1 that covers this.
I have seen this kind of bugs a lot, more times than I can remember...i read everything
this kind of bug is something that a beginner / coop student would make and the fact that (if there is any team) QA and code reviewer didnt catch that is weird
all the stars were aligned
Anyhow, thanks to @watchful_ip report, it were quite obvious it was 'system()' involved, and limited command injection (as per his/her PoC of /etc/passwd), pretty easy to find the 'system()' call with user provided input (actually only one candidate what I saw), little searching with what URI, and then some additional searching for right XML tag (thanks Hik, for your debug note), then test it with 'reboot()' to confirm.I have seen this kind of bugs a lot, more times than I can remember...
All falls down on one stupid 'system()' call.
'system()' should never have any kind of user provided input, (filtered or not) period.
This didn't work using an iMac. Later I'll fire up my linux machine and try again. Admittedly I'm not proficient in this sort of stuff and additionally may have incorrectly installed Python3 on my Mac.You can verify your cams now, PoC here
This didn't work using an iMac. Later I'll fire up my linux machine and try again. Admittedly I'm not proficient in this sort of stuff and additionally may have incorrectly installed Python3 on my Mac.
I named the file hikvision.py rather than the name presented at GitHub.
Python3 hikvision.py --rhost 192.168.x.x --rport8080 --check
Traceback (most recent call last):
File "hikvision.py", line 66, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
I suspect that you have a network connectivity issue with the target.Thanks. Result is "cannot establish connection".
As expected, all is good.
alastair@PC-I5 ~/coding_stuff/bashis_disclosures $ ./Hikvision_CVE-2021-36260_RCE_POC.py --rhost 192.168.1.64 --check
[*] Hikvision CVE-2021-36260
[*] PoC by bashis <mcw noemail eu> (2021)
[*] Checking remote "192.168.1.64:80"
[-] Cannot establish connection to "192.168.1.64:80"
alastair@PC-I5 ~/coding_stuff/bashis_disclosures $
alastair@PC-I5 ~/coding_stuff/bashis_disclosures $ ./Hikvision_CVE-2021-36260_RCE_POC.py --rhost 192.168.1.112 --check
[*] Hikvision CVE-2021-36260
[*] PoC by bashis <mcw noemail eu> (2021)
[*] Checking remote "192.168.1.112:80"
[i] ETag: "e69-258-601f845c"
[!] Remote is verified exploitable
alastair@PC-I5 ~/coding_stuff/bashis_disclosures $
alastair@PC-I5 ~/coding_stuff/bashis_disclosures $ ./Hikvision_CVE-2021-36260_RCE_POC.py --rhost 192.168.1.111 --check
[*] Hikvision CVE-2021-36260
[*] PoC by bashis <mcw noemail eu> (2021)
[*] Checking remote "192.168.1.111:80"
[i] ETag: "468-258-5e6f4e77"
[-] Could not verify if vulnerable (Code: 500)
alastair@PC-I5 ~/coding_stuff/bashis_disclosures $ ./Hikvision_CVE-2021-36260_RCE_POC.py --rhost 192.168.1.64 --check
[*] Hikvision CVE-2021-36260
[*] PoC by bashis <mcw noemail eu> (2021)
[*] Checking remote "192.168.1.64:80"
[i] ETag: "306-258-5e17dd7b"
[-] Could not verify if vulnerable (Code: 500)
alastair@PC-I5 ~/coding_stuff/bashis_disclosures $
The python script does not let me logon to shell after the first attempt. Had to alter the script to get it to let me login to shell repeatedly.