# Neither Denied nor Exposed: Fixing WebRTC Privacy Leaks
## 9 Conclusions  
As web real-time communications gain increasingly more attention because of their simplicity of use via a typical browser, more websites turn their interest to WebRTC. However, although WebRTC is standardized through the W3C and the Internet Engineering Task Force (IETF) [46] and is being used by the most popular browsers, such as Chrome and Firefox, major privacy issues remain unresolved. Namely, in its attempt to bypass network obstacles, such as NAT and firewalls, WebRTC will silently leak peers' IP addresses without asking for permission. This is because WebRTC employs the ICE protocol, and therefore STUN or TURN mechanisms, in order to determine the most efficient connection path between peers. Furthermore, any website is able to force the user's browser to execute such requests to a STUN or TURN server, without the user being notified. Consequently, the owner of the server will be able to log each user's private and public IPs, even if the user is using VPN or an anonymity network. While the existing solutions propose the complete deactivation of WebRTC along with its full capabilities, this work proposes and evaluates two diverse schemes to identify WebRTC communication intentions of a website. The first scheme is a browser's extension which by default disables any STUN or TURN request that a visited webpage may attempt to execute. The second proposes the use of a gateway, which we implemented in both C++ and Golang. The gateway acts as a MITM, inspecting the contents of the webpage before they are sent to the client. If the webpage the user is about to visit is trying to perform any STUN or TURN requests, the user will be informed and asked if they wish to proceed. The first scheme is lightweight with no extra delay as it disables WebRTC by default and re-enables it on-the-fly if the user requires it. However, a different custom-tailored implementation is necessary per browser. The second constitutes a more generic solution as it is browser-independent; however, it adds a more significant delay depending on the size of the webpage, since the source code of the webpage needs to be examined before served. In absence of a built-in browser solution, both the proposed schemes could be proven an acceptable solution as long as WebRTC protocol continues to use untamed STUN or TURN servers for building ICE candidates. Both of the proposed solutions protect the privacy of end-users who utilize WebRTC-capable browsers by completely disabling WebRTC. Obviously, this protection is not provided to users who choose to authorize the use of WebRTC after they have been informed that a webpage is about to use this protocol. In addition to privacy, our proposals safeguard communicating peers from other security-related attacks as well. An example is a script that forces the browser to make a call to a recording device without the user being aware, transforming their computer into a surveillance device. Since the port used by the web browser is open, another attack is to use this port to send arbitrary data bypassing firewalls, thus leaking information outside the intranet. A further example is to abuse the aforementioned open firewall port and turn the browser into a botnet client. From the discussion given in the IP Disclosure subsection, one can mark down some directions for future work. Another line of research could investigate potential security issues that can arise when a user is tricked into using a rogue STUN or TURN server: potential attacks include session hijacking, MITM, and DoS. Future work can also include other solutions to be tested as browsers' extensions, such as white-listing STUN and TURN servers. This way, by defining trusted servers, IP logging from malicious users could be prevented. All the authors have contributed equally to the various stages of this work, including conceptualization, methodology, information gathering, implementation, discussion of the results, and writing of the original version of the manuscript.