Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception while running on Dahua EZ-IP cameras #7

Open
vascojdb opened this issue Apr 29, 2021 · 5 comments
Open

Exception while running on Dahua EZ-IP cameras #7

vascojdb opened this issue Apr 29, 2021 · 5 comments

Comments

@vascojdb
Copy link

Hi,
I have 10 Dahua EZ-IP IPC-D20B20-ZS cameras, and unfortunately It seems your tool gives me an exception:

Exception thrown attempting web request (http://192.168.0.130/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1): The request was aborted: The operation has timed out.

Opening that link on a browser returns a 404 error page (generated by the camera, not the browser)

I tried to sniff the browser data being changed while sapping the Day/Night options via the web interface and I got this:

Message: POST
To: 192.168.0.130:80/RPC2
Authorization: Basic Authentication (user+pass)
Body: JSON with contents: {"method":"configManager.setConfig","params":{"name":"VideoInMode","table":[{"Config":[X],"Mode":0}],"options":[]},"id":0,"session":"528b19ba62cb02611358896"}

Where [X] is 1 or 0 depending on the day or night profile, the session ID its generated somewhere.

Has anyone contacted you related to any API changes? Since I am not able to find the cgi-bin directory.

Thank you so much for the information

@bp2008
Copy link
Owner

bp2008 commented Apr 29, 2021

I don't know anything about that camera. Couldn't find it via google. It could be that the camera for some reason just doesn't support any of the usual APIs designed for 3rd-party use.

While it is possible to implement something that uses their internal API to basically impersonate a web browser and log in, send the command, and log out, that is not something this app supports.

Has anyone contacted you related to any API changes?

No.

@rapi3
Copy link

rapi3 commented Apr 29, 2021

This camera it is a Huawei product sold under Dahua name and yes it have all the backdoor required to be sold outside China.
https://breakingdefense.com/2019/07/hunting-huaweis-hidden-back-doors/

@vascojdb
Copy link
Author

Thank you for the fast answer. I actually managed to find a python script called DahuaRpc wrapper which implements an RPC protocol wrapper (https://gist.github.com/gxfxyz/48072a72be3a169bc43549e676713201), and I have managed to change the configuration on the cameras. Apparently these cameras use the API via RPC protocol.

@vascojdb
Copy link
Author

Unfortunatly I know nothing of C++/C# to be able to implement this on a fork of your project, so I am afraid I will have to just make a python script on my end :(

@rapi3
Copy link

rapi3 commented Apr 29, 2021

here you can find something that can be useful if you change to use the RPC protocol wrapper you found it:
https://github.com/mcw0/Tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants