1 00:00:00,000 --> 00:00:01,000 So far. 2 00:00:01,000 --> 00:00:07,000 I mentioned the word VPN in a number of lectures, but I never really explained what it is. 3 00:00:08,000 --> 00:00:15,000 So in this lecture I'm going to explain what a VPN is, how it works, and how we can use it to bypass 4 00:00:15,000 --> 00:00:20,000 censorship and protect our privacy, anonymity and security. 5 00:00:21,000 --> 00:00:28,000 So VPN stands for Virtual Private Network, and to understand how it works, let's first have a look 6 00:00:28,000 --> 00:00:34,000 on a normal scenario where we have a user trying to access Google.com, as we mentioned before. 7 00:00:34,000 --> 00:00:40,000 Usually this traffic is sent unencrypted unless Google or the website they're trying to access uses 8 00:00:40,000 --> 00:00:41,000 encryption. 9 00:00:41,000 --> 00:00:46,000 And like we said, this traffic passes through a number of routers, it passes through your Internet 10 00:00:46,000 --> 00:00:48,000 service provider and so on. 11 00:00:48,000 --> 00:00:54,000 And all of these stops can see the data that you're sending and manipulate it, profile you, gather 12 00:00:54,000 --> 00:00:56,000 information about you, and so on. 13 00:00:56,000 --> 00:01:05,000 Now if you use a VPN, you will first connect to the VPN server, which you can think of as a computer 14 00:01:05,000 --> 00:01:09,000 that exists on the Internet, on the cloud, with really good resources. 15 00:01:09,000 --> 00:01:15,000 And what happens is you create an encrypted tunnel, an encrypted connection with this computer. 16 00:01:16,000 --> 00:01:23,000 So whenever you want to access anything on the Internet, you send that first to this computer. 17 00:01:23,000 --> 00:01:25,000 But the request is sent encrypted. 18 00:01:25,000 --> 00:01:31,000 Hence, I used a green arrow in here to indicate that the data sent is encrypted. 19 00:01:32,000 --> 00:01:38,000 So whenever you want to access something, both you and the VPN server will be able to read this data 20 00:01:38,000 --> 00:01:39,000 and understand it. 21 00:01:39,000 --> 00:01:45,000 But if anybody intercepts this data, whether it's your Internet service provider, whether it's your 22 00:01:45,000 --> 00:01:51,000 network admin, whether it's a hacker, they will not be able to read this data or manipulate it or 23 00:01:51,000 --> 00:01:54,000 profile you because this data will be encrypted. 24 00:01:54,000 --> 00:01:55,000 It will be gibberish. 25 00:01:56,000 --> 00:02:02,000 Then once the VPN receives the data, once it sees, for example, you want to go to Google.com, it 26 00:02:02,000 --> 00:02:07,000 will simply forward that request to Google and then the response will follow a similar path. 27 00:02:08,000 --> 00:02:13,000 Again, keep in mind traffic leaving the VPN will be unencrypted. 28 00:02:13,000 --> 00:02:19,000 It will only be encrypted if the service that you're connecting to uses encryption hence are used a 29 00:02:19,000 --> 00:02:20,000 red arrow in this case. 30 00:02:21,000 --> 00:02:29,000 Now you can also use a VPN and connect to the Tor network, so you'll first connect to your VPN again. 31 00:02:29,000 --> 00:02:35,000 Green Arrow means your traffic is encrypted and then it leaves your VPN connecting to the Tor network. 32 00:02:35,000 --> 00:02:41,000 And then you can either access an onion service or go to Google or any other website on the clear net. 33 00:02:42,000 --> 00:02:50,000 Now this architecture of first creating a secure tunnel and connecting to a server and then go to the 34 00:02:50,000 --> 00:02:57,000 internet or to the Tor network or to whatever service is really, really useful because first of all, 35 00:02:57,000 --> 00:02:59,000 it adds an extra layer of encryption. 36 00:03:00,000 --> 00:03:06,000 This means that it's going to improve our privacy and anonymity because it will prevent anybody that 37 00:03:06,000 --> 00:03:10,000 intercepts this connection, that intercepts this flow of data. 38 00:03:10,000 --> 00:03:15,000 And here, from seeing what data you're sending or receiving, again, whether it's your network admin, 39 00:03:15,000 --> 00:03:19,000 whether it's your Internet provider, whether it's a government, it doesn't really matter. 40 00:03:19,000 --> 00:03:22,000 Your data in here is going to be encrypted. 41 00:03:22,000 --> 00:03:26,000 Therefore, it will be useless to any entity that intercepts it. 42 00:03:26,000 --> 00:03:29,000 It will also help us bypass censorship. 43 00:03:29,000 --> 00:03:35,000 So we see previously that we can use pluggable transports and bridges in order to bypass censorship 44 00:03:35,000 --> 00:03:37,000 and connect to the Tor network. 45 00:03:37,000 --> 00:03:41,000 Even if it's being blocked by your network admin or by your internet provider. 46 00:03:42,000 --> 00:03:49,000 A better solution, in my opinion, is to simply use a VPN, because let's assume we have an internet 47 00:03:49,000 --> 00:03:54,000 service provider in here that doesn't allow the users to access tor. 48 00:03:54,000 --> 00:04:02,000 When you use a VPN again, you're creating a secure, encrypted tunnel between you and the VPN provider. 49 00:04:02,000 --> 00:04:07,000 So the internet service provider cannot see that you're trying to connect to Tor. 50 00:04:07,000 --> 00:04:12,000 All it can see is encrypted data going to some server on the internet. 51 00:04:13,000 --> 00:04:20,000 Therefore, in the case of the pluggable transports and bridges, in worst case scenario, the Internet 52 00:04:20,000 --> 00:04:26,000 service provider or the admin or the government will be able to see that you are trying to connect to 53 00:04:26,000 --> 00:04:29,000 TOR, which could cause problems in some countries. 54 00:04:29,000 --> 00:04:36,000 In the case of using a VPN, the worst case scenario is your internet service provider will be able 55 00:04:36,000 --> 00:04:39,000 to know that you're trying to connect to a VPN. 56 00:04:39,000 --> 00:04:40,000 That's it. 57 00:04:40,000 --> 00:04:45,000 They won't know that you're trying to use Tor and they won't be able to see any data you send because 58 00:04:45,000 --> 00:04:51,000 like I said, the connection is encrypted and hence the use of the green arrows in here. 59 00:04:52,000 --> 00:05:00,000 On top of all of these features using a VPN protect us from hackers because it is very easy for anyone 60 00:05:00,000 --> 00:05:06,000 connected to the same network as you to intercept your data, to redirect the flow of data so that it 61 00:05:06,000 --> 00:05:08,000 flows through their computer. 62 00:05:08,000 --> 00:05:13,000 I actually covered this in my network hacking and in my ethical hacking courses. 63 00:05:13,000 --> 00:05:19,000 So whether you're connected to a public network such as an airport network or a hotel or a college network 64 00:05:19,000 --> 00:05:27,000 or even at your own home network, anybody connected to that network can redirect the flow of data so 65 00:05:27,000 --> 00:05:29,000 that it flows through their computer. 66 00:05:29,000 --> 00:05:34,000 And once they do this, they'll be able to see all the websites you visit, all the usernames and passwords 67 00:05:34,000 --> 00:05:35,000 you send. 68 00:05:35,000 --> 00:05:43,000 They'll even be able to modify data on the fly and backdoor files you download and in many cases even 69 00:05:43,000 --> 00:05:45,000 gain full control over your computer. 70 00:05:46,000 --> 00:05:52,000 Now, if a VPN is used, the hacker will still be able to redirect the flow of data, and they will 71 00:05:52,000 --> 00:05:55,000 still be able to intercept your data. 72 00:05:55,000 --> 00:05:59,000 But this data again will be encrypted, hence the use of the green arrows. 73 00:05:59,000 --> 00:06:04,000 So they won't be able to see the usernames or the passwords or anything. 74 00:06:04,000 --> 00:06:10,000 And even if they try to modify this data, they wouldn't be able to do it because it will be simply 75 00:06:10,000 --> 00:06:14,000 gibberish and they wouldn't be able to analyze it or do anything with it. 76 00:06:15,000 --> 00:06:21,000 That's why using a VPN is a really good solution to prevent man in the middle attacks. 77 00:06:22,000 --> 00:06:28,000 With that being said, there is a number of things that you need to keep in mind when using a VPN. 78 00:06:29,000 --> 00:06:33,000 First of all, we are introducing a man in the middle in here. 79 00:06:33,000 --> 00:06:39,000 So if we go back to the previous diagram, you can see that our connection was going directly to the 80 00:06:39,000 --> 00:06:40,000 Internet. 81 00:06:40,000 --> 00:06:46,000 But when we're using a VPN, we're literally adding an extra node to our connection. 82 00:06:46,000 --> 00:06:53,000 So the data is encrypted between the user and the VPN provider, but the VPN provider is able to see 83 00:06:53,000 --> 00:06:54,000 this data. 84 00:06:54,000 --> 00:07:01,000 Therefore, you want to make sure that you pick a reputable VPN provider and avoid free providers because 85 00:07:01,000 --> 00:07:04,000 a lot of them keep logs and analyze you. 86 00:07:04,000 --> 00:07:09,000 You also want to make sure that you use a provider that keeps no logs. 87 00:07:09,000 --> 00:07:14,000 And with keeping all of these things in mind, with picking a reputable provider, avoid free ones and 88 00:07:14,000 --> 00:07:16,000 make sure that they keep no logs. 89 00:07:16,000 --> 00:07:19,000 Also use HTTPS everywhere. 90 00:07:19,000 --> 00:07:25,000 This really solves the problem of having a VPN here, even if you trust them, even if you think this 91 00:07:25,000 --> 00:07:32,000 company will never do anything bad, will never keep logs and analyze your traffic when you use https 92 00:07:32,000 --> 00:07:39,000 everywhere, you're adding another layer of encryption so your connection between you and the VPN provider 93 00:07:39,000 --> 00:07:42,000 will be secured by two layers of encryption. 94 00:07:42,000 --> 00:07:50,000 First, the encryption used by the VPN and the encryption enforced by HTTPS everywhere, which is TLS. 95 00:07:51,000 --> 00:07:58,000 And then when traffic leaves the VPN provider, you will have TLS encryption up to whatever destination 96 00:07:58,000 --> 00:07:59,000 you're going to. 97 00:07:59,000 --> 00:08:06,000 Therefore, even the VPN provider in this case will not be able to see your data because it will be 98 00:08:06,000 --> 00:08:11,000 encrypted with TLS, which is a very, very secure encryption. 99 00:08:11,000 --> 00:08:17,000 Last but not least, when signing up with a VPN, you want to make sure you use a VPN that does not 100 00:08:17,000 --> 00:08:20,000 require a lot of information again, at the end of the day. 101 00:08:20,000 --> 00:08:25,000 We're trying to improve our privacy and it doesn't really make sense to give them my address and all 102 00:08:25,000 --> 00:08:26,000 this information. 103 00:08:27,000 --> 00:08:32,000 You can also take this one step further and pay with crypto, but this is optional. 104 00:08:32,000 --> 00:08:35,000 It really depends on you and your threat model. 105 00:08:36,000 --> 00:08:39,000 Now there are a lot of BPM providers out there. 106 00:08:39,000 --> 00:08:42,000 I highly recommend you go and do your own research. 107 00:08:42,000 --> 00:08:50,000 Me personally, I use our own VPN that we provide added security, which you can get at zealous VPN. 108 00:08:50,000 --> 00:08:54,000 So I have the website already here and I'm already at the download section. 109 00:08:55,000 --> 00:08:59,000 It supports all platforms so you can use it on Windows or Linux. 110 00:08:59,000 --> 00:09:01,000 iOS and Android doesn't really matter. 111 00:09:02,000 --> 00:09:06,000 And using these VPN providers is actually very, very simple. 112 00:09:06,000 --> 00:09:10,000 All you'll have to do is, first of all, obviously sign up with the one that you want, download their 113 00:09:10,000 --> 00:09:16,000 client, and once you have the client downloaded, you simply want to select a server and connect to 114 00:09:16,000 --> 00:09:16,000 it. 115 00:09:17,000 --> 00:09:22,000 So I already have the client downloaded and installed and I'm simply going to connect to the Australia 116 00:09:22,000 --> 00:09:23,000 server. 117 00:09:24,000 --> 00:09:28,000 And right now as you can see, my location changed to Australia. 118 00:09:28,000 --> 00:09:34,000 So the websites that I visit will think that I am visiting them from Australia because going back to 119 00:09:34,000 --> 00:09:39,000 this diagram I connect it to a VPN server that is in Australia. 120 00:09:39,000 --> 00:09:46,000 So anything I send will be leaving this server and therefore I'll appear like I'm coming from this country. 121 00:09:46,000 --> 00:09:49,000 So that's another benefit of using a VPN. 122 00:09:49,000 --> 00:09:56,000 You can change your location and access websites or content that is only available for a certain country 123 00:09:56,000 --> 00:10:00,000 by simply connecting to a VPN that is in that country. 124 00:10:00,000 --> 00:10:04,000 So now that I'm connected, we can see that it's saying here Australia, we can double check on the 125 00:10:04,000 --> 00:10:05,000 website itself. 126 00:10:05,000 --> 00:10:11,000 If I refresh it here, you'll see this bar will tell me that I am protected by that VPN. 127 00:10:11,000 --> 00:10:18,000 My IP appears to be this one, which is not my real IP and I seem like I'm coming from Australia, so 128 00:10:18,000 --> 00:10:19,000 that's perfect. 129 00:10:19,000 --> 00:10:26,000 And now that we are connected to the VPN, we can go ahead and use the internet normally and will appear 130 00:10:26,000 --> 00:10:33,000 like we're visiting these websites from Australia or you can use your Tor browser and this way we'll 131 00:10:33,000 --> 00:10:40,000 connect to the Tor network from the VPN server that is in Australia and then bounce through another 132 00:10:40,000 --> 00:10:46,000 three nodes and then access the website that we want or access to our hidden services. 133 00:10:46,000 --> 00:10:52,000 So we can just go to check the Tor project dot org to confirm that we're connected to the Tor network 134 00:10:52,000 --> 00:10:53,000 properly. 135 00:10:53,000 --> 00:10:55,000 And as you can see, that's perfect. 136 00:10:55,000 --> 00:10:56,000 We're connected to it. 137 00:10:56,000 --> 00:11:00,000 This is the IP, this is the end IP, the IP of the exit node. 138 00:11:00,000 --> 00:11:05,000 And we can even click on the AI here to see the nodes we're bouncing through. 139 00:11:05,000 --> 00:11:12,000 So what's happening right now is we have an encrypted connection from my computer to a VPN server in 140 00:11:12,000 --> 00:11:18,000 Australia and then from there we're connecting to the Netherlands, to Germany to the United States, 141 00:11:18,000 --> 00:11:23,000 and then we access the Tor project website or whatever website we want.