A Study of WebRTC Security
webrtc-security.github.io
webrtc-security.github.io
This is very misleading. Anonymous VPN users (China, Australia, etc.) don't care about hiding their VPN IP. They care about hiding their real IP.
Unfortunately, the default setup for WebRTC in browsers is to try STUN over _all_ network interfaces, which for default VPN setups on Windows, OSX, and Linux means sending packets outside of the VPN (which leaks your real IP!).
Also unfortunately, triggering the STUN doesn't require user consent, so all it takes is to visit a webpage and you've leaked your real IP[1].
This can literally be deadly default behavior. WebRTC needs to either only perform STUN over the default route, or STUN needs to be behind user opt-in consent (just like getUserMedia).
It also breaks user specified preferences and expected behaviour: if I specify that my browser should use a proxy, it should use it.
If webrtc just performed the expected behavior seems like it wouldn't be an issue.
See https://tools.ietf.org/html/draft-ietf-rtcweb-ip-handling-01 for more details.
Add on to that the fact that none of the popular examples are running on anything resembling the latest version of the spec. It's complete garbage. I've stooped to having to use a third party framework in my project, and that still fails 20% of the time when it's not 100% of the time on iOS.
I lost at least month to WebRTC. They lure you in with the promise of working over your LAN and then completely destroy your dreams. I've had connections report they were successful and still have no audio come through! "Get a TURN server" they say. Did that, didn't help, still have problems because the STUN connections are reporting success so the TURN server is never attempted. No errors, no indication something is wrong. How are you supposed to recover from something like that?
It did take more than a month to get to that point though.
https://github.com/blakelapierre/instantchat
Can't say whether the HEADs work or not. They currently aren't hosted live at the moment, either.
I don't think I had seen any handshake failures in the final versions of the code in those projects.
Also, you need a TURN to work reliably over every possible NAT topology (though, a few years ago I think only about 5% of connections in the wild required TURN).
So, you had video, but no audio?
Regardless, there is nothing within the WebRTC spec for dealing with failed connections. I suppose you could close the WebRTCPeerConnection object, drop it on the floor for the GC to find, and make a new one. But the entire point of providing a list of STUN servers is that it's supposed to find the one that works for you.
I also just found out that, even though Tokbox (the 3rd party framework I'm using for WebRTC now that I've admitted I have more important things to do than screw around with this) is communicating a P2P video or audio connection, it cannot also let you negotiate a P2P data channel.
> As a result of this strong focus on secure communication, WebRTC is currently regarded by some to be one of the most secure VoIP solutions out there. The main premise of having encryption by default is that a call is private at all times. Security and encryption are no longer considered to be optional features. And to round everything off, WebRTC is available free to everyone, providing a tempting and reliable framework for developers to build their next application.
Is it me, or that doesn't have to do with security? Sounds like a sales pitch.
Seems odd to me that being open-source would cause security concerns...
[1] http://doc-kurento.readthedocs.io/en/stable/introducing_kure...
Or the more complex demo, for a video conference where all media is forwarded through the Janus server: https://janus.conf.meetecho.com/videoroomtest.html