ask .. and you shall receive ..
Matt200 - Thank you for a direct answer. Seeing this video makes it obvious that I've had tunnel vision specifically about P2P as it applies to Dahua devices. Instead of asking how P2P is exploited, I should have been asking how it's exploited on Dahua devices because that's what I'm interested in. These are the key points I found in the video:
1:50 Tested SVC3 camera used as test subject pinged 3 servers at commonly used (for P2P) UDP port 32100
Most used P2P software that's embedded in devices is either CS2 Network P2P or Shenzhen Yunni iLink P2P.
5:10 Most P2P devices do not go through a firewall (
I tend to disagree, but that's what he said).
5:23 Major risk is remote code execution, not spying. The RCE malware has the ability to punch through firewalls.
6:40 The device user ID (UID) is generated by P2P software provider and used by the device manufacturer. Anyone who knows the UID can connect with the device. (
With Dahua the UID is the device serial #. Note that "connect" is not the same as gaining access.)
12:06 General discussion on how to guess or discover UIDs
- Can locate P2P servers by brute force IP probing
- Some UIDs are revealed in amazon reviews
- In general, brute force probing for UIDs is impractical
- Checksum algorithm for iLink devices has been discovered, making brute force UID probing feasible with them
16:42 Many devices use default passwords, making only UID required to get into device (
Dahua doesn't allow default passwords)
17:23 Was able to get root shell access in a Shenzen Hichip Vision Technology camera that uses the iLink P2P software
- Once in with root access, the password can be discovered
- (
I was waiting for discussion of RCE here but didn't catch it)
21:44 Encryption is not built into the CS2 or iLink packages. Left to the device application
22:17 Discussion of man-in-middle attacks. Works only when the legitimate user is actively logged in.
23:45 Discussion of superdevices that relay P2P traffic, often without user knowledge or consent. (
I didn't fully absorb this and don't think it's applicable
to Dahua devices).
My conclusions from this, to exploit Dahua P2P:
1. Must somehow find out the device serial # and password.
-OR-
2. Find out the device serial # and be able to get backdoor root access.
And the first questions I don't know the answer to are:
1. Is there a known hack to gain access to a shell with root privileges?
2. It it possible to achieve remote code execution? (
My guess is no via a firmware update, and maybe via writing code to RAM).