Onion adventures
Puglisi, Silvia
Tor is an important tool providing privacy and anonymity online. The Tor network itself is only a part of what Tor is. Tor also provides privacy at the application level through the Tor Browser. The Tor Browser was designed to provide privacy while surfing the web and defend users against both network and local forensic adversaries. The same properties can be adopted by applications and services wishing to integrate the tor network in their architecture. Furthermore, onion services provide better authentication and assurance of who you are talking to. With onion services Tor can provide bi-directional anonymity by making it possible for users to hide their locations while offering various kinds of services, such as web publishing or an instant messaging server. This talk is going to explain how it is possible to integrate tor and build onion applications. or is an important tool providing privacy and anonymity online. The property of anonymity itself is more than just providing an encrypted connection between the source and the destination of a given conversation. Encryption only prevents the content of the communication between Alice and Bob from becoming known. There is in fact a lot of information that can still be learned by just observing encrypted communications. For example, it is always possible to guess certain information by learning some properties of the conversation beyond just the content, such as the length of the conversation, or who was involved, or even guessing a group of people that communicate with a certain frequency. These properties are called metadata and can be used to describe information even when the full data is not available. Anonymity is a broad concept, and it can mean different things to different groups. The main advertised property of the Tor network is that it provides strong anonymity given a variety of people using the network. For the Tor network to function properly and to satisfy users' needs, we need a certain degree of diversity. We need diversity in the nodes relays comprising the network and in the user population sending traffic through it. Lately, we have been introducing new traffic scheduling features in the network in order to solve problems, reduce congestion, and improve overall performance. The Tor network itself is only a part of what Tor is. Tor also provides privacy at the application level through the Tor Browser. Other applications can also make use of the Tor network to be more secure. Onion services provide better authentication and assurance of who you are talking to. In this case, Tor can provide bi-directional anonymity by making it possible for users to hide their locations while offering various kinds of services, such as web publishing or an instant messaging server. This talk is going to introduce what it does mean to do web development with privacy in mind. We will start by presenting a few example of applications that use onion services and follow up with tips on how to integrate onion services in your architecture and how to provide a seamless frontend experience for privacy-concerned people that prefer to use the Tor Browser.
 Hello. Yeah. So those are, thank you very much. Those are my contact information if we want to ask questions later also or just get in touch, feel free. It's my email, my master's and my Twitter. So I should do some advertising. We have a tour booth in Building K where all the projects are. There are stickers, so feel free to go and grab. And we have a relay operator meetup if you want to run a relay. That's tomorrow, 3 p.m. Building H, room 3244. So note that down if you want to come. It's one hour and you can ask questions and know how you can run a relay and what do you need. So my name is Silvia. I'm online. I'm a hero. I work at the tour project and I also part of the information security group at UPC Barcelona. So what did this talk is about? It's not a general talk about tour, but I will go through what tour is and what does it do so that we have the information fresh. There is a tour talk tomorrow in the privacy truck by Roger. It's at 11. The room is Jason, I think, or Johnson, not Jason. Yeah. So then we will talk about onion services. Again, I will go quickly through our onion service work and the architecture because the main topic is how can I use onion services. So what is tour, actually? So tour is free software to begin with. It's a community of people that do different things. We have developers, researchers, relay operators, volunteers. Everybody does different things. Some people just advocate. Some people do more development work and some people do actual research and mathematical models. So it's a bit of everything. Tour is a network and is a non-profit. We have about 2 million users every day using the tour network. I said user, not people because we don't know if those are people. They could be machines. And we have 6,000 relays and about 1,000 bridges. Those are nodes in the tour network that volunteers run so that you can use it. So what does tour do? Tour provides privacy to begin with. Provides anonymity, provides communication security, provides a traffic analysis resistant communication network. Those are mainly the same things said in different ways and to different people maybe, different set of people that would understand the concept with different words. But the last point, it's the most important point for us and tour provides reachability against censorship. Most of the people that use tour want to access Facebook because they cannot do it in their own country. So how does it work? Tour provides privacy by distributing trust. You have your traffic routed across the network of nodes run by volunteers and this is different from the idea of running a VPN where you only have one single point of failure or one single node where your traffic goes out and you need to trust the service that you're using. In this case you don't have to trust anyone. The trust is distributed across the network. So, okay, we have Alice and Bob because we always have Alice and Bob. So Alice wants to visit Bob. Bob is a website. Alice has a tour client and obtains a list of nodes from a directory server, picks a path to the tour networks and reaches Bob.com. So the purple lines are encrypted and they run into the tour network and the green line is out in the Internet. And the encryption protocol on that connection depends on the encryption protocol that Bob is using in this case. So if they're using HTTP, the traffic is unclear. If not, it's encrypted. So it's always important to use secure protocols even if you're using tour. So if then Alice wants to visit different websites like Jane, Alice's client will pick a different path, totally different path and will reach Jane.com. So there is no way in generally speaking to trace the two connections and understand that Alice is visiting Bob first and Jane later. So this is one concept that we always say is that tour provides anonymity and it's more than encryption anonymity because, so if I'm calling a mental health helpline and the service I'm using doesn't know what I'm saying but knows I'm calling this helpline at midnight, they probably know that someone I know, myself, has some mental health issues. And this goes for a lot of different things because encryption doesn't hide the conversation metadata. It can hide the content but not the information about the conversation that can already say a lot about the content. Encryption doesn't hide your social graph, who you're talking to. It doesn't hide some metadata from the network, it doesn't hide your location but anonymity does and this is what tour provides. So there is always this question about why tour provides a browser and this is because we think that tour browser is a way that you can serve the web in a safe way and this is the easiest way to provide safe use of tour. And tour browser is a modified Firefox, there are some things packaged inside, it's tour, tour button, tour launcher, no script and HTTPS everywhere. And the idea, the properties that you get by using tour browser is of course you use tour safely than just running Firefox over tour, it's a little bit different but also it's engineered let's say to reduce linkability between different activities. So the idea that you have website first and then another later, the advertising network on both websites wouldn't be able to recognize you unless for example you're logged into Facebook and Google while using tour. So we also provide these things called onion services to have what we say bi-directional anonymity. So the idea is that you reach a website within the tour network, the service stays in the tour network. So if you remember the green line representing an encrypted connection, that green line doesn't exist anymore, the service stays in the tour network and can enjoy all the properties provided by the tour network. So there are some other interesting things about onion services, they can be started from your computer, they appear to be decentralized. Because they live on the tour network, they have a smaller attack surface, they provide bi-directional anonymity and also the onion service address are public keys and with version 3 onion service you can create as many sub-keys as you want. So ideally you can use different keys for different purposes. So more or less this is how onion service work, Bob is an onion services and picks three nodes in the network and builds a circuit to them. These are called introduction points. Then advertises the service to the directory service which is basically a database and says hey I exist and send some information to the database. And then there is Alice and Alice knows that Bob exists. So they ask some information to the database and set up a tour node, it's a rendezvous point. So Alice has learned the introduction point from the database, picks one and send a message to Bob telling Bob something like hey meet me at rendezvous point and also send a one-time secret to Bob. Bob connects to the rendezvous point, they exchange a secret and they just use a tour circuit as normally. So between Alice and the rendezvous point there is a three-off store circuit and between Bob and the rendezvous point there is another three-off onion circuit. So it's basically six-ops of a circuit. So that is the thing, we have these services, how do we use them? The idea is to have a little bit of ecosystem of application and service that live on the tour network. So the first thing is like okay I set up a SSH service from a Docker container from my computer and I use it because I need to. And okay I have a container, I have some configuration and I just start the container and that's on my computer any successful through SSH, Vitor of course. So if you want to set up SSH survey in reality you just need to configure the Torrcc file and just change a few lines. You set the Indian service directory, the port that you want to expose and the port of the service that is running on the machine. The Torrcc file is a lot longer, has a lot of configuration options but it's all for all the different cases that you might use like running relays and so on. So there is these things, Torrsox and it's bundled into Torr when you install it on your system and it's like a wrapper application for Sox 5 and you can use it for running Torrcc comments over Torr. So if I want to run car, I do it over Torrsox and that's running over Torr. So I can access onion service or I can just, if I want to use some APIs privately, I can do it through that. And of course I can use it also while I'm programming or scripting or developing something. So this is a small example with using request for Python and I do a get over on onion services which is archive.torr.org and I could do that through Torrsox, basically using the Sox 5 interface that is exposed by Torr. So but there is more that I can do. So the idea is these things is decentralized, it's peer-to-peer, I can run it from my computer and I can do a lot more with it. So there is this sharing application which is very small, it's called onion share and it's used basically to say you want to send a file to a friend, you start on your share on your machine, onion share starts an onion service, you upload a file and your friend can access that file through the drop browser without using dropbox or anything and when you don't want the file to be available anymore, you just shut it down and that's it and it's gone. So the idea is that what if I want to share a static website to a friend, just for some time, HTML, JavaScript, CSS, images, nothing fancy but I want to put it online and I want to also send on my computer just because I'm working on something and I want to share it. So this is basically a hack at the moment, I don't know when it will go into onion share but it's a gift by the way, it shares a folder with a website and all the files and it makes it available on Torr browser. And so the way it does this is onion share is a flask application so it basically injects the HTML of the files you want to share when you read it so it started copy the address, put it there on Torr browser and yeah, it's loading. Anyway, yeah, so it injects the HTML from the files you want to share into the flask templates at the moment. It's a bit rusty but it's working and this is like the support project from Torr and that's me stopping the casting. So but there's something more that we can do, right? What if just instead of sharing files and running study website we can launch any service that we want for our computer. We put in a container and we have a wrapper application and we just have it available on the Torr network easily just because we want to test something or just because we want to use it. And there is this thing that I was working on, it's called MyOnion and it basically starts Torr containers with at the moment there is only the configuration for running a web service with NGINX and fetching a website and again it's very few lines of code that actually do the code and do the work and I wanted to show this to show that it's not complicated to use this. It's not sub-executive technology and with a few lines you can already start doing something. And in this case I just call Docker with this client variable and I send the containers website to just the Docker file, the folder where the Docker files is and I just launch it and basically that's it. This is the configuration for the container, it's Debian and it's pretty basic. Okay, the video doesn't play. That's fine. But the idea was the same like with Onion Share that you have an application, you click a button and you receive an Onion address, you put it in Torr browser and it's available. So this is why it's interesting. Onion services live on the Torr network, provide anonymity to the service provider and the visitors. You can ask them from everywhere, you don't need hosting. If you wanted to run a website from your computer you could. And that's it. The idea basically the gateway to having decentralized services, they are safe to use. This is the most important thing. And so I don't know, for me it's very important because the idea that you can run something so easily from your computer, from your home and then make it disappear in a way set you free to many possibilities of stuff that you can do. And one practical example I have of this is that in some countries hosting is expensive. So what people do, they set up Onion services on Raspberry Pi and they have their website for their shop, for example, running from there. And of course it might not be 100% reliable but it's still free. You stick into whatever you want with it. So that's it. You can send questions. Yeah. In the slide where they subscribe to the directory services, the directory services appear like just one node. How is that? Is it one node or is it? It's one node but it can, yes, sorry. The question is that if Onion services are decentralized, how come they advertise to the directory services which is just one node? So the thing is on the network, any node can become a directory service for a long time. If it's online for a long time. So you start as relay and then if you have good performance of the relay, you get promoted to different roles within the network for a certain amount of time. So what is true that they advertise to the directory service? Any node can be a directory service. There was a question upstairs actually before. The same question. Okay. So you free. The question is about load balancing for Onion services and there is an Onion balancer. But at the moment, it doesn't support the function that you would expect for an Onion balancer. Like for example, to have many Onion balancer. So it can be a bottleneck. But there is this person called Alec Moffat. He works at Facebook and has been working on the Onion service that Facebook use. And he has been working a lot of the Onion balancer and so on. So if you Google Onion balancer in his name, you will find a lot of stuff that he has found working on this. Go ahead. I don't know. The question is regarding SSH and HTTP and IPv4 and if you can use how does it change when you use Onion services? The IP doesn't matter because it's on the Tor network. And only matters is the key that is used for the Onion service address. So imagine that on the same machine you could have different services that are on your services and they are available for different ports. But also the thing is you could also change the keys if you want the keys not to be known, for example, and other things. But IP doesn't matter anymore because it's only the key which is the service address. Yeah. Anyone have different services under the same key? I don't think so. Actually, sorry. If you could run different Onion services under the same public key, I think the keys and identifier. So I assume that for each service you have a key. But I wouldn't know if you would change something with the ports. Maybe you could do. I'm not sure. If you could share the same key with different computers. I'm not sure. You could try to export the key. But every time you create an Onion service, Tor creates a different key. And you can do some key management. I don't know about fallback. I'm not sure. I think they cannot be active at the same time, basically. So it's like two different addresses. But if you want to export it so that you keep the key, yes. Yeah. I wonder how do you pick entry nodes? So the question is how do you pick entry nodes? And this is the Tor client that does it. So basically you receive a list of nodes and you pick randomly among that list. Yeah. Yeah. So the question is about the node that you use to use the Tor networks. So they're not free for the Onion service, you mean. Not for your client. So the idea is in the algorithm to use three introduction points and have them use different points. I'm not sure why three exactly. In the case of the hops is because of there are some models about the idea that you entry from one side. The middle node doesn't know where you're coming from. And the exit node just see the middle node, basically. The kind of thing. So it's in the algorithm in the Onion routing. How can we help Tor? So how can we help Tor? That was the question. You cannot run relays, which are the core of the network, which is the main thing. You can volunteer your time advocating, developing, researching on Tor. You can donate. If that's what you want, they give you t-shirts in exchange and other things or nothing depends. But mostly, helping the network using the browser be part of it. Time's up. Okay.
 Hello. Yeah. So those are, thank you very much. Those are my contact information if  we want to ask questions later also or just get in touch, feel free. It's my email, my  master's and my Twitter. So I should do some advertising. We have a tour booth in Building  K where all the projects are. There are stickers, so feel free to go and grab. And we have a relay  operator meetup if you want to run a relay. That's tomorrow, 3 p.m. Building H, room 3244. So note  that down if you want to come. It's one hour and you can ask questions and know how you can run a  relay and what do you need. So my name is Silvia. I'm online. I'm a hero. I work at the tour project  and I also part of the information security group at UPC Barcelona. So what did this talk  is about? It's not a general talk about tour, but I will go through what tour is and what does it do  so that we have the information fresh. There is a tour talk tomorrow in the privacy truck by Roger.  It's at 11. The room is Jason, I think, or Johnson, not Jason. Yeah. So then we will talk about  onion services. Again, I will go quickly through our onion service work and the architecture  because the main topic is how can I use onion services. So what is tour, actually? So tour is  free software to begin with. It's a community of people that do different things. We have  developers, researchers, relay operators, volunteers. Everybody does different things. Some  people just advocate. Some people do more development work and some people do actual  research and mathematical models. So it's a bit of everything. Tour is a network and is a  non-profit. We have about 2 million users every day using the tour network. I said user, not  people because we don't know if those are people. They could be machines. And we have 6,000 relays  and about 1,000 bridges. Those are nodes in the tour network that volunteers run so that you can use it.  So what does tour do? Tour provides privacy to begin with. Provides anonymity, provides communication  security, provides a traffic analysis resistant communication network. Those are mainly the  same things said in different ways and to different people maybe, different set of people that  would understand the concept with different words. But the last point, it's the most important  point for us and tour provides reachability against censorship. Most of the people that use tour  want to access Facebook because they cannot do it in their own country. So how does it work? Tour  provides privacy by distributing trust. You have your traffic routed across the network of nodes  run by volunteers and this is different from the idea of running a VPN where you only have one  single point of failure or one single node where your traffic goes out and you need to trust the  service that you're using. In this case you don't have to trust anyone. The trust is distributed  across the network. So, okay, we have Alice and Bob because we always have Alice and Bob. So Alice  wants to visit Bob. Bob is a website. Alice has a tour client and obtains a list of nodes from a  directory server, picks a path to the tour networks and reaches Bob.com. So the purple lines are  encrypted and they run into the tour network and the green line is out in the Internet. And the  encryption protocol on that connection depends on the encryption protocol that Bob is using in  this case. So if they're using HTTP, the traffic is unclear. If not, it's encrypted. So it's always  important to use secure protocols even if you're using tour. So if then Alice wants to visit  different websites like Jane, Alice's client will pick a different path, totally different path  and will reach Jane.com. So there is no way in generally speaking to trace the two connections  and understand that Alice is visiting Bob first and Jane later. So this is one concept that we  always say is that tour provides anonymity and it's more than encryption anonymity because, so if  I'm calling a mental health helpline and the service I'm using doesn't know what I'm saying but  knows I'm calling this helpline at midnight, they probably know that someone I know, myself, has some  mental health issues. And this goes for a lot of different things because encryption doesn't hide  the conversation metadata. It can hide the content but not the information about the conversation  that can already say a lot about the content. Encryption doesn't hide your social graph,  who you're talking to. It doesn't hide some metadata from the network, it doesn't hide  your location but anonymity does and this is what tour provides. So there is always this question  about why tour provides a browser and this is because we think that tour browser is a way that  you can serve the web in a safe way and this is the easiest way to provide safe use of tour. And  tour browser is a modified Firefox, there are some things packaged inside, it's tour,  tour button, tour launcher, no script and HTTPS everywhere. And the idea, the properties that  you get by using tour browser is of course you use tour safely than just running Firefox over  tour, it's a little bit different but also it's engineered let's say to reduce linkability  between different activities. So the idea that you have website first and then another later,  the advertising network on both websites wouldn't be able to recognize you unless for example  you're logged into Facebook and Google while using tour. So we also provide these things called  onion services to have what we say bi-directional anonymity. So the idea is that you reach a  website within the tour network, the service stays in the tour network. So if you remember the  green line representing an encrypted connection, that green line doesn't exist anymore, the service  stays in the tour network and can enjoy all the properties provided by the tour network. So there  are some other interesting things about onion services, they can be started from your computer,  they appear to be decentralized. Because they live on the tour network, they have a smaller  attack surface, they provide bi-directional anonymity and also the onion service address  are public keys and with version 3 onion service you can create as many sub-keys as you want.  So ideally you can use different keys for different purposes. So more or less this is how  onion service work, Bob is an onion services and picks three nodes in the network and builds a  circuit to them. These are called introduction points. Then advertises the service to the directory  service which is basically a database and says hey I exist and send some information to the  database. And then there is Alice and Alice knows that Bob exists. So they ask some information  to the database and set up a tour node, it's a rendezvous point. So Alice has learned the  introduction point from the database, picks one and send a message to Bob telling Bob  something like hey meet me at rendezvous point and also send a one-time secret to Bob.  Bob connects to the rendezvous point, they exchange a secret and they just use a tour  circuit as normally. So between Alice and the rendezvous point there is a three-off  store circuit and between Bob and the rendezvous point there is another three-off onion circuit.  So it's basically six-ops of a circuit. So that is the thing, we have these services,  how do we use them? The idea is to have a little bit of ecosystem of application and  service that live on the tour network. So the first thing is like okay I set up a SSH service  from a Docker container from my computer and I use it because I need to. And okay I have a  container, I have some configuration and I just start the container and that's on my computer  any successful through SSH, Vitor of course. So if you want to set up SSH survey in reality you  just need to configure the Torrcc file and just change a few lines. You set the Indian  service directory, the port that you want to expose and the port of the service that is running on  the machine. The Torrcc file is a lot longer, has a lot of configuration options but it's  all for all the different cases that you might use like running relays and so on. So there is  these things, Torrsox and it's bundled into Torr when you install it on your system and it's like  a wrapper application for Sox 5 and you can use it for running Torrcc comments over Torr. So if I  want to run car, I do it over Torrsox and that's running over Torr. So I can access  onion service or I can just, if I want to use some APIs privately, I can do it through that.  And of course I can use it also while I'm programming or scripting or developing something.  So this is a small example with using request for Python and I do a get over on onion services  which is archive.torr.org and I could do that through Torrsox, basically using the Sox 5 interface  that is exposed by Torr. So but there is more that I can do. So the idea is these things is  decentralized, it's peer-to-peer, I can run it from my computer and I can do a lot more with it.  So there is this sharing application which is very small, it's called onion share and it's used  basically to say you want to send a file to a friend, you start on your share on your machine,  onion share starts an onion service, you upload a file and your friend can access that file  through the drop browser without using dropbox or anything and when you don't want the file to be  available anymore, you just shut it down and that's it and it's gone. So the idea is that what if I  want to share a static website to a friend, just for some time, HTML, JavaScript, CSS, images,  nothing fancy but I want to put it online and I want to also send on my computer just  because I'm working on something and I want to share it. So this is basically a hack at the  moment, I don't know when it will go into onion share but it's a gift by the way, it shares  a folder with a website and all the files and it makes it available on Torr browser.  And so the way it does this is onion share is a flask application so it basically injects  the HTML of the files you want to share when you read it so it started copy the address,  put it there on Torr browser and yeah, it's loading. Anyway, yeah, so it injects the HTML  from the files you want to share into the flask templates at the moment. It's a bit rusty but  it's working and this is like the support project from Torr and that's me stopping the casting.  So but there's something more that we can do, right?  What if just instead of sharing files and running study website we can launch any service that we  want for our computer. We put in a container and we have a wrapper application and we just  have it available on the Torr network easily just because we want to test something or just  because we want to use it. And there is this thing that I was working on, it's called MyOnion  and it basically starts Torr containers with at the moment there is only the configuration for  running a web service with NGINX and fetching a website and again it's very few lines of code  that actually do the code and do the work and I wanted to show this to show that it's not  complicated to use this. It's not sub-executive technology and with a few lines you can already  start doing something. And in this case I just call Docker with this client variable and  I send the containers website to just the Docker file, the folder where the Docker files is  and I just launch it and basically that's it. This is the configuration for the container,  it's Debian and it's pretty basic. Okay, the video doesn't play. That's fine. But the idea was the  same like with Onion Share that you have an application, you click a button and you receive an  Onion address, you put it in Torr browser and it's available. So this is why it's interesting.  Onion services live on the Torr network, provide anonymity to the service provider and the visitors.  You can ask them from everywhere, you don't need hosting. If you wanted to run a website from your  computer you could. And that's it. The idea basically the gateway to having decentralized  services, they are safe to use. This is the most important thing. And so I don't know, for me it's  very important because the idea that you can run something so easily from your computer, from your  home and then make it disappear in a way set you free to many possibilities of stuff that you can  do. And one practical example I have of this is that in some countries hosting is expensive.  So what people do, they set up Onion services on Raspberry Pi and they have their website for  their shop, for example, running from there. And of course it might not be 100% reliable but it's  still free. You stick into whatever you want with it. So that's it. You can send questions.  Yeah.  In the slide where they subscribe to the directory services, the directory services appear like  just one node. How is that? Is it one node or is it?  It's one node but it can, yes, sorry. The question is that if Onion services are decentralized,  how come they advertise to the directory services which is just one node? So the thing is on the  network, any node can become a directory service for a long time. If it's online for a long time.  So you start as relay and then if you have good performance of the relay, you get promoted to  different roles within the network for a certain amount of time. So what is true that they advertise  to the directory service? Any node can be a directory service.  There was a question upstairs actually before. The same question. Okay. So you free.  The question is about load balancing for Onion services and there is an Onion balancer.  But at the moment, it doesn't support the function that you would expect for an Onion balancer.  Like for example, to have many Onion balancer. So it can be a bottleneck. But there is this  person called Alec Moffat. He works at Facebook and has been working on the Onion service that  Facebook use. And he has been working a lot of the Onion balancer and so on. So if you Google  Onion balancer in his name, you will find a lot of stuff that he has found working on this.  Go ahead.  I don't know. The question is regarding SSH and HTTP and IPv4 and if you can use  how does it change when you use Onion services?  The IP doesn't matter because it's on the Tor network. And only matters is the key  that is used for the Onion service address. So imagine that on the same machine you could  have different services that are on your services and they are available for different ports.  But also the thing is you could also change the keys if you want the keys not to be known,  for example, and other things. But IP doesn't matter anymore because it's only the key which  is the service address. Yeah.  Anyone have different services under the same key?  I don't think so. Actually, sorry. If you could run different Onion services under the  same public key, I think the keys and identifier. So I assume that for each service you have a key.  But I wouldn't know if you would change something with the ports. Maybe you could do.  I'm not sure. If you could share the same key with different computers. I'm not sure. You could  try to export the key. But every time you create an Onion service, Tor creates a different key.  And you can do some key management. I don't know about fallback. I'm not sure.  I think they cannot be active at the same time, basically. So it's like two different  addresses. But if you want to export it so that you keep the key, yes.  Yeah. I wonder how do you pick entry nodes?  So the question is how do you pick entry nodes? And this is the Tor client that does it.  So basically you receive a list of nodes and you pick randomly among that list.  Yeah.  Yeah.  So the question is about the node that you use to use the Tor networks. So they're not  free for the Onion service, you mean. Not for your client. So the idea is in the algorithm to  use three introduction points and have them use different points. I'm not sure why three exactly.  In the case of the hops is because of there are some models about the idea that you entry from  one side. The middle node doesn't know where you're coming from. And the exit node just  see the middle node, basically. The kind of thing. So it's in the algorithm in the Onion routing.  How can we help Tor? So how can we help Tor? That was the question. You cannot run relays,  which are the core of the network, which is the main thing. You can volunteer your time advocating,  developing, researching on Tor. You can donate. If that's what you want, they give you t-shirts in  exchange and other things or nothing depends. But mostly, helping the network using the browser  be part of it.  Time's up. Okay.
Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_0_143.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_144_227.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_228_311.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_312_359.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_360_407.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_408_587.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_588_647.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_648_839.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_840_1379.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_1380_1559.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_1560_1883.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_1884_2483.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_2484_4895.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_4896_5639.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_5640_16391.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_16392_16643.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_16644_16823.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_16824_18947.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_18948_19859.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_19860_20339.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_20340_21779.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_21780_22547.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_22548_26255.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_26256_26495.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_26496_27359.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_27360_28139.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_28140_29483.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_29484_34139.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_34140_34919.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_34920_35327.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_35328_35735.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_35736_35831.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_35832_36731.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_36732_36863.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_36864_36911.png Onion_adventures_how_to_use_onion_services_and_the_Tor_network_in_your_web_endeavors_e25aS2L21Kk_36912_37029.png
Hello. Yeah. So those are, thank you very much. Those are my contact information if we want to ask questions later also or just get in touch, feel free. It's my email, my master's and my Twitter. So I should do some advertising. We have a tour booth in Building K where all the projects are. There are stickers, so feel free to go and grab. And we have a relay operator meetup if you want to run a relay. That's tomorrow, 3 p.m. Building H, room 3244. So note that down if you want to come. It's one hour and you can ask questions and know how you can run a relay and what do you need. So my name is Silvia. I'm online. I'm a hero. I work at the tour project and I also part of the information security group at UPC Barcelona. So what did this talk is about? It's not a general talk about tour, but I will go through what tour is and what does it do so that we have the information fresh. There is a tour talk tomorrow in the privacy truck by Roger. It's at 11. The room is Jason, I think, or Johnson, not Jason. Yeah. So then we will talk about onion services. Again, I will go quickly through our onion service work and the architecture because the main topic is how can I use onion services. So what is tour, actually? So tour is free software to begin with. It's a community of people that do different things. We have developers, researchers, relay operators, volunteers. Everybody does different things. Some people just advocate. Some people do more development work and some people do actual research and mathematical models. So it's a bit of everything. Tour is a network and is a non-profit. We have about 2 million users every day using the tour network. I said user, not people because we don't know if those are people. They could be machines. And we have 6,000 relays and about 1,000 bridges. Those are nodes in the tour network that volunteers run so that you can use it. So what does tour do? Tour provides privacy to begin with. Provides anonymity, provides communication security, provides a traffic analysis resistant communication network. Those are mainly the same things said in different ways and to different people maybe, different set of people that would understand the concept with different words. But the last point, it's the most important point for us and tour provides reachability against censorship. Most of the people that use tour want to access Facebook because they cannot do it in their own country. So how does it work? Tour provides privacy by distributing trust. You have your traffic routed across the network of nodes run by volunteers and this is different from the idea of running a VPN where you only have one single point of failure or one single node where your traffic goes out and you need to trust the service that you're using. In this case you don't have to trust anyone. The trust is distributed across the network. So, okay, we have Alice and Bob because we always have Alice and Bob. So Alice wants to visit Bob. Bob is a website. Alice has a tour client and obtains a list of nodes from a directory server, picks a path to the tour networks and reaches Bob.com. So the purple lines are encrypted and they run into the tour network and the green line is out in the Internet. And the encryption protocol on that connection depends on the encryption protocol that Bob is using in this case. So if they're using HTTP, the traffic is unclear. If not, it's encrypted. So it's always important to use secure protocols even if you're using tour. So if then Alice wants to visit different websites like Jane, Alice's client will pick a different path, totally different path and will reach Jane.com. So there is no way in generally speaking to trace the two connections and understand that Alice is visiting Bob first and Jane later. So this is one concept that we always say is that tour provides anonymity and it's more than encryption anonymity because, so if I'm calling a mental health helpline and the service I'm using doesn't know what I'm saying but knows I'm calling this helpline at midnight, they probably know that someone I know, myself, has some mental health issues. And this goes for a lot of different things because encryption doesn't hide the conversation metadata. It can hide the content but not the information about the conversation that can already say a lot about the content. Encryption doesn't hide your social graph, who you're talking to. It doesn't hide some metadata from the network, it doesn't hide your location but anonymity does and this is what tour provides. So there is always this question about why tour provides a browser and this is because we think that tour browser is a way that you can serve the web in a safe way and this is the easiest way to provide safe use of tour. And tour browser is a modified Firefox, there are some things packaged inside, it's tour, tour button, tour launcher, no script and HTTPS everywhere. And the idea, the properties that you get by using tour browser is of course you use tour safely than just running Firefox over tour, it's a little bit different but also it's engineered let's say to reduce linkability between different activities. So the idea that you have website first and then another later, the advertising network on both websites wouldn't be able to recognize you unless for example you're logged into Facebook and Google while using tour. So we also provide these things called onion services to have what we say bi-directional anonymity. So the idea is that you reach a website within the tour network, the service stays in the tour network. So if you remember the green line representing an encrypted connection, that green line doesn't exist anymore, the service stays in the tour network and can enjoy all the properties provided by the tour network. So there are some other interesting things about onion services, they can be started from your computer, they appear to be decentralized. Because they live on the tour network, they have a smaller attack surface, they provide bi-directional anonymity and also the onion service address are public keys and with version 3 onion service you can create as many sub-keys as you want. So ideally you can use different keys for different purposes. So more or less this is how onion service work, Bob is an onion services and picks three nodes in the network and builds a circuit to them. These are called introduction points. Then advertises the service to the directory service which is basically a database and says hey I exist and send some information to the database. And then there is Alice and Alice knows that Bob exists. So they ask some information to the database and set up a tour node, it's a rendezvous point. So Alice has learned the introduction point from the database, picks one and send a message to Bob telling Bob something like hey meet me at rendezvous point and also send a one-time secret to Bob. Bob connects to the rendezvous point, they exchange a secret and they just use a tour circuit as normally. So between Alice and the rendezvous point there is a three-off store circuit and between Bob and the rendezvous point there is another three-off onion circuit. So it's basically six-ops of a circuit. So that is the thing, we have these services, how do we use them? The idea is to have a little bit of ecosystem of application and service that live on the tour network. So the first thing is like okay I set up a SSH service from a Docker container from my computer and I use it because I need to. And okay I have a container, I have some configuration and I just start the container and that's on my computer any successful through SSH, Vitor of course. So if you want to set up SSH survey in reality you just need to configure the Torrcc file and just change a few lines. You set the Indian service directory, the port that you want to expose and the port of the service that is running on the machine. The Torrcc file is a lot longer, has a lot of configuration options but it's all for all the different cases that you might use like running relays and so on. So there is these things, Torrsox and it's bundled into Torr when you install it on your system and it's like a wrapper application for Sox 5 and you can use it for running Torrcc comments over Torr. So if I want to run car, I do it over Torrsox and that's running over Torr. So I can access onion service or I can just, if I want to use some APIs privately, I can do it through that. And of course I can use it also while I'm programming or scripting or developing something. So this is a small example with using request for Python and I do a get over on onion services which is archive.torr.org and I could do that through Torrsox, basically using the Sox 5 interface that is exposed by Torr. So but there is more that I can do. So the idea is these things is decentralized, it's peer-to-peer, I can run it from my computer and I can do a lot more with it. So there is this sharing application which is very small, it's called onion share and it's used basically to say you want to send a file to a friend, you start on your share on your machine, onion share starts an onion service, you upload a file and your friend can access that file through the drop browser without using dropbox or anything and when you don't want the file to be available anymore, you just shut it down and that's it and it's gone. So the idea is that what if I want to share a static website to a friend, just for some time, HTML, JavaScript, CSS, images, nothing fancy but I want to put it online and I want to also send on my computer just because I'm working on something and I want to share it. So this is basically a hack at the moment, I don't know when it will go into onion share but it's a gift by the way, it shares a folder with a website and all the files and it makes it available on Torr browser. And so the way it does this is onion share is a flask application so it basically injects the HTML of the files you want to share when you read it so it started copy the address, put it there on Torr browser and yeah, it's loading. Anyway, yeah, so it injects the HTML from the files you want to share into the flask templates at the moment. It's a bit rusty but it's working and this is like the support project from Torr and that's me stopping the casting. So but there's something more that we can do, right? What if just instead of sharing files and running study website we can launch any service that we want for our computer. We put in a container and we have a wrapper application and we just have it available on the Torr network easily just because we want to test something or just because we want to use it. And there is this thing that I was working on, it's called MyOnion and it basically starts Torr containers with at the moment there is only the configuration for running a web service with NGINX and fetching a website and again it's very few lines of code that actually do the code and do the work and I wanted to show this to show that it's not complicated to use this. It's not sub-executive technology and with a few lines you can already start doing something. And in this case I just call Docker with this client variable and I send the containers website to just the Docker file, the folder where the Docker files is and I just launch it and basically that's it. This is the configuration for the container, it's Debian and it's pretty basic. Okay, the video doesn't play. That's fine. But the idea was the same like with Onion Share that you have an application, you click a button and you receive an Onion address, you put it in Torr browser and it's available. So this is why it's interesting. Onion services live on the Torr network, provide anonymity to the service provider and the visitors. You can ask them from everywhere, you don't need hosting. If you wanted to run a website from your computer you could. And that's it. The idea basically the gateway to having decentralized services, they are safe to use. This is the most important thing. And so I don't know, for me it's very important because the idea that you can run something so easily from your computer, from your home and then make it disappear in a way set you free to many possibilities of stuff that you can do. And one practical example I have of this is that in some countries hosting is expensive. So what people do, they set up Onion services on Raspberry Pi and they have their website for their shop, for example, running from there. And of course it might not be 100% reliable but it's still free. You stick into whatever you want with it. So that's it. You can send questions. Yeah. In the slide where they subscribe to the directory services, the directory services appear like just one node. How is that? Is it one node or is it? It's one node but it can, yes, sorry. The question is that if Onion services are decentralized, how come they advertise to the directory services which is just one node? So the thing is on the network, any node can become a directory service for a long time. If it's online for a long time. So you start as relay and then if you have good performance of the relay, you get promoted to different roles within the network for a certain amount of time. So what is true that they advertise to the directory service? Any node can be a directory service. There was a question upstairs actually before. The same question. Okay. So you free. The question is about load balancing for Onion services and there is an Onion balancer. But at the moment, it doesn't support the function that you would expect for an Onion balancer. Like for example, to have many Onion balancer. So it can be a bottleneck. But there is this person called Alec Moffat. He works at Facebook and has been working on the Onion service that Facebook use. And he has been working a lot of the Onion balancer and so on. So if you Google Onion balancer in his name, you will find a lot of stuff that he has found working on this. Go ahead. I don't know. The question is regarding SSH and HTTP and IPv4 and if you can use how does it change when you use Onion services? The IP doesn't matter because it's on the Tor network. And only matters is the key that is used for the Onion service address. So imagine that on the same machine you could have different services that are on your services and they are available for different ports. But also the thing is you could also change the keys if you want the keys not to be known, for example, and other things. But IP doesn't matter anymore because it's only the key which is the service address. Yeah. Anyone have different services under the same key? I don't think so. Actually, sorry. If you could run different Onion services under the same public key, I think the keys and identifier. So I assume that for each service you have a key. But I wouldn't know if you would change something with the ports. Maybe you could do. I'm not sure. If you could share the same key with different computers. I'm not sure. You could try to export the key. But every time you create an Onion service, Tor creates a different key. And you can do some key management. I don't know about fallback. I'm not sure. I think they cannot be active at the same time, basically. So it's like two different addresses. But if you want to export it so that you keep the key, yes. Yeah. I wonder how do you pick entry nodes? So the question is how do you pick entry nodes? And this is the Tor client that does it. So basically you receive a list of nodes and you pick randomly among that list. Yeah. Yeah. So the question is about the node that you use to use the Tor networks. So they're not free for the Onion service, you mean. Not for your client. So the idea is in the algorithm to use three introduction points and have them use different points. I'm not sure why three exactly. In the case of the hops is because of there are some models about the idea that you entry from one side. The middle node doesn't know where you're coming from. And the exit node just see the middle node, basically. The kind of thing. So it's in the algorithm in the Onion routing. How can we help Tor? So how can we help Tor? That was the question. You cannot run relays, which are the core of the network, which is the main thing. You can volunteer your time advocating, developing, researching on Tor. You can donate. If that's what you want, they give you t-shirts in exchange and other things or nothing depends. But mostly, helping the network using the browser be part of it. Time's up. Okay.
and I also part of the information security group we have the information fresh. There is a tour not Jason. Yeah. So then we will talk about onion onion service work and the architecture because the main topic is how can I use onion services. people that do different things. We have development work and some people do actual day using the tour network. I said user, not traffic analysis resistant communication network. different ways and to different people maybe, because they cannot do it in their own country. So how does it work? Tour provides privacy by and you need to trust the service that you're using. In this case you don't have to trust network. So, okay, we have Alice and Bob because directory server, picks a path to the tour it's always important to use secure protocols anonymity and it's more than encryption anonymity conversation metadata. It can hide the content but not the information about the conversation Encryption doesn't hide your social graph, who you're talking to. It doesn't hide some metadata provides. So there is always this question about serve the web in a safe way and this is the easiest way to provide safe use of tour. And tour representing an encrypted connection, that green the tour network and can enjoy all the properties they can be started from your computer, they surface, they provide bi-directional anonymity service work, Bob is an onion services and picks three nodes in the network and builds a circuit to them. These are called introduction points. rendezvous point. So Alice has learned the between Alice and the rendezvous point there is a privately, I can do it through that. And of from my computer and I can do a lot more with it. application and we just have it available on the there is this thing that I was working on, it's containers with at the moment there is only the sub-executive technology and with a few lines you computer, from your home and then make it one node. How is that? Is it one node or is it? directory service for a long time. If it's online for a long time. So you start as relay and then network for a certain amount of time. So what is The same question. Okay. So you free. The the moment, it doesn't support the function that And he has been working a lot of the Onion it change when you use Onion services? The IP doesn't matter because it's on the Tor network. that are on your services and they are available not to be known, for example, and other things. about the node that you use to use the Tor be part of it. Time's up. Okay.