00:00:00.000 --> 00:00:05.272 We have got a great talk to wrap this up for the first day. 00:00:05.272 --> 00:00:11.945 Justin is going to talk about secure messaging and this is a 00:00:11.945 --> 00:00:14.781 pretty important topic. I think everybody in this room generally 00:00:14.781 --> 00:00:18.218 understand the needs for this. I think in talking to them that 00:00:18.218 --> 00:00:20.354 this is going to kind of make the case for the people that we 00:00:20.354 --> 00:00:23.924 know at home, the muddles that we know so I have got a couple 00:00:23.924 --> 00:00:27.394 of secure messaging apps on my phone and right now they do a 00:00:27.394 --> 00:00:32.032 great job at secure messaging and giving me a list of all the 00:00:32.032 --> 00:00:36.003 hackers that I know and none of the muddles that I know so 00:00:36.003 --> 00:00:41.208 hopefully this will help us get that address book a little bit 00:00:41.208 --> 00:00:47.214 bigger, right? So let's give Justin a big hand. [Applause]. 00:00:53.186 --> 00:00:56.490 [CHEERS]. >> My name is Justin Engler. I am with NCC group and 00:00:56.490 --> 00:00:59.960 here to talk about secure messaging for normal people. 00:00:59.960 --> 00:01:03.964 This is not a talk for C.R.Y.P.T.O. geeks. The idea 00:01:03.964 --> 00:01:06.900 here is to try to get people who don't already know about this 00:01:06.900 --> 00:01:11.004 topic something to start with to spin up their knowledge and try 00:01:11.004 --> 00:01:13.640 to look at all the different apps that are available and make 00:01:13.640 --> 00:01:16.777 their own decisions about which ones to use. Before we really 00:01:16.777 --> 00:01:21.448 dive into this, I would like to take an informal poll, how many 00:01:21.448 --> 00:01:25.152 people in here are C.R.Y.P.T.O. geeks? Okay. The door is over 00:01:25.152 --> 00:01:31.158 there. Any journalists? A couple. Lawyers? Couple. Normal 00:01:35.929 --> 00:01:39.666 people who do not fit any of those categories? Oh, quite a 00:01:39.666 --> 00:01:45.672 few. All right. Good. So the goal of this talk is to lay out 00:01:49.276 --> 00:01:53.213 the foundations of what a C.R.Y.P.T.O. app or security 00:01:53.213 --> 00:01:57.117 messaging app does without getting into the really heavy 00:01:57.117 --> 00:02:00.187 sufficient that will scare away the Nubes. We're not going to 00:02:00.187 --> 00:02:03.991 cover any research, not going to be any math. Not going to do any 00:02:03.991 --> 00:02:06.560 cryptology or crypt analysis or talk about specific 00:02:06.560 --> 00:02:09.596 applications. I'm going to get to that in a second and we're 00:02:09.596 --> 00:02:11.865 not going to talk about any C.R.Y.P.T.O. things in really, 00:02:11.865 --> 00:02:17.871 really fine detail. So this is my slide to try to scare you 00:02:21.742 --> 00:02:26.213 C.R.Y.P.T.O. geeks out the door. What we are going to talk about, 00:02:26.213 --> 00:02:29.850 really basic C.R.Y.P.T.O. stuff often oversimplified and I'm 00:02:29.850 --> 00:02:34.688 kind of going for the 80% right just to try to make it so it 00:02:34.688 --> 00:02:38.759 doesn't get too crazy. That's a list of things in short of the 00:02:38.759 --> 00:02:42.863 things we're going to cover in the talk. The different types of 00:02:42.863 --> 00:02:46.366 threats that will go after the messages you will send. How you 00:02:46.366 --> 00:02:49.136 can defend yourself and how those threats will counter the 00:02:49.136 --> 00:02:52.439 defenses ha you put in. And then at the end we're going to talk 00:02:52.439 --> 00:02:56.443 about kind of a list of things that C.R.Y.P.T.O. apps say that 00:02:56.443 --> 00:03:01.682 they do but don't really do what they sound like. So my job with 00:03:01.682 --> 00:03:07.120 NCC is I'm an application penetration tester so my job is 00:03:07.120 --> 00:03:10.824 to break applications and as it turns out I have broken quite a 00:03:10.824 --> 00:03:16.296 few C.R.Y.P.T.O. messaging apps, both the kind that are like 00:03:16.296 --> 00:03:21.134 advertiser secure and also like a messaging app that is part of 00:03:21.134 --> 00:03:24.371 some other, you know, larger platform: I have got so many 00:03:24.371 --> 00:03:28.542 customers that all do this stuff I can't talk about any of the 00:03:28.542 --> 00:03:31.812 apps in specific. There is a couple of times where I'll talk 00:03:31.812 --> 00:03:35.816 about maybe a piece of software and talk about larger things 00:03:35.816 --> 00:03:39.586 like OS's or platforms and things like that but the actual 00:03:39.586 --> 00:03:43.056 messaging apps I'm not going to say anything about them. If you 00:03:43.056 --> 00:03:46.660 ask a question about it, I'm not going to answer. So that's where 00:03:46.660 --> 00:03:52.966 we're at with that. We have got one more piece before we dive 00:03:52.966 --> 00:03:56.636 into the deep stuff. I'm going to say the word "government" a 00:03:56.636 --> 00:03:59.606 lot. I don't necessarily mean this government or that 00:03:59.606 --> 00:04:02.075 government. If I have a specific government in mind, I will name 00:04:02.075 --> 00:04:05.745 it. So whenever I say "government," assume a 00:04:05.745 --> 00:04:11.751 government of some type. It's important one of the standard 00:04:13.920 --> 00:04:18.391 not doing anything wrong so why do I have to hide anything, 00:04:18.391 --> 00:04:21.061 there are a lot of people in the world who live under a system of 00:04:21.061 --> 00:04:25.031 government where they are being censored or they're being 00:04:25.031 --> 00:04:28.735 oppressed and these kinds of apps are useful for people in 00:04:28.735 --> 00:04:32.305 those areas to be able do what they need to do to try to get 00:04:32.305 --> 00:04:35.075 themselves to have a better life. So even if you think that 00:04:35.075 --> 00:04:37.110 you don't need these things, other people need these things. 00:04:37.110 --> 00:04:41.414 Furthermore, in the U.S. there is even legally things where you 00:04:41.414 --> 00:04:44.217 are allowed to keep secrets from the government. For example, 00:04:44.217 --> 00:04:47.687 attorney-client privilege is one that you're pretty much the 00:04:47.687 --> 00:04:49.689 Court say that you're supposed to keep this stuff away from 00:04:49.689 --> 00:04:54.561 them so this is another good counterargument for the whole 00:04:54.561 --> 00:05:00.500 you have...all right. So we're going to talk about messages. So 00:05:03.036 --> 00:05:06.873 for the purpose of this talk, a message is just when two people, 00:05:06.873 --> 00:05:10.810 in this case, Alice and Bob, want to send some sort of data 00:05:10.810 --> 00:05:14.214 from one person to the other. And we're not going to focus on 00:05:14.214 --> 00:05:17.484 like messages between two computers or system updates or 00:05:17.484 --> 00:05:20.120 anything like that. Really talking about Person A wants to 00:05:20.120 --> 00:05:24.524 communicate with Person B and until we get a little deeper the 00:05:24.524 --> 00:05:27.561 actual type of network that's involved doesn't matter. The 00:05:27.561 --> 00:05:29.563 devices that are being used doesn't matter. I don't care if 00:05:29.563 --> 00:05:31.565 it's a desk top, a phone, I don't care if it's a LAN line 00:05:31.565 --> 00:05:33.567 phone, a postcard going through the mail. Like they all follow 00:05:33.567 --> 00:05:39.573 this general pattern so if you don't encrypt anything, and 00:05:45.378 --> 00:05:50.217 they're eves droppers and they can read everything that you say 00:05:50.217 --> 00:05:55.088 in most cases and they can do that passively. So what that 00:05:55.088 --> 00:05:57.257 means is they don't have to do any extra work. They just kind 00:05:57.257 --> 00:05:59.826 of sit and record and everything that goes...they'll pick up and 00:05:59.826 --> 00:06:03.797 then they can analyze it. If there's no encryption, that 00:06:03.797 --> 00:06:08.201 means they get both the message content and the metadata and 00:06:08.201 --> 00:06:12.239 we'll talk a little bit about the difference between those 00:06:12.239 --> 00:06:17.043 two. Most of this talk will be talking about the content and 00:06:17.043 --> 00:06:21.314 then later we'll have a separate section about metadata. So the 00:06:21.314 --> 00:06:24.618 first question is which app should you use? I don't know 00:06:24.618 --> 00:06:29.289 which app you should use because I don't know who you are. What 00:06:29.289 --> 00:06:31.825 we really need to do is think about why you want to use these 00:06:31.825 --> 00:06:35.395 apps. Who you think is out to read your stuff and then use 00:06:35.395 --> 00:06:38.164 that to make a determination of what kinds of features you need 00:06:38.164 --> 00:06:45.705 in an app so that you can then make a good choice. So these are 00:06:45.705 --> 00:06:49.709 examples of people who might need to use a secure messaging 00:06:49.709 --> 00:06:54.547 app. So I fall into the first category...have things like 00:06:54.547 --> 00:06:59.352 financial data that are important. I also just think 00:06:59.352 --> 00:07:02.455 it's wrong for people to be listening in on my stuff so I 00:07:02.455 --> 00:07:05.959 try to encrypt what I can. Businesses obviously have a huge 00:07:05.959 --> 00:07:10.497 need to protect things like financial data, business plans, 00:07:10.497 --> 00:07:14.367 trade secret, that kind of thing. Activists will want to 00:07:14.367 --> 00:07:18.838 protect what they're doing from whatever government might be 00:07:18.838 --> 00:07:22.175 able to move against them. And that might not even be the 00:07:22.175 --> 00:07:24.978 government where they live. You can certainly imagine cases 00:07:24.978 --> 00:07:27.747 where an activist lives in country A but is doing something 00:07:27.747 --> 00:07:30.083 that Country B doesn't like and Country B is acting against that 00:07:30.083 --> 00:07:33.353 activist even though they don't live there. Harassed is one that 00:07:33.353 --> 00:07:36.289 was actually added fairly recently. I talked to someone 00:07:36.289 --> 00:07:40.226 who told me that she used encryption because she had a lot 00:07:40.226 --> 00:07:43.830 of online harassers and she was worried that if she didn't 00:07:43.830 --> 00:07:47.734 encrypt things they would be able to get ahole of that data 00:07:47.734 --> 00:07:52.005 and use it against her so that's why she used it. Often if 00:07:52.005 --> 00:07:54.975 they're dealing with sources who have important...they'll want to 00:07:54.975 --> 00:08:01.514 protect their communications between the...and lawyers as we 00:08:01.514 --> 00:08:04.317 talked about have good reason to protect their communication with 00:08:04.317 --> 00:08:10.190 their clients. So once we know who you are, then we can talk 00:08:10.190 --> 00:08:13.893 about the people who are out to listen for your stuff. So we 00:08:13.893 --> 00:08:18.465 kind of divided our threats into kind of two axes, an 00:08:18.465 --> 00:08:22.669 opportunistic attacker is interested in collecting as much 00:08:22.669 --> 00:08:27.707 about everybody. They don't have a particular person in mind. A 00:08:27.707 --> 00:08:30.777 targeted attacker is obviously the opposite. We know we are 00:08:30.777 --> 00:08:33.880 after Justin and so they are going to look at that person 00:08:33.880 --> 00:08:40.353 specifically. The other is your resources...attacker might be 00:08:40.353 --> 00:08:43.823 something like, you know, a single hacker or a group. 00:08:43.823 --> 00:08:48.528 Whereas high-resources attacker might be a large company or a 00:08:48.528 --> 00:08:51.664 government, things like that. So these different types of 00:08:51.664 --> 00:08:55.602 attackers have different means available and as we go through 00:08:55.602 --> 00:08:58.772 the different security methods and countermeasures against 00:08:58.772 --> 00:09:02.609 them, we'll try to kind of highlight who go against them. I 00:09:02.609 --> 00:09:07.580 have to cover just a tiny bit before we can cover anything 00:09:07.580 --> 00:09:11.651 else but this shouldn't be too painful. So for the rest of this 00:09:11.651 --> 00:09:15.155 talk if I say something that's encrypted, what I mean is it's 00:09:15.155 --> 00:09:19.125 impossible to read or modify if you don't have the key. In real 00:09:19.125 --> 00:09:22.729 life that's not necessarily true. There's all kinds of other 00:09:22.729 --> 00:09:25.965 things that could go wrong if something is supposedly 00:09:25.965 --> 00:09:30.637 encrypted but we're not going to cover any of that in this talk 00:09:30.637 --> 00:09:35.308 and we're still going to cover why things could go wrong if you 00:09:35.308 --> 00:09:39.245 send the unsecure message. So public key and private key is 00:09:39.245 --> 00:09:42.549 kind of a difficult concept because the naming isn't great. 00:09:42.549 --> 00:09:48.688 You can think of a public key as the blue prints for a lock. So I 00:09:48.688 --> 00:09:52.492 send you the blue prints for a lock. You can build the lock, 00:09:52.492 --> 00:09:55.795 lock something with it and then send it back to me and I have 00:09:55.795 --> 00:09:58.798 the key that can open it. No one else can open it. So in this way 00:09:58.798 --> 00:10:01.601 I could have, everyone would be able to send me something that 00:10:01.601 --> 00:10:07.774 no one else could read except for me. Signatures are kind of 00:10:07.774 --> 00:10:12.378 the inverse of that. You can use public and private keys. I can 00:10:12.378 --> 00:10:18.618 sign something and then you can use my public key to verify if 00:10:18.618 --> 00:10:25.792 I'm the one who actually document or...whatever it is. 00:10:25.792 --> 00:10:29.295 You can kind of think of signatures as the public key is 00:10:29.295 --> 00:10:32.031 like a signature sample that somebody wrote in the book and 00:10:32.031 --> 00:10:35.068 then you're comparing the signature that's on the new 00:10:35.068 --> 00:10:38.071 package or whatever, the check that was written to this 00:10:38.071 --> 00:10:40.607 existing signature to see if they match. Except it's all with 00:10:40.607 --> 00:10:44.143 math and so it can't be done wrong for the purposes of this 00:10:44.143 --> 00:10:46.613 talk. Fingerprints...people who are privacy sensitive and they 00:10:46.613 --> 00:10:50.350 start learning about cryptography and then people 00:10:50.350 --> 00:10:55.155 start asking them for their fingerprints and they get 00:10:55.155 --> 00:10:58.925 freaked out. When we're taking about fingerprints here what we 00:10:58.925 --> 00:11:04.164 mean is something that serves as a kind of shortened version of 00:11:04.164 --> 00:11:09.335 something else. Usually we use this because keys are really 00:11:09.335 --> 00:11:13.239 long and so we'll take a fingerprint of the key and then 00:11:13.239 --> 00:11:15.241 we can share that fingerprint with someone and they can know 00:11:15.241 --> 00:11:19.245 if they got the right key or not. Lastly the word "trust." 00:11:19.245 --> 00:11:22.315 that doesn't mean that I trust you to drive my car or get my 00:11:22.315 --> 00:11:28.321 laundry or anything like that. Trust in this case means I both 00:11:31.291 --> 00:11:36.863 am confident in your identity and I'm also willing to let you 00:11:36.863 --> 00:11:41.334 vouch for someone else's identity. This one's tricky 00:11:41.334 --> 00:11:45.004 because I might accidentally say the word "trust" and it won't be 00:11:45.004 --> 00:11:47.307 clear during the talk. So if it's not clear, somebody raise 00:11:47.307 --> 00:11:53.313 your hand and say what did you mean and I'll tell you. Okay. So 00:11:56.316 --> 00:12:00.386 transport layer security also known as TLS. The old version is 00:12:00.386 --> 00:12:02.855 SSL and you eel often here -- you'll often hear people use the 00:12:02.855 --> 00:12:06.392 terms interchangeably. But for this talk, they're the same. The 00:12:06.392 --> 00:12:13.066 problem with kind of the very first step of sending a message 00:12:13.066 --> 00:12:15.401 to someone else is you need to know how to get that message to 00:12:15.401 --> 00:12:20.306 them. The easiest way for that to happen is to have some server 00:12:20.306 --> 00:12:23.810 somewhere that both sides know about and then I can send a 00:12:23.810 --> 00:12:26.713 message to the server and then either the server will send it 00:12:26.713 --> 00:12:28.781 on to the right person or the other person will connect to the 00:12:28.781 --> 00:12:34.721 server too and get the message...so layer of security. 00:12:34.721 --> 00:12:38.324 That's one way we can try to secure this type of message as 00:12:38.324 --> 00:12:43.096 it goes across. So you can see that the eves droppers there -- 00:12:43.096 --> 00:12:45.865 eavesdropers there can't listen to this specific kind of 00:12:45.865 --> 00:12:53.039 traffic. The little lock in your browser, that's TLS. So a 00:12:53.039 --> 00:12:56.142 passive attack doesn't work against TLS because it's 00:12:56.142 --> 00:12:59.479 encrypted between the server and the party that's sending the 00:12:59.479 --> 00:13:06.853 message. So no eavesdropping. However, the kind of naive way 00:13:06.853 --> 00:13:09.989 to do TLS and a lot of people did this a long time ago. It's 00:13:09.989 --> 00:13:14.427 not as bad as it used to be. If you say yes I'll accept an 00:13:14.427 --> 00:13:18.498 encrypted connection and you don't bother to find out who you 00:13:18.498 --> 00:13:21.934 connected to, then the bad guy instead of just passively 00:13:21.934 --> 00:13:24.270 eavesdropping could pretend to be the server you intended to 00:13:24.270 --> 00:13:29.242 talk to. It's encrypted so you think it's fine. On the other 00:13:29.242 --> 00:13:32.211 side the attacker makes another encrypted connection to the real 00:13:32.211 --> 00:13:35.281 server and sends your data along but now she's seen it because it 00:13:35.281 --> 00:13:38.384 was only intended for the attacker and read the traffic, 00:13:38.384 --> 00:13:44.390 modify it, whatever. This is harder to do with the attack 00:13:49.162 --> 00:13:51.698 because you have to be there actively man in the middleing 00:13:51.698 --> 00:13:58.604 stuff to actually make it work but it's not that hard. In fact, 00:13:58.604 --> 00:14:04.711 it actually scales pretty well. So if any of you work at 00:14:04.711 --> 00:14:07.680 businesses that are fairly large, almost all of them do 00:14:07.680 --> 00:14:11.517 this. So network, they'll actually man in the middle your 00:14:11.517 --> 00:14:14.554 traffic, they have already installed the certificate that 00:14:14.554 --> 00:14:19.525 says oh yeah, you can trust this server. You don't talk to the 00:14:19.525 --> 00:14:24.097 real server. You talk with the middle server and it checks the 00:14:24.097 --> 00:14:28.101 security and passs it along. Governments can do this too. 00:14:28.101 --> 00:14:31.404 Again, harder than a passive attack, but scales well. So to 00:14:31.404 --> 00:14:37.410 solve this problem you need to verify that the server you're on 00:14:41.848 --> 00:14:46.319 is the server that you actually wanted to talk to. The TLS kind 00:14:46.319 --> 00:14:54.026 of...thing called certificate authorities that handle this 00:14:54.026 --> 00:14:58.131 problem and all your browsers do this by default already. If we 00:14:58.131 --> 00:15:04.270 were to go back to one of these guys, it is likely that at this 00:15:04.270 --> 00:15:07.507 point Bob would be getting a warning in his browser saying we 00:15:07.507 --> 00:15:09.976 don't think this connection is secure and then Bob would 00:15:09.976 --> 00:15:14.981 probably just click through it. But -- ( LAUGHTER ) >> If you're 00:15:14.981 --> 00:15:18.918 using an app like on your phone, hopefully the Authors of that is 00:15:18.918 --> 00:15:21.220 there is no way for the user to bypass that. If it's not a 00:15:21.220 --> 00:15:24.257 secure {KEBGS}, it just stops -- connection, it just stops. So 00:15:24.257 --> 00:15:31.063 let's explain how that works. So when you make a TLS connection 00:15:31.063 --> 00:15:36.002 to a server, that server sends you back a certificate. The 00:15:36.002 --> 00:15:39.205 certificate is essentially just a list of identifying 00:15:39.205 --> 00:15:42.809 information of what the server is and it's signed by 00:15:42.809 --> 00:15:45.812 certificate authority. Your browser or your operating system 00:15:45.812 --> 00:15:47.814 has a list of all the certificate authorities it 00:15:47.814 --> 00:15:52.618 trusts and so if this certificate was signed by the 00:15:52.618 --> 00:15:58.558 certificate authority, then you know that that certificate 00:15:58.558 --> 00:16:02.228 authority that you trust is vouching for the identity of the 00:16:02.228 --> 00:16:06.699 server. The problem here is that there are a whole bunch of 00:16:06.699 --> 00:16:10.970 certificate authorities and all of them can vouch for anyone. I 00:16:10.970 --> 00:16:14.474 looked at Firefox today, there were 90 different CAs in there 00:16:14.474 --> 00:16:18.110 and those are everything from like private entities in the 00:16:18.110 --> 00:16:22.949 U.S. Essentially businesses that do this as a business. All the 00:16:22.949 --> 00:16:26.819 way up to Hong Kong post office. There is a couple of other one 00:16:26.819 --> 00:16:31.791 that is are like clearly this is a...so the weird thing is that 00:16:31.791 --> 00:16:35.194 it's not likely that these types of attacks would be taken 00:16:35.194 --> 00:16:37.964 against you while you're doing online banking. But if it's 00:16:37.964 --> 00:16:41.667 something where a government is more interested in you 00:16:41.667 --> 00:16:46.138 specifically, they might find a way to forward your certificate 00:16:46.138 --> 00:16:50.810 for you and inject it into that stream to make a man in the 00:16:50.810 --> 00:16:56.349 middle against you. So there is a way around that too. It's 00:16:56.349 --> 00:17:00.987 called certificate pinning. So on the client side instead of 00:17:00.987 --> 00:17:03.189 just trusting any certificate as long as it was signed by 00:17:03.189 --> 00:17:07.159 somebody, you say I already know which certificate I'm expecting. 00:17:07.159 --> 00:17:10.329 No, I have talked to the server before or maybe this server is 00:17:10.329 --> 00:17:13.065 part of some app that I'm already using and that app knows 00:17:13.065 --> 00:17:15.868 which server it's supposed to talk to so we'll just mark those 00:17:15.868 --> 00:17:18.137 and we'll know that this certificate or this public key 00:17:18.137 --> 00:17:20.873 is the one we're supposed to talk to and then if something 00:17:20.873 --> 00:17:22.875 else comes up, it's just the same as if the man in the middle 00:17:22.875 --> 00:17:25.978 guy didn't have any kind of signature and it just fails. 00:17:28.047 --> 00:17:30.816 This is great because now instead of having to trust all 00:17:30.816 --> 00:17:36.822 90 of those C arcs, you have {SHEUFPT}ed your trust risk. So 00:17:47.033 --> 00:17:49.802 now -- CAs, you have now shifted your trust risk. So now let's 00:17:49.802 --> 00:17:51.804 say Android...you get this C.R.Y.P.T.O. messaging app from 00:17:51.804 --> 00:17:53.806 Google play store, so now maybe Google could have modified it 00:17:53.806 --> 00:17:56.976 and sent it to you and the same with Apple if Apple sent it to 00:17:56.976 --> 00:17:59.512 you through their app store. But that's the only person you have 00:17:59.512 --> 00:18:01.948 to trust now, just Apple or Google and the app developer 00:18:01.948 --> 00:18:04.483 instead of all these other CAs and everyone else who has 00:18:04.483 --> 00:18:10.489 access. So back to TLS again...if we pretend that app 00:18:12.959 --> 00:18:16.462 is doing TLS totally correctly, pinning, validating and 00:18:16.462 --> 00:18:19.665 everything is going well, there's still a huge problem 00:18:19.665 --> 00:18:24.570 with TLS that makes it totally insecure for a lot of secure 00:18:24.570 --> 00:18:28.474 messaging applications and the problem is this: We're 00:18:28.474 --> 00:18:31.677 encrypting between Bob and the server...Alice and the server, 00:18:31.677 --> 00:18:37.550 but in between when it's on the server, it's not encrypted. It's 00:18:37.550 --> 00:18:41.520 totally in the open and that means that whoever runs the 00:18:41.520 --> 00:18:46.625 server or whoever can bring this to bear against the people...or 00:18:46.625 --> 00:18:50.062 whoever can hack that server, those people can all still read 00:18:50.062 --> 00:18:53.899 the clear text of the communications between them. 00:18:53.899 --> 00:18:56.168 Also you could have serve {SER}s, let's say that -- 00:18:56.168 --> 00:18:58.170 Serbers, let's say that -- servers, let's say that someone 00:18:58.170 --> 00:19:02.475 runs a messaging service because they can sell you targeted ad, 00:19:02.475 --> 00:19:07.079 this is another way to do that. Even though their communications 00:19:07.079 --> 00:19:11.050 is server encrypted, they would still be able to read all the 00:19:11.050 --> 00:19:13.419 stuff you're talking about so then they send you ads based on 00:19:13.419 --> 00:19:19.792 those things. Most kind of instant messaging or anything 00:19:19.792 --> 00:19:25.865 like that, e-mail, that has some security on it stops here. So 00:19:25.865 --> 00:19:28.601 because so many people who have interested in 00:19:28.601 --> 00:19:30.603 targeted...oftentimes if something is kind of advertised 00:19:30.603 --> 00:19:36.609 as a secure messaging thing, then it goes a little further. 00:19:39.011 --> 00:19:42.281 So let's talk about the next step in the process. What we'd 00:19:42.281 --> 00:19:45.751 really like to see is instead of the encryption going between 00:19:45.751 --> 00:19:48.954 Alice and the server and Bob and the server, we have encryption 00:19:48.954 --> 00:19:53.426 that Alice and Bob so now all the server sees is garbage as it 00:19:53.426 --> 00:19:58.697 goes through and they can't read anything. The server is still in 00:19:58.697 --> 00:20:01.734 the middle. They just can't read the text because all they see is 00:20:01.734 --> 00:20:06.005 encrypted text and they just have to pass it along. So in 00:20:06.005 --> 00:20:09.108 order to make this happen -- so before we had the CA system and 00:20:09.108 --> 00:20:11.744 we could download an app that had a certificate, so that's how 00:20:11.744 --> 00:20:17.016 we would get these two keys but now they need to have their own 00:20:17.016 --> 00:20:21.087 keys and they need to have ways to exchange their keys so that 00:20:21.087 --> 00:20:25.624 they can encrypt messages to each other. So the easiest way 00:20:25.624 --> 00:20:29.228 to do that is to ask the server. Alice wants to send a message to 00:20:29.228 --> 00:20:33.099 Bob. She doesn't have Bob's key. She says hey, server and server 00:20:33.099 --> 00:20:37.136 gives back the key and then she starts up the encrypted with Bob 00:20:37.136 --> 00:20:43.209 and sends the message. Anybody sees the problem here? So how 00:20:43.209 --> 00:20:47.546 about the server just says this is definitely Bob's key, but 00:20:47.546 --> 00:20:52.118 it's not. And gives back a key that the server knows and then 00:20:52.118 --> 00:20:57.256 again on the other side sends the wrong one back and now the 00:20:57.256 --> 00:21:01.460 server is the end point encryption instead of Bob and 00:21:01.460 --> 00:21:04.864 all the stuff can be read again. This is definitely tougher than 00:21:04.864 --> 00:21:07.700 the other man in the middle attack because now instead of 00:21:07.700 --> 00:21:09.735 just some random person in the middle it pretty much has to be 00:21:09.735 --> 00:21:12.204 that server that does it or someone who's hacked that 00:21:12.204 --> 00:21:14.907 server, et cetera. But it's still much harder. So to prevent 00:21:14.907 --> 00:21:20.913 this one, what we really need to do is, you know, in a similar 00:21:24.917 --> 00:21:27.086 fashion to how we talked about you need to verify the server 00:21:27.086 --> 00:21:30.156 you're talking to is really the server you wanted, now we need 00:21:30.156 --> 00:21:35.528 to determine if Alice can determine if it's really Bob's 00:21:35.528 --> 00:21:39.632 or not. So this process is called key validation and the 00:21:39.632 --> 00:21:44.403 idea is to prove the ownership of the key. Ideally whatever app 00:21:44.403 --> 00:21:47.039 you're using to send the messages will do this one time. 00:21:47.039 --> 00:21:49.975 So once Alice has sent one message to Bob and done the 00:21:49.975 --> 00:21:53.212 validation scheme, it's fine and you don't have to redo this 00:21:53.212 --> 00:21:55.447 tedious...and then until there's some event that happens that 00:21:55.447 --> 00:22:01.387 causes you to have to rekey. Couple different ways that we 00:22:07.026 --> 00:22:10.496 can make this happen. Kind of the simplest one is a Fermented 00:22:10.496 --> 00:22:16.502 bean paste -- she'll say the key he's got must be her key. This 00:22:24.276 --> 00:22:30.015 is really simple. Alice doesn't have to do any work. If any of 00:22:30.015 --> 00:22:37.723 you use SSH, kind of looks like this model. But the bad news is 00:22:37.723 --> 00:22:40.826 if the adversary that's trying to eavesdrop on you is already 00:22:40.826 --> 00:22:43.762 there for the first connection, then you just stored their key 00:22:43.762 --> 00:22:47.032 instead of the one you wanted. The other probably bigger 00:22:47.032 --> 00:22:50.936 problem here is that if Bob drops his phone in the toilet, 00:22:53.138 --> 00:22:57.243 then later on Alice tries to send a message and she gets this 00:22:57.243 --> 00:23:00.646 wrong key back, there's like no way to solve the problem now 00:23:00.646 --> 00:23:03.782 because she sees there is a key match or a key mismatch, she 00:23:03.782 --> 00:23:05.784 could ask him over the messaging thing, how, did you drop your 00:23:05.784 --> 00:23:08.220 toilet in the phone and the eavesdroper says yes, drop the 00:23:08.220 --> 00:23:13.892 phone in the toilet, you're kind of stuck at this point. So a 00:23:13.892 --> 00:23:19.832 little bit better. How to band validation. So here is the 00:23:19.832 --> 00:23:21.834 fingerprint we were talking about before. Keys are really 00:23:21.834 --> 00:23:25.537 long, so instead we're going to take a fingerprint of the key 00:23:25.537 --> 00:23:31.076 and share it over some medium besides whatever messaging app 00:23:31.076 --> 00:23:37.549 we're trying to secure right now. So you could make do that 00:23:37.549 --> 00:23:40.419 in person. You could do it over the phone. You could do it over 00:23:40.419 --> 00:23:44.790 SMS. You could use some sort of social media. Public key, 00:23:44.790 --> 00:23:50.296 anything you want that tries to get that without using the thing 00:23:50.296 --> 00:23:55.968 that's not secure because it's not secure yet. So one of the 00:23:55.968 --> 00:23:59.238 nice things is that it doesn't have to happen during the 00:23:59.238 --> 00:24:01.707 communications process. You could do it some other time and 00:24:01.707 --> 00:24:04.410 set up the keys and then later you'll know that that later 00:24:04.410 --> 00:24:09.248 communication is secure. If you do in-person verification, that 00:24:09.248 --> 00:24:12.618 is pretty good. If I already know -- Alice and Bob already 00:24:12.618 --> 00:24:15.988 know each other, you know, then it's pretty easy for them to 00:24:15.988 --> 00:24:22.127 just like show each other their keys or maybe your app has a way 00:24:22.127 --> 00:24:25.964 to like import keys via the...that's really tough to be 00:24:25.964 --> 00:24:31.303 able...also the fact that it could be ad hoc is nice. So if 00:24:31.303 --> 00:24:34.673 it was part of like a protocol, then the attacker might be able 00:24:34.673 --> 00:24:37.276 to see when it's going to happen and then get in the middle and 00:24:37.276 --> 00:24:43.082 so on. If I just randomly SMS my buddy and say hey here is my 00:24:43.082 --> 00:24:46.318 key, like the attacker would have to be waiting for that, be 00:24:46.318 --> 00:24:49.955 able to understand that my SMS is having a public key in it. 00:24:49.955 --> 00:24:53.926 Then they'd have to intercept it, change it, send it. It's 00:24:53.926 --> 00:24:58.530 hard. So the bad news is that you're limit today the 00:24:58.530 --> 00:25:03.268 security...so, for example, there are a lot of secure 00:25:03.268 --> 00:25:06.972 messaging apps that will do things like here is a number. 00:25:06.972 --> 00:25:10.409 Now read it over the phone to the other person. And if that 00:25:10.409 --> 00:25:14.380 thing is secure, then the thing on their screen will match what 00:25:14.380 --> 00:25:17.883 you just read and we're good. But that assumes that whoever 00:25:17.883 --> 00:25:21.253 your adversary is isn't able to fake you like reading numbers 00:25:21.253 --> 00:25:24.490 and that sounds hard but there's been some research in the past 00:25:24.490 --> 00:25:28.360 year that makes it sounds like it's doable. In addition if 00:25:28.360 --> 00:25:31.363 you're talking about voice over the internet, people are used to 00:25:31.363 --> 00:25:35.467 like weird, choppy audio and stuff, so there is a good chance 00:25:35.467 --> 00:25:39.104 that it might be believable even if the attacker has to 00:25:39.104 --> 00:25:45.210 synthesize fake voice for you. The other problem here obviously 00:25:45.210 --> 00:25:47.813 is that you have to have that second channel already there. If 00:25:47.813 --> 00:25:50.048 someone wants to talk to me over the internet, I have never 00:25:50.048 --> 00:25:52.718 talked to them before, I don't know them at all, like it's 00:25:52.718 --> 00:25:55.521 really hard to find some other way to validate their key. 00:25:58.590 --> 00:26:03.495 Another way to do this is to rely on the trust of others to 00:26:03.495 --> 00:26:06.065 build your own trust. So Alice wants to send the message to 00:26:06.065 --> 00:26:12.938 Bob. Alice doesn't know Bob's key. But Alice knows Carol. 00:26:12.938 --> 00:26:18.110 Carol knows Dave and Dave knows Bob. So now by kind of chaining 00:26:18.110 --> 00:26:20.112 those keys along as long as those people all can verify 00:26:20.112 --> 00:26:26.251 that, then Alice can build a trusted connection to Bobby 00:26:26.251 --> 00:26:28.687 getting the key. There is a couple of different ways 00:26:28.687 --> 00:26:36.495 transitive trust can work. The web of trust is the most common 00:26:36.495 --> 00:26:40.132 one. It's what you see in PGP. It's very...what the web of 00:26:40.132 --> 00:26:46.138 trust is very convenient, but essentially...that shows who 00:26:48.307 --> 00:26:52.511 knows who so you can automatically look it up which 00:26:52.511 --> 00:26:54.513 means that if someone's interested they could build this 00:26:54.513 --> 00:26:56.882 graph of everyone who knows -- you know, who knows who and 00:26:56.882 --> 00:27:00.385 start to do an analysis based on those things. Furthermore, let's 00:27:00.385 --> 00:27:05.557 go back and look at this here. So Frank there up there in the 00:27:05.557 --> 00:27:09.528 corner, he doesn't know anybody. So if Frank wants to send a 00:27:09.528 --> 00:27:12.764 message to Bob, there's no way for the web of trust to help him 00:27:12.764 --> 00:27:16.869 out because he has no connections so he'll have to use 00:27:16.869 --> 00:27:21.840 some other method like Tofu or something to boot strap his way 00:27:21.840 --> 00:27:25.544 into the web of trust. C.R.Y.P.T.O. parties are the 00:27:25.544 --> 00:27:29.781 usual way to do that. You go to a C.R.Y.P.T.O. party, meet a 00:27:29.781 --> 00:27:33.352 bunch of people. Hopefully those people know a bunch of people 00:27:33.352 --> 00:27:37.189 and now you're kind of hooked into the web. So the other 00:27:37.189 --> 00:27:40.826 slightly more private way to do this is a trust to introduction. 00:27:40.826 --> 00:27:43.328 We use the same graph we just did but instead of it being 00:27:43.328 --> 00:27:46.098 automated and look it up on the server, it happens organically 00:27:46.098 --> 00:27:51.069 where Alice who asks Carol who asks Frank who gives the 00:27:51.069 --> 00:27:56.975 information back so it's all ad hoc. That means that there's no 00:27:56.975 --> 00:28:01.613 like server that has the map of...speaking of metadata, let's 00:28:01.613 --> 00:28:03.615 talk a little bit about metadata. Everything we have 00:28:03.615 --> 00:28:06.585 talked about so far was pretty much message content so what did 00:28:06.585 --> 00:28:11.089 I actually write to the other person? Metadata is all the 00:28:11.089 --> 00:28:13.525 stuff that you can learn about a message without knowing the 00:28:13.525 --> 00:28:16.862 content. So who is the send sender, who is the recipient, 00:28:16.862 --> 00:28:20.532 what time was it sent, how big was the communication and what 00:28:20.532 --> 00:28:26.672 app was used to communicate you can also often find out and if 00:28:26.672 --> 00:28:31.977 you are -- this stuff alone is enough to get you in trouble. So 00:28:31.977 --> 00:28:36.315 if you are a high-level government...and metadata shows 00:28:36.315 --> 00:28:41.820 you communicating with a whistle blower journalist, like that 00:28:41.820 --> 00:28:44.656 alone is enough to get you in trouble even if they can't get 00:28:44.656 --> 00:28:48.994 you in trouble. So this stuff is important. And it's even worse 00:28:48.994 --> 00:28:51.897 if they see he's also using this encrypted app to do the 00:28:51.897 --> 00:28:59.237 communications, right? Metadata can be picked up in a few 00:28:59.237 --> 00:29:01.974 different places so that server that's in the middle that we 00:29:01.974 --> 00:29:06.278 have kind of been showing connections for you, that could 00:29:06.278 --> 00:29:08.847 easily be logging all this traffic, even if it's all 00:29:08.847 --> 00:29:12.117 end-to-end encrypted, they still know who they sent messages to 00:29:12.117 --> 00:29:17.456 and they know who they went to and all that stuff. They 00:29:17.456 --> 00:29:19.958 probably know the IP addresses that it came from. So if you did 00:29:19.958 --> 00:29:23.462 this from your house or phone, they might be able to tie that 00:29:23.462 --> 00:29:29.668 to an actual identity in the real world. A lot of messaging 00:29:29.668 --> 00:29:33.605 require phone number and makes it even more difficult to be 00:29:33.605 --> 00:29:39.077 anonymous. You can go buy a phone in cash and whatever, but 00:29:39.077 --> 00:29:43.749 that's actually still making it much easier to track you and 00:29:43.749 --> 00:29:47.686 finally a lot of these apps will ask you to upload their contact 00:29:47.686 --> 00:29:49.688 -- some will do it automatically. Some will ask you 00:29:49.688 --> 00:29:53.225 first. The idea is that it's going to pull up all your 00:29:53.225 --> 00:29:57.329 regular content and you can easily use this new app to send 00:29:57.329 --> 00:29:59.798 messages to all the people that you know but the server has 00:29:59.798 --> 00:30:04.303 gotten this new social graph of all the people you know even if 00:30:04.303 --> 00:30:11.610 you didn't send them a message. And furthermore, let's pretend 00:30:11.610 --> 00:30:16.114 that the server that you're using is Open Source. You don't 00:30:16.114 --> 00:30:20.585 have any way to prove that this is not doing all this stuff. 00:30:20.585 --> 00:30:23.655 Even if they say that they're...blah, blah, blah, you 00:30:23.655 --> 00:30:27.392 don't know if they're actually running on the server side so 00:30:27.392 --> 00:30:31.129 they could easily be logging when they're not supposed to be. 00:30:31.129 --> 00:30:34.132 Also they might say that they're going to take your contact list, 00:30:34.132 --> 00:30:37.703 take all the phone numbers that you know and hash them so no one 00:30:37.703 --> 00:30:40.272 can figure them out. Waiting for the last one from the 00:30:40.272 --> 00:30:46.912 C.R.Y.P.T.O. geeks that stayed because the space of available 00:30:46.912 --> 00:30:50.282 phone numbers is not really something that will work out. 00:30:50.282 --> 00:30:52.484 Could easily brute force that hash and -- no. That's not going 00:30:52.484 --> 00:30:58.490 to be enough. That's way outside of the scope of this 00:31:01.493 --> 00:31:06.498 conversation. Okay. So even if the server is kind of the good 00:31:06.498 --> 00:31:09.067 guys, then we still have to worry about everybody else 00:31:09.067 --> 00:31:12.370 trying to collect metadata so the ISP could be doing it. If 00:31:12.370 --> 00:31:14.573 the government has taps on various lines, they could be 00:31:14.573 --> 00:31:17.609 doing it. Again they're going to have the IP addresses of what 00:31:17.609 --> 00:31:23.181 connects. They might have the phone numbers or other phone 00:31:23.181 --> 00:31:29.154 identity or that kind of stuff and they could definitely force 00:31:29.154 --> 00:31:31.757 the servers involved to give it to them but they can also often 00:31:31.757 --> 00:31:35.160 infer what's going on so if you pretend that the server is not 00:31:35.160 --> 00:31:37.829 colluding with these other government attackers who are 00:31:37.829 --> 00:31:43.001 trying to steal your stuff, you end up with this weird situation 00:31:43.001 --> 00:31:50.509 where the, okay, Alice sends a message to Bob at midnight. So 00:31:50.509 --> 00:31:54.913 what's going to happen from the government eavesdroper's point 00:31:54.913 --> 00:32:00.185 of view is Alice sent a message to the server at midnight. 00:32:00.185 --> 00:32:03.789 Messaging server sent a message to Bob at midnight or maybe 00:32:03.789 --> 00:32:07.492 slightly after midnight. So by doing those kinds ever tricks 00:32:07.492 --> 00:32:12.230 they can infer even if they don't have access to the server. 00:32:12.230 --> 00:32:15.267 Another way you can do this is with size. So you might be able 00:32:15.267 --> 00:32:18.370 to tell that Alice and Bob are communicateing because you saw 00:32:18.370 --> 00:32:22.974 Bob send a package of a particular size and then the 00:32:22.974 --> 00:32:25.710 server happened to send out a package of that particular size 00:32:25.710 --> 00:32:29.080 out to Alice. So now we can assume that that's who was 00:32:29.080 --> 00:32:33.084 communicating and not that Bob was talking to Frank or Alice 00:32:33.084 --> 00:32:36.188 was talking to Carol or any of those things. So to do that 00:32:36.188 --> 00:32:39.257 inference, you can look at connections. You can look at 00:32:39.257 --> 00:32:43.829 timing. You can look at size. And you can look at existence of 00:32:43.829 --> 00:32:46.965 traffic so this is a traffic confirmation attack. If the app 00:32:46.965 --> 00:32:54.706 allows someone to send you a message, let's pretend the 00:32:54.706 --> 00:32:57.609 government has a van parked outside...they want to see if 00:32:57.609 --> 00:33:01.413 this alias that they have some fake name for is really you. 00:33:01.413 --> 00:33:04.983 They send a message of a certain size at a certain time to that 00:33:04.983 --> 00:33:09.187 alias and then they're watching your WiFi with their government 00:33:09.187 --> 00:33:11.823 van to see if that thing comes through that's the same size. If 00:33:11.823 --> 00:33:14.426 it does, then they can link those two things together. This 00:33:14.426 --> 00:33:21.466 is probably an okay time to talk about TOR. TOR will protect you 00:33:21.466 --> 00:33:26.271 from the first thing only. Instead of the government 00:33:26.271 --> 00:33:31.109 knowing that you have connected to this secure messaging server, 00:33:31.109 --> 00:33:37.115 instead they know you have connected to TOR. And there's 00:33:40.118 --> 00:33:42.954 really deep stuff about how many different TOR stuff you have to 00:33:42.954 --> 00:33:45.690 have in the puzzle to be able to do it. It's possible to do that 00:33:45.690 --> 00:33:53.298 in some cases. Not to mention the fact that in some cases just 00:33:53.298 --> 00:33:59.104 using TOR is evidence enough. So there was a kid who called in a 00:33:59.104 --> 00:34:02.507 bomb threat to Stanford...because he didn't 00:34:02.507 --> 00:34:04.576 want to take his exams. I think it was Stanford. It might have 00:34:04.576 --> 00:34:09.314 been an East Coast school. And he did this over the internet, 00:34:09.314 --> 00:34:15.086 used TOR and so now he thought he was safe because TOR was 00:34:15.086 --> 00:34:18.456 protecting his IP address so no one could see his IP address. He 00:34:18.456 --> 00:34:21.726 sent it from his campus dorm room so the IT department said 00:34:21.726 --> 00:34:27.732 oh, well, look, there's only like five people using TOR on 00:34:30.869 --> 00:34:36.241 this whole campus so let's ask all them and brought each one of 00:34:36.241 --> 00:34:42.213 them into the room and like you, you were the bomb threat person, 00:34:42.213 --> 00:34:45.517 right? So like just the fact that you're using some of these 00:34:45.517 --> 00:34:48.553 things is often evidence enough until we get to the point where 00:34:48.553 --> 00:34:51.589 everyone uses this stuff ubiquitously all the time, then 00:34:51.589 --> 00:34:54.793 we can give those kinds of people cover. Not necessarily 00:34:54.793 --> 00:34:59.030 bomb threat, but people who are using it for legitimate reasons. 00:34:59.030 --> 00:35:05.570 Another thing to talk about if we're going to talk about secure 00:35:05.570 --> 00:35:08.873 messaging is what happens when the device that has the app that 00:35:08.873 --> 00:35:12.577 does the messaging gets taken by your adversary, whoever that may 00:35:12.577 --> 00:35:16.414 be. If there were any logs on the app that show who you were 00:35:16.414 --> 00:35:19.784 talking to, what you were talking about, they're stored. 00:35:19.784 --> 00:35:22.420 The adversary gets all those things. If you had a contact 00:35:22.420 --> 00:35:24.522 list in the app, the adversary gets that and they can start 00:35:24.522 --> 00:35:27.225 using that to build metadata. They also get your keys most 00:35:27.225 --> 00:35:30.128 likely and if they get your key, then that means they can 00:35:30.128 --> 00:35:35.967 impersonate you to all of your friends. There is another kind 00:35:35.967 --> 00:35:38.303 of interesting wrinkle to what happens when your adversary 00:35:38.303 --> 00:35:43.708 steals your keys. So we talked before about if you're a passive 00:35:43.708 --> 00:35:46.144 attacker, you can't...encrypted data but you can still record 00:35:46.144 --> 00:35:50.315 it. You can just sit there and record all this encrypted 00:35:50.315 --> 00:35:54.786 garbage. Later on they find out who you are and they take your 00:35:54.786 --> 00:35:59.791 phone. If they have all this recorded data, they might be 00:35:59.791 --> 00:36:03.194 able to now use the keys off your phone and decrypt all that 00:36:03.194 --> 00:36:06.097 stuff they have been storing all this time. The way to prevent 00:36:06.097 --> 00:36:10.702 that is to have forward secrecy. There is a lot of C.R.Y.P.T.O. 00:36:10.702 --> 00:36:14.672 mumbo jumbo involved but the key is you stack a key on top of a 00:36:14.672 --> 00:36:19.344 key that you're already using that's temporary and since the 00:36:19.344 --> 00:36:22.147 attacker was passive and not active, they weren't able to 00:36:22.147 --> 00:36:28.753 man-in-the-middle the man and they won't be able to steal the 00:36:28.753 --> 00:36:33.191 key and sometimes called perfect forward secrecy and for this 00:36:33.191 --> 00:36:39.697 talk, the same thing. So...we sides all the things that we 00:36:39.697 --> 00:36:43.368 just -- besides all the things that we just talked ab, they're 00:36:43.368 --> 00:36:46.438 all important so you need to think about things like...use 00:36:46.438 --> 00:36:53.311 perfect forward secrecy. Does my app use an encryption? Does my 00:36:53.311 --> 00:36:56.681 app use some sort of key validation? Those things are all 00:36:56.681 --> 00:37:00.652 really very important but those are only a piece of the puzzle 00:37:00.652 --> 00:37:03.721 so we kind of waved away the C.R.Y.P.T.O. stuff and say yeah 00:37:03.721 --> 00:37:06.558 if we say encrypted it's secure, right? In the real world, that's 00:37:06.558 --> 00:37:09.160 not how it workings. There is a bunch of things that could go 00:37:09.160 --> 00:37:11.229 wrong, they could have other noncrypto-related 00:37:11.229 --> 00:37:17.235 vulnerabilities in the app where the attacker can take over the 00:37:19.537 --> 00:37:22.941 app and when things come in, they can read them as the app 00:37:22.941 --> 00:37:28.646 decrypts them. So if you really want to be confidence in the app 00:37:28.646 --> 00:37:31.850 that you're using, you need to have somebody audit the app. 00:37:31.850 --> 00:37:35.120 Since I know that all of you are normal people and not like 00:37:35.120 --> 00:37:37.388 C.R.Y.P.T.O. auditors, you probably can't do it yourself. 00:37:40.692 --> 00:37:43.862 Couple of options, you could use an Open Source app and then 00:37:43.862 --> 00:37:47.132 anyone can >> Kit it -- Audit it and tell you what they got. If 00:37:47.132 --> 00:37:51.302 you're using something that's closed source, then you're going 00:37:51.302 --> 00:37:55.406 to have to have somebody else Audit and look at the results. 00:37:55.406 --> 00:37:59.110 If someone else Audited but you can't see the results of what 00:37:59.110 --> 00:38:03.047 the Audit was, then that Audit wasn't of much use to you. Could 00:38:03.047 --> 00:38:06.718 have said everything is broken and all you see is it was 00:38:06.718 --> 00:38:10.355 Audited, right? So you need to have some assurance of not only 00:38:10.355 --> 00:38:14.793 was it tested by somebody but also that either it did well on 00:38:14.793 --> 00:38:17.762 the test or did poorly on the test but now that things are 00:38:17.762 --> 00:38:23.468 fixed and now there is a retest and that's fine. A lot of 00:38:23.468 --> 00:38:25.737 C.R.Y.P.T.O. geeks will tell you that you have to have Open 00:38:25.737 --> 00:38:28.406 Source or you cannot have a secure app. I am probably going 00:38:28.406 --> 00:38:32.143 to get beat up later but I'm going to say that's not true. 00:38:32.143 --> 00:38:36.414 Just because anyone could Audit an app doesn't mean that anyone 00:38:36.414 --> 00:38:40.485 is going to actually Audit the app. There are plenty of things 00:38:40.485 --> 00:38:45.323 that are Open Source that no one has time to look at. And because 00:38:45.323 --> 00:38:47.559 we're talking to normal people here, it's not like I can just 00:38:47.559 --> 00:38:50.795 tell you well, you need to Audit the app yourself, so you have to 00:38:50.795 --> 00:38:56.134 be using an app that has been Audited. Even if you assume that 00:38:56.134 --> 00:38:59.871 the app you're using is good, then you have to think about the 00:38:59.871 --> 00:39:02.874 OS. Is the OS you're using using Open Source? Because if not, who 00:39:02.874 --> 00:39:06.544 knows like backdoor that a C.R.Y.P.T.O. geek will tell you 00:39:06.544 --> 00:39:14.152 about a closed source app also apply to the OS now. So if you 00:39:14.152 --> 00:39:19.958 believe in -- also so iPhone has a little bit of Open Source in 00:39:19.958 --> 00:39:22.894 it. Android has more Open Source in it but both of them have a 00:39:22.894 --> 00:39:25.830 whole bunch of closed source that you can't Audit so you 00:39:25.830 --> 00:39:29.400 can't even say I'm using Android so there I'm Open Source. The OS 00:39:29.400 --> 00:39:36.174 is important. But even if you assumed that you had something 00:39:36.174 --> 00:39:39.777 that had no crazy binaries that no one could Audit...then you 00:39:39.777 --> 00:39:43.448 still also have the firmware on the phone which is going to be 00:39:43.448 --> 00:39:46.951 closed source, things that like run the radio on the phone, 00:39:46.951 --> 00:39:50.154 those are closed source and also things like automatically 00:39:50.154 --> 00:39:54.058 receive it and apply it on the phone network. So if you are 00:39:54.058 --> 00:39:56.861 thinking about attackers that have a lot of power, they could 00:39:56.861 --> 00:40:00.231 do a lot of things straight to that and even though the rest of 00:40:00.231 --> 00:40:06.204 your phone is fine, the rest of the it becomes irrelevant. 00:40:06.204 --> 00:40:10.475 Again, with the hardware as well. So just having your Open 00:40:10.475 --> 00:40:15.446 Source messaging program isn't enough by itself. Furthermore we 00:40:15.446 --> 00:40:19.150 have another problem. Let's pretend that somebody that you 00:40:19.150 --> 00:40:23.621 trust has an app, whether it's Open Sourceed or Closed Source 00:40:23.621 --> 00:40:27.625 and they -- whatever they said you're happy that this is an app 00:40:27.625 --> 00:40:33.631 that you want to use, so now where did row get the app? You 00:40:35.900 --> 00:40:37.902 didn't know that yourself, even if you did build it yourself, 00:40:37.902 --> 00:40:41.272 you didn't read all the source code and make sure it matched 00:40:41.272 --> 00:40:47.412 what was Audited, at least I have never met anyone who does 00:40:47.412 --> 00:40:50.982 that. You download it from somewebsite somewhere in did you 00:40:50.982 --> 00:40:53.351 get it from an app store in everyone one of those new 00:40:53.351 --> 00:40:57.021 sources is an attack against you because they could have added 00:40:57.021 --> 00:41:01.693 stuff to the code that could have all kinds of bad stuff in 00:41:01.693 --> 00:41:06.197 it that wasn't never Audited. This is a really hard problem to 00:41:06.197 --> 00:41:08.232 solve and there is not a good solution yet. What you need is 00:41:08.232 --> 00:41:14.238 something called a termistic build and he'll be able to get 00:41:18.009 --> 00:41:23.481 his report and say here is the hash. Guess I didn't talk about 00:41:23.481 --> 00:41:27.151 hash. Here is like a fingerprint of what that build that I 00:41:27.151 --> 00:41:31.622 audited was and later the website from the app store or 00:41:31.622 --> 00:41:34.592 whatever, you can verify that you get the same fingerprint 00:41:34.592 --> 00:41:37.228 that the auditor got and you know exactly what you're 00:41:37.228 --> 00:41:39.931 getting. We're not really there yet. We'll probably never be 00:41:39.931 --> 00:41:42.567 able to do that on IOS because of the way the system is. 00:41:42.567 --> 00:41:47.705 Android, we're almost there. You could do it manually. Maybe 00:41:47.705 --> 00:41:50.408 we'll have an automated way to do it and that would be nice. 00:41:50.408 --> 00:41:58.082 All right. Almost done. There is a whole bunch of things that 00:41:58.082 --> 00:42:00.351 crypt {O*BGDZ}o apps that tell you that they do that are not 00:42:00.351 --> 00:42:05.390 what they say. So Auto delete, there is a bunch of apps that 00:42:05.390 --> 00:42:12.263 have things like you send this message that has a time message 00:42:12.263 --> 00:42:14.265 and after that, no one can read it anymore. The problem is that 00:42:14.265 --> 00:42:17.135 the other person on the other side isn't necessarily using the 00:42:17.135 --> 00:42:19.704 same client you are. They could have modified their client or 00:42:19.704 --> 00:42:23.908 third-party client that still can receive these messages but 00:42:23.908 --> 00:42:26.144 doesn't follow the rules about when it's supposed to delete 00:42:26.144 --> 00:42:33.017 them. Once you send a message to someone, it's theirs. The worse 00:42:33.017 --> 00:42:39.323 case is a photo of their phone, right? Related to this any apps 00:42:39.323 --> 00:42:43.494 that say they notify you or prevent screen shots, same 00:42:43.494 --> 00:42:46.731 story. Someone could be using a third-party version of that app 00:42:46.731 --> 00:42:50.201 that doesn't do those things and could still receive the messages 00:42:50.201 --> 00:42:52.203 so they can take all the screen shots they want and you'll never 00:42:52.203 --> 00:42:58.209 know. This is a little bit of a deep topic for...but essentially 00:43:01.612 --> 00:43:05.483 a one-time pad is an unbreakable form of cryptography. That means 00:43:05.483 --> 00:43:09.353 that when you're using it in an app like this, it's unbreakable 00:43:09.353 --> 00:43:13.891 and that's not good. The problem is what makes a one-time pad 00:43:13.891 --> 00:43:17.895 good is that you have a long sequence of random stuff and use 00:43:17.895 --> 00:43:21.199 that to encode all of your data that you're going to send but 00:43:21.199 --> 00:43:23.601 you're never going to have a long enough thing to send all 00:43:23.601 --> 00:43:25.970 the things that you're going to want to send so then you're 00:43:25.970 --> 00:43:29.607 going to have to get more one-time pad data from somebody 00:43:29.607 --> 00:43:35.179 else and send it to somebody else and whatever you're using 00:43:35.179 --> 00:43:39.784 to get and send it, like now you have just collapsed all your 00:43:39.784 --> 00:43:42.653 security...however good those things are because you can't use 00:43:42.653 --> 00:43:44.989 one-time pad to send more one-time pad. Hardware 00:43:48.559 --> 00:43:50.928 C.R.Y.P.T.O., there is a few devices out there that like plug 00:43:50.928 --> 00:43:53.998 this into your phone and then it does magic C.R.Y.P.T.O. and the 00:43:53.998 --> 00:43:57.268 phone can't read it because you don't trust your phone. Might 00:43:57.268 --> 00:44:00.404 have been hacked. So the problem is the phone could instead just 00:44:00.404 --> 00:44:03.407 turn on its microphone and listen to what's being said, 00:44:03.407 --> 00:44:07.111 even though this other thing is sending encrypted data. There 00:44:07.111 --> 00:44:11.983 are a lot of apps that say you send a message and it 00:44:11.983 --> 00:44:15.686 will...within one mile or whatever. There is a bunch of 00:44:15.686 --> 00:44:19.790 different ones that do that. Based on what the client reports 00:44:19.790 --> 00:44:24.629 so if I was at home in Washington State I could have my 00:44:24.629 --> 00:44:27.632 client say I'm at DEFCON and then I would start getting all 00:44:27.632 --> 00:44:31.235 the messages of people who are at DEFCON. There's not anything 00:44:31.235 --> 00:44:36.741 that enforces that to happen. Instead of useing the server 00:44:36.741 --> 00:44:41.412 {KEBGS}, you're connecting other people nearby and sending data 00:44:41.412 --> 00:44:44.715 that way. These aren't anymore secure than any other app. They 00:44:44.715 --> 00:44:47.585 still need all the same C.R.Y.P.T.O. stuff on top of 00:44:47.585 --> 00:44:50.154 that mesh network because any adversary who's there listening 00:44:50.154 --> 00:44:53.324 could pick up that stuff just like anybody else can. Military 00:44:53.324 --> 00:44:57.028 grade is a fun one. There are a lot of things that advertise 00:44:57.028 --> 00:44:59.630 themselves as military grade. This usually means that we're 00:44:59.630 --> 00:45:02.400 talking about a specific type of C.R.Y.P.T.O. algorithm but that 00:45:02.400 --> 00:45:06.137 doesn't address any of the stuff we talked about in this talk at 00:45:06.137 --> 00:45:09.574 all. So even if it's military grade, all the things that we 00:45:09.574 --> 00:45:13.010 just talked about could still be totally wrong. A good way to 00:45:13.010 --> 00:45:16.781 think about military grade is to say this car is safe because it 00:45:16.781 --> 00:45:20.918 has a pull let proof windshield but it doesn't tell you anything 00:45:20.918 --> 00:45:26.958 else about the rest of the car. Generally if someone's using a 00:45:26.958 --> 00:45:31.996 secret magic C.R.Y.P.T.O. method that no one's heard before it's 00:45:31.996 --> 00:45:37.001 probably never tested which means it won't work as well. 00:45:37.001 --> 00:45:40.037 That's generally how it works. You want to use things that are 00:45:40.037 --> 00:45:45.243 well understood and broadly used. Multiple devices is a 00:45:45.243 --> 00:45:49.347 tough problem...so if you have got an iPad and computer and an 00:45:49.347 --> 00:45:53.618 iPhone and an Android device and up to use someone to send a 00:45:53.618 --> 00:45:57.555 message to you from their C.R.Y.P.T.O. app and you receive 00:45:57.555 --> 00:46:01.892 it on any of those devices, pretty tricky problem because 00:46:01.892 --> 00:46:04.929 now you have to like have devices sign each other's keys 00:46:04.929 --> 00:46:07.365 or you have to have multiple identities or the server has to 00:46:07.365 --> 00:46:10.401 manage it all and the server can add new devices that it really 00:46:10.401 --> 00:46:16.907 has turns out to be a really hard problem. All right. So even 00:46:16.907 --> 00:46:21.012 with an app that does everything right and solves all things that 00:46:21.012 --> 00:46:25.816 we talked about, you're still not going to be totally 00:46:25.816 --> 00:46:30.221 effective against all the different types of adversaries. 00:46:30.221 --> 00:46:32.990 The low-resource people...the high-resource opportunistic 00:46:32.990 --> 00:46:36.427 people, you can stop kind of bulk message collection so you 00:46:36.427 --> 00:46:40.531 can't read all of the data necessarily. But metadata is 00:46:40.531 --> 00:46:47.772 probably still on the table, very difficult to handle. And as 00:46:47.772 --> 00:46:52.610 per targeted high-resource people, you're never going to 00:46:52.610 --> 00:46:57.415 win against that by choosing the correct way to do things like go 00:46:57.415 --> 00:47:00.117 to spy school and learn trade craft and make sure they never 00:47:00.117 --> 00:47:05.122 steal your phone and, you know, use -- they could buy Odais that 00:47:05.122 --> 00:47:08.059 are against your phone and use them. Like, you're not going to 00:47:08.059 --> 00:47:11.862 win against this. So the choice of your C.R.Y.P.T.O. app is not 00:47:11.862 --> 00:47:15.366 going to solve the problem of a really powerful entity coming 00:47:15.366 --> 00:47:21.005 after you specifically. So what can you do? You need to 00:47:21.005 --> 00:47:25.843 understand who you're trying to secure things, who you're trying 00:47:25.843 --> 00:47:29.780 to secure them from. You need to understand the features that the 00:47:29.780 --> 00:47:31.916 apps are using. You need to decide if the app is doing the 00:47:31.916 --> 00:47:33.918 things that it says it's going to do. And you need to find a 00:47:33.918 --> 00:47:39.924 way to get that app in a secure manner. I can't tell you what 00:47:43.427 --> 00:47:46.030 the best thing for you to use is because that's something you 00:47:46.030 --> 00:47:53.270 have to decide for yourself. Valid -- key validation is 00:47:53.270 --> 00:47:55.539 probably the biggest -- if you can only take away one thing 00:47:55.539 --> 00:47:59.944 from this it's key validation. If you're using an app where you 00:47:59.944 --> 00:48:02.613 can't figure out how to do key validation, assume that it's 00:48:02.613 --> 00:48:09.120 using key validation and use it appropriately. EFF took a lot of 00:48:09.120 --> 00:48:12.490 flak for this but I think it was great to learn what the 00:48:12.490 --> 00:48:17.128 different apps can do so hopefully they're going to 00:48:17.128 --> 00:48:20.564 update it soon but that's a great starting point to looking 00:48:20.564 --> 00:48:27.805 at the secure apps out there...so that's all we have 00:48:27.805 --> 00:48:31.809 got. Thanks to Cara for the diagrams for the hacker guy and 00:48:31.809 --> 00:48:38.582 Tom, he's my guru guy back in the corner. If you have 00:48:38.582 --> 00:48:44.789 questions that's about deep math stuff, I'm not going to answer 00:48:44.789 --> 00:48:47.558 them, but he can. The white paper that covers most of this 00:48:47.558 --> 00:48:52.129 stuff is on your DEFCON CD. It will also be on the website and 00:48:52.129 --> 00:48:55.399 we'll be putting an updated one as well as the slides probably 00:48:55.399 --> 00:49:01.338 next week. [Applause]. >> All right. So I got one question. On 00:49:09.713 --> 00:49:15.519 your phone, what is it that you use for secure messaging? >> I 00:49:15.519 --> 00:49:18.823 can't answer that. I said at the very beginning I can't answer 00:49:18.823 --> 00:49:26.730 specific ones. I can't do it. >> Is there anything that you won't 00:49:26.730 --> 00:49:32.636 use that people might be tempted to use? >> If you are worried 00:49:32.636 --> 00:49:36.674 about real attackers, you need to use something at a bare 00:49:36.674 --> 00:49:40.845 minimum that does key validation. That's the best I 00:49:40.845 --> 00:49:46.350 tell you and there's a good list of different ones that are at 00:49:46.350 --> 00:49:50.387 least popular in this crowd that can all do key validation. I 00:49:50.387 --> 00:49:52.890 wished they would all get along and we wouldn't all have to have 00:49:52.890 --> 00:50:00.497 five different apps, but can't win. >> All right. Well, that 00:50:00.497 --> 00:50:08.405 was very good. That was very good. Let's give him a hand. 00:50:08.405 --> 00:50:10.407 [Applause]