Real Time Traffic Over
Total Page:16
File Type:pdf, Size:1020Kb
Real Time Traffic Over Tor Shashwat Chaudhary 2015091 Nikhil Hassija 2015065 BTP report submitted in partial fulfillment of the requirements for the Degree of B.Tech. in Computer Science and Engineering on April 26, 2019 BTP Track: Research Track BTP Advisor Dr. Sambuddho Chakravarty Indraprastha Institute of Information Technology New Delhi Student's Declaration I hereby declare that the work presented in the report titled \Real Time Traffic Over Tor" submitted by us for the partial fulfillment of the requirements for the degree of B.Tech. in Com- puter Science and Engineering at Indraprastha Institute of Information Technology, Delhi, is an authentic record of our work carried out under guidance of Dr. Sambuddho Chakravarty. Due acknowledgements have been given in the report to all material used. This work has not been submitted anywhere else for the reward of any other degree. .............................. .............................. Shashwat Chaudhary Nikhil Hassija Certificate This is to certify that the above statement made by the candidates is correct to the best of my knowledge. .............................. .............................. Dr. Sambuddho Chakravarty Place & Date: 2 Abstract Anonymous censorship resistant communication systems are primarily designed keeping in mind semi real-time traffic such as web browsing. One such system, Tor [1], has gained prominence as the de-facto anonymity preserving censorship resistant system and often used by journalists and whistle-blowers globally. It is however believed that proxy based systems like Tor, that reroute traffic via circuitous paths, potentially incur unwanted latency for real-time applications like VoIP. Moreover, Tor supports only TCP at the transport layer, believed to make it even difficult to send real time data (which depends on UDP). All the existing literature builds on this belief and have proposed various architectures built specifically for anonymous VoIP. However, no one has extensively and empirically quantified the above claims. Hence, in this project we try to explore the performance of VoIP (measuring the PESQ and one way delay) when sent over Tor with various controlled and Internet experiments. The results of these extensive experiments (about 1 million VoIP calls over the Internet) reveal contradictory results in comparison to the existing literature. These results show that anonymous VoIP calling is indeed possible on Tor with more than 80% calls above the PESQ of 3 (considered as good). Acknowledgments First of all, we would like to thank our B.Tech. project advisor Dr. Sambuddho Chakravarty for providing guidance and direction. We would also like to thank Piyush Sharma, for solving any issues we faced at any point during the project, and guiding us in general regarding what we should be doing. We would also like to thank Falak Wani, for working alongside us throughout the project, and mentoring us about concepts we were not familiar with, and familiarizing us with the code he wrote before we started working on the project. Work Distribution • Shashwat Chaudhary - Experiments involving pjsua, freeswitch and openvpn • Nikhil Hassija - Experiments involving Mumble i Contents 1 Introduction 1 2 Related Work 2 3 Experimental Setup 3 3.1 SIP Calling . .3 3.2 Mumble Calling . .3 3.3 SIP Calling Over Tor (V-Tor) . .3 3.4 Mumble Calling Over Tor (M-Tor) . .4 4 Experiments 5 4.1 Controlled Environment Experiments . .5 4.1.1 Maximum Parallel Calls . .5 4.1.2 Single call quality in presence of crosstraffic . .5 4.2 Real Tor Experiments . .5 5 Experimental Results : VPN over Tor 6 5.1 Crosstraffic . .6 5.2 Public Tor Network Experiments . .6 6 Experimental Results : Mumble over Tor 7 6.1 Public Tor Network Experiments . .7 7 Additional Experiments 8 7.1 Skype and Telegram over Tor . .8 7.2 Impact of codecs . .8 7.3 Impact of wireless medium . .9 8 Inferences 10 8.1 Voice quality on Tor . 10 8.2 Why we get good quality . 10 ii Chapter 1 Introduction The problem of anonymity and privacy on the internet is a widely discussed one, and various applications exist which provide us anonymity on the internet while incurring tolerable latency overhead, leading to satisfactory web browsing experience. Tor is one such system. The basic principle behind Tor is routing the user's data through multiple (usually 3) intermediate nodes, called relays, so as to conceal the identity of the sender and/or receiver of data [1]. However, at the same time, anonymous calling on the internet remains a largely unsolved prob- lem. While there are a lot of proposals and prototypes for providing anonymous calls, these prototypes are either completely not deployable, or unmaintained and without any users. See- ing how anonymity network completely rely on their large anonymity set (number of users) to provide anonymity to their users, it is imperative that any anonymous voice calling service have sufficient number of users. Hence, instead of proposing another new architecture, we decided to analyze if it's possible to leverage Tor's preexisting infrastructure and users to facilitate anonymous calling over the internet. However, all the literature was dismissive of Tor's potential to provide anonymous calling. The overall verdict was that the latency of Tor is low enough for semi real-time activities like web browsing, but not for real-time traffic like voice calls. Because of this, our work's primary goal was to isolate the causes of this poor voice calling performance on Tor. We started by performing initial measurements in a controlled setup. We set up a private Tor network in our lab, and ran some experiments. We found out that in a controlled environment, Tor is quite conducive to voice calls. We then proceeded to repeat the experiments on the real Tor network, anticipating that the calls will perform poorly. However, contradictory to all the previous literature on the topic, we found that Tor was able to support voice calls with good quality in a majority of the cases. We felt that literature in the area was lacking and full of inconsistencies, and felt that there was a need to fill the gaps. hence, we launched a comprehensive measurement campaign to verify if voice calling over Tor is possible, and to isolate what characteristics of Tor permit these voice calls. We found that in more than 80% of cases, voice calls through Tor had acceptable quality. 1 Chapter 2 Related Work The earliest work on anonymous calling was by Denezis et. al. [7]. They proposed a relaying based system to obscure the identity of the caller, not very different from relaying in Tor. The first comprehensive evaluation of voice calling on Tor was done by Rizal et. al. in his PhD thesis. He observed that while the one way delay of calls on Tor was < 160ms, the call quality was poor because of high packet loss and jitter. [4] Around the same time, Van Gegels wrote TorFone [5], a software that allows users to avail the facility of both side anonymous calling by routing calls through the Tor network. However, TorFone calls have delay upto 4-5 seconds, which is prohibitive for voice calling. The software is only available for windows XP and isn't actively maintained. In 2015, Herd architecture for anonymous calling was proposed. They stated that Tor's rount trip delay was around 2-4 sec (one way delay 1-2 sec). Ting, in the same year, reported Tor RTT as strictly being under 1 sec, i.e. one way delay <500ms. More recently, Heuser et al. [6]. analyzed performance of Mumble over Tor and reported 777ms of average delay, with both communication parties being anonymous. They also reported very low PESQ score, indicating bad call quality. Our delay measurements indicate acceptable delay, and good call quality. Figure 2.1: Inconsistency in delays reported on Tor 2 Chapter 3 Experimental Setup Our experiments involved two different setups one using SIP calling and other using Mumble. We went with these two setups as they had been used extensively in all the previous studies conducted. 3.1 SIP Calling Session Initiation Protocol (SIP) is the most widely used protocol for internet telephony. To be able to call over the internet we need a caller (SIP Client) and routing service (SIP Server) that can handle incoming and outgoing calls. For our experiments we use FreeSwitch [8] as our SIP server and PJSIP [10] as our SIP Client. Both of the tools are Open Source softwares being maintained regularly. Normally, freeswitch would connect two clients (caller and callee) and let them communicate with each other directly. However, to eliminate network overheads of connecting to callee in some cases we emulate the second client (callee) on the server side and play back an audio file to the caller. 3.2 Mumble Calling Mumble is VoIP application designed for gamers. By its design, Mumble can't support tradi- tional voice over internet calling as VoIP requires some signaling to setup the call. Since we have no such provisions here and only support for channels - where any number of users can join - we emulate calls by having only two users in a separate channel specifically designated for calling. For our experimental setup we are using the official binaries for Mumble server and nodejs-mumble for our Mumble client. Mumble Server has no feature for playing a file when a user connects, thus in cases when we want to eliminate callee delays we run both server and callee on same system. 3.3 SIP Calling Over Tor (V-Tor) SIP calling depends on User Datagram Protocol (UDP) at transport layer and Tor has been known to support only Transmission Control Protocol (TCP). Therefore, to be able to send SIP's UDP packets over Tor we'd need to encapsulate them in TCP packets.