1 00:00:00,000 --> 00:00:07,740 And so it begins. Welcome to the Packet Hacking Village at DEF CON 23. It is now the top of the hour. Good afternoon, everyone. 2 00:00:08,500 --> 00:00:20,120 And so we have a very, very, very special guest speaker today. He is a manager of Threat Services, Threat Systems at Fidelis. 3 00:00:20,200 --> 00:00:28,720 He will be here to talk about ICU. Yes. He sees you, ICU, everyone sees you. 4 00:00:28,720 --> 00:00:30,680 Ladies and gentlemen, Andrew Beard. 5 00:00:39,080 --> 00:00:41,100 All right, we got audio? Cool. 6 00:00:42,360 --> 00:00:48,700 So I'm Andrew Beard. I work for Fidelis Cybersecurity. A bunch of us over there in the corner. 7 00:00:48,880 --> 00:00:54,140 I totally can't see any of you guys because there's a giant bright light just in my face. 8 00:00:54,260 --> 00:00:56,400 But, you know, I'm trusted over there. 9 00:00:57,100 --> 00:00:58,700 So originally I was supposed to... 10 00:00:58,720 --> 00:01:01,860 I was supposed to co-present with one of my co-workers, Brian Woolwinder. 11 00:01:02,140 --> 00:01:07,560 He couldn't make it here today. He had some pretty severe back issues right before the convention. 12 00:01:09,180 --> 00:01:12,580 So he's the guy that is normally the public speaking guy. 13 00:01:12,760 --> 00:01:17,240 I was going to be the one kind of standing off here in the corner, nodding and, you know, silent. 14 00:01:17,360 --> 00:01:23,020 So just so you know, I'm picturing all you guys in your underwear right now because I'm nervous as hell. 15 00:01:25,560 --> 00:01:28,700 So in memory of Brian, since he couldn't... 16 00:01:28,720 --> 00:01:30,300 I just wanted to say a couple words. 17 00:01:31,040 --> 00:01:35,080 When you've been down to lift shit, you know, lift with your legs, not your back. 18 00:01:35,300 --> 00:01:40,000 Always kind of pull in your ab muscles there, even if you're just kind of bending, not lifting a lot. 19 00:01:40,160 --> 00:01:41,780 And avoid twisting your trunk. 20 00:01:42,200 --> 00:01:49,300 All of those things can, you know, help you avoid a long and painful recovery process and bailing on your co-presenter at DEF CON. 21 00:01:51,760 --> 00:01:57,240 So I wanted to talk a little bit here today about DEF CON 22, specifically a wall of sheep. 22 00:01:58,720 --> 00:02:05,900 You know, our kind of what we did last year, a couple of very basic and very, very stupid ways to pass credentials in the clear. 23 00:02:06,660 --> 00:02:11,960 And a couple of weird things we kind of found when we were running our setup out there. 24 00:02:12,900 --> 00:02:17,880 So last year, DEF CON 22, we were a sponsor, sponsored this year. 25 00:02:18,500 --> 00:02:28,180 And, you know, as part of that, we thought it would be fun to park a couple of our guys on a network tap, same traffic everybody else is seeing, and kind of see what we could find. 26 00:02:30,540 --> 00:02:36,600 So I don't want to get too much into what we actually use, but just so you guys got an idea of what our capabilities are. 27 00:02:36,780 --> 00:02:41,560 We have a commercial, off-the-shelf network visibility appliance, nothing really special. 28 00:02:42,700 --> 00:02:49,360 We have a common data tap, same one that anybody over there in the packet hacking village can just plug into, take a look at the traffic. 29 00:02:50,380 --> 00:02:53,780 And we, you know, our system, it's kind of rules-based. 30 00:02:54,060 --> 00:02:58,700 We had some general purpose rules, same things that anybody who uses the product can use. 31 00:02:58,720 --> 00:03:06,880 And some that we specifically customized for Wallace Sheave to kind of flag on interesting things and capture content that we thought was particularly fun. 32 00:03:07,660 --> 00:03:11,180 We also did kind of a metadata capture for the duration of the event. 33 00:03:12,000 --> 00:03:24,260 You know, we would capture things like IP addresses, URLs, nothing in the content side, but just stuff that kind of let us describe what was going on and do a kind of gross estimation of the traffic. 34 00:03:24,740 --> 00:03:28,260 That metadata comprised about 500 megs of stuff. 35 00:03:28,720 --> 00:03:31,600 And that's what we did for the three days between August 8th and August 10th. 36 00:03:31,680 --> 00:03:34,440 And that represents a little over 6 million transactions. 37 00:03:35,140 --> 00:03:42,340 Transaction to us is, it's not a TCP session, it's a transfer. 38 00:03:42,560 --> 00:03:47,640 So if you've got like an HTTP transaction going on, that's one particular file that came down. 39 00:03:47,780 --> 00:03:53,240 You go three files in one particular HTTP session, three different transactions. 40 00:03:53,940 --> 00:03:58,700 So that's just a sampling of what we had, but that's the stuff that we were concentrating on for the announcement. 41 00:04:00,620 --> 00:04:05,480 So, you know, a couple rules of engagement that we had going in and stuff I'll talk about. 42 00:04:05,660 --> 00:04:07,660 We're completely passive listener, right? 43 00:04:07,820 --> 00:04:10,980 The tap over there is, you know, it's one way. 44 00:04:11,140 --> 00:04:13,320 We're not doing any packet injection back out. 45 00:04:13,560 --> 00:04:15,680 We're not trying to man in the middle anything. 46 00:04:16,080 --> 00:04:19,960 We're not able to, you know, affect the transfers going on. 47 00:04:20,080 --> 00:04:21,620 We just watch and see what happens. 48 00:04:22,260 --> 00:04:27,140 We also, anything content-wise in an SSL or TLS transaction, 49 00:04:27,900 --> 00:04:28,700 we pretty much do the same thing. 50 00:04:28,720 --> 00:04:33,060 much ignored right we would capture metadata on it just so we know where it was coming from you 51 00:04:33,060 --> 00:04:39,020 know some light certificate information but if you were using ssl or tls you were safe you know 52 00:04:39,020 --> 00:04:43,700 we weren't doing anything that was particularly high level all these are very very very basic 53 00:04:43,700 --> 00:04:49,320 techniques and all the credentials i'll talk about here are partially redacted same thing 54 00:04:49,320 --> 00:04:54,960 you'll see up there with the wall of sheep um you know i'm not going to be giving away anything here 55 00:04:54,960 --> 00:05:00,680 that uh you know is going to be sensitive at all now granted this all happened a year ago 56 00:05:00,680 --> 00:05:05,940 if these guys guys got pwned and they're still using the password a year later they 57 00:05:05,940 --> 00:05:08,980 probably deserve it but you know that's somebody else's domain 58 00:05:11,080 --> 00:05:16,060 so a little bit about just overall what we were looking at right over the course of those three 59 00:05:16,060 --> 00:05:21,900 days um we were seeing a bunch of different uh protocols but you know the vast majority of it 60 00:05:21,900 --> 00:05:24,840 these two uh you know this is all 61 00:05:24,960 --> 00:05:31,920 normal, unencrypted HTTP traffic. Total bulk of it. This is anything SSL, TLS, and that can be 62 00:05:31,920 --> 00:05:38,240 HTTPS, email over a TLS session, you know, everything. You know, this is the everything 63 00:05:38,240 --> 00:05:44,920 else. Obviously, you know, HTTP, vast majority of what's going on. People browsing normal websites, 64 00:05:45,140 --> 00:05:48,800 people, you know, using mobile apps that are communicating back to their web app. 65 00:05:49,980 --> 00:05:54,100 You know, nothing particularly special going on. One thing to note, though, so this other 66 00:05:54,960 --> 00:06:01,480 is pretty small. It's like about 7%, right? One of the things that we really expected to see out 67 00:06:01,480 --> 00:06:07,680 of all this was way more VPN traffic. We figured, all right, it's DEF CON. You know, everybody's 68 00:06:07,680 --> 00:06:12,200 going to be encrypting the shit out of everything, right? There's absolutely no reason that somebody's 69 00:06:12,200 --> 00:06:17,340 going to be sending stuff in the clear. Apparently, that totally was not the case. There were a 70 00:06:17,340 --> 00:06:24,340 couple encrypted tunnels, you know, a kind of token presence. But nowhere, anywhere near what 71 00:06:24,340 --> 00:06:24,940 we were expecting. So, you know, it's pretty small. It's like about 7%, right? One of the 72 00:06:24,960 --> 00:06:29,280 things that we were expecting. There are actually more Torito IPv6 tunnels, which are, you know, 73 00:06:29,280 --> 00:06:37,840 still in the clear, but IPv6 encapsulation over IPv4 than there were actual VPN stuff. You know, 74 00:06:37,860 --> 00:06:44,880 almost all the VPNs we're seeing were open VPN, a little bit of IPSec, a little bit of, you know, 75 00:06:44,940 --> 00:06:52,160 proprietary stuff, PAs, those kind of things. You know, the best guess we have for why that's true 76 00:06:52,160 --> 00:06:54,940 is that anybody paranoid enough to use a VPN, they're going to be able to use it. So, you know, 77 00:06:54,960 --> 00:07:00,700 who knows what they were doing, didn't use the Wi-Fi. You know, keep it on cellular, what have 78 00:07:00,700 --> 00:07:10,820 you. You know, just because, you know, they're, you're paranoid, sorry, just because, yeah, sorry, 79 00:07:10,960 --> 00:07:19,260 just because you're paranoid doesn't mean that they aren't actually, you know, trying to watch 80 00:07:19,260 --> 00:07:24,940 you, which obviously we are. So, you know, I want to talk a little bit about, you know, the 81 00:07:24,960 --> 00:07:31,520 passwords, right? Wall of sheep, completely all about the passwords. Credentials, you know, all 82 00:07:31,520 --> 00:07:36,600 that good stuff. You know, there's a lot of other stuff going on, but pretty much credentials is the 83 00:07:36,600 --> 00:07:43,180 reason, you know, this whole thing exists. And, you know, the vast majority of the plain text 84 00:07:43,180 --> 00:07:48,280 credentials we were seeing were over, you know, a couple distinct protocols, mail protocols. I 85 00:07:48,280 --> 00:07:52,740 group all of these three together just because they tend to work very hand in hand. You know, 86 00:07:52,740 --> 00:07:54,940 you have POP3 and SMTT together. You have, you know, you have, you know, you have, you know, you 87 00:07:54,960 --> 00:07:57,680 have, you know, you have a lot of different protocols. You can go incoming, outgoing. IMAP. 88 00:07:57,780 --> 00:08:02,500 All of them tend to be configured very much the same way. You're talking the same clients. And, 89 00:08:02,660 --> 00:08:05,980 you know, in most cases you're talking the same back-end servers, just different ports and 90 00:08:05,980 --> 00:08:13,140 different protocols. FTP, you know, IRC. So, IRC is a little bit of a weird one, right? On a 91 00:08:13,140 --> 00:08:19,700 normal enterprise environment, you're not really expecting to see a lot of IRC traffic. DEF CON 92 00:08:19,700 --> 00:08:24,800 obviously is not your normal enterprise network. The fact that it was up there on that protocol 93 00:08:24,800 --> 00:08:30,200 call graph at all is kind of a testament for the group here as opposed to, you know, the Internet 94 00:08:30,200 --> 00:08:38,000 at large. But so Telnet, there's also the occasional HTTP completely in the clear. I'll get 95 00:08:38,000 --> 00:08:44,300 over into some more common ways for encoding passwords and HTTP traffic later. But just from 96 00:08:44,300 --> 00:08:49,960 the standpoint of this is the stuff that if you're looking at a TCP dump, Wireshark, you know, 97 00:08:49,980 --> 00:08:54,140 you're just going to completely read it off the bat. There's absolutely nothing involved here 98 00:08:54,140 --> 00:08:59,300 that, you know, your average eight-year-old couldn't do if he could figure out, you know, 99 00:08:59,320 --> 00:09:04,180 how to read the word password. So these are what we consider the fish in a barrel protocols, right? 100 00:09:04,260 --> 00:09:10,740 There are so many of them. They're so easy. You know, there's absolutely nothing involved here 101 00:09:10,740 --> 00:09:17,040 that is particularly special. You know, and a couple of these, these are all examples that we 102 00:09:17,040 --> 00:09:23,280 pulled out from last year, right? POP3 transactions, just a little bit of convention here that I'm 103 00:09:23,280 --> 00:09:24,120 using. All the blue circles, all the blue circles, all the blue circles, all the blue circles, 104 00:09:24,140 --> 00:09:27,720 all the blue stuff is the server side. All the red stuff is the client side. You know, if you're 105 00:09:27,720 --> 00:09:33,120 familiar with the Wireshark follow stream stuff, should look kind of similar. Anything in this 106 00:09:33,120 --> 00:09:38,820 weird gray is just stuff that I obfuscated out because I don't want, you know, to piss off anyone 107 00:09:38,820 --> 00:09:46,400 too badly. But, you know, it's, again, server puts up his banner. Client says, hey, I want your 108 00:09:46,400 --> 00:09:52,540 capabilities. You know, says, nope, can't do it. Needs some authorization. Username, password, 109 00:09:52,820 --> 00:09:53,880 that's it, right? 110 00:09:54,140 --> 00:09:59,340 Totally in the clear. If you can go through and just say, I want to look at POP3 sessions, you can 111 00:09:59,340 --> 00:10:04,640 find these. The great thing about all of these plain text credential ones is they're all in the 112 00:10:04,640 --> 00:10:09,300 beginning of the sessions, too, right? You're not going to do anything useful with any of these 113 00:10:09,300 --> 00:10:14,080 until you actually log in. You're not going to have giant mail dumps without the server identifying 114 00:10:14,080 --> 00:10:21,100 who you are. So this is all within maybe the first one, two packets of a transaction once you've set 115 00:10:21,100 --> 00:10:23,300 up your TCP and SYN and ACK and everything. 116 00:10:24,500 --> 00:10:30,660 So, you know, if you're going through looking at just basic packet dumps, you can pretty much just say, give me the first 117 00:10:30,660 --> 00:10:36,600 beginning of this stuff and throw everything else out and, you know, you can still get the credentials in the clear. 118 00:10:37,180 --> 00:10:45,740 So, you know, IMAP, even stupider, you know, you've just got username, password, same line, one, that's it. 119 00:10:46,620 --> 00:10:52,600 This is a real, real easy one to search for if you've just got a plain text dump of all this stuff, right? 120 00:10:54,580 --> 00:10:58,860 FTP transactions, you know, big old banner saying, welcome to my server. 121 00:10:59,280 --> 00:11:06,320 Fun part here, this server actually says that he's doing TLS. He isn't completely in the clear. 122 00:11:06,500 --> 00:11:12,140 Port 21, normal stuff. You know, login banner, username, password, that's it. 123 00:11:13,060 --> 00:11:17,320 Again, all this stuff, this is all going to fit within the first packet. 124 00:11:20,900 --> 00:11:24,120 So, as I said before, this is all stuff that we copy. 125 00:11:24,140 --> 00:11:29,700 We're looking at content. We also did a fair amount of metadata capture, right? 126 00:11:29,760 --> 00:11:36,520 We were trying to, in our metadata capture, one of the attributes that pulls out is URLs, particularly in HTTP traffic. 127 00:11:37,120 --> 00:11:46,740 So, even though I don't have a complete dump of them, you know, say that you're just an incredibly, you know, first web app you've ever done 128 00:11:46,740 --> 00:11:50,820 and you're saying, all right, I want to put username and password info up. 129 00:11:50,900 --> 00:11:52,840 I need to do some kind of credential exchange. 130 00:11:53,280 --> 00:11:54,080 So, you say, wow. 131 00:11:54,140 --> 00:12:03,900 Okay, I know about this trick where I'm going to, you know, put a key and value pair truncated together and I'm just going to, you know, use that. 132 00:12:04,280 --> 00:12:13,340 So, if you dump all of these URLs into a file, which is very, very easy to do with, you know, plenty of good tools out there. 133 00:12:13,460 --> 00:12:15,520 Bro in particular is one of my favorites. 134 00:12:17,300 --> 00:12:23,860 Bro is a very, very powerful, not basically network analyzer. 135 00:12:24,140 --> 00:12:25,360 That's completely scriptable. 136 00:12:26,280 --> 00:12:34,720 You can say, all right, I just, with its default configuration, dump all of the URLs that I'm seeing in the clear to a file, to a log file. 137 00:12:34,940 --> 00:12:39,480 And then just grep through that for, you know, something like this, this sequence. 138 00:12:39,800 --> 00:12:44,360 You know, all of a sudden, all the usernames and passwords just completely fall out of here. 139 00:12:45,880 --> 00:12:47,520 One other fun point. 140 00:12:47,760 --> 00:12:52,400 The word for password in almost every language is password. 141 00:12:53,040 --> 00:12:54,000 So, it doesn't. 142 00:12:54,140 --> 00:12:57,960 It doesn't really matter if the guy is talking in Spanish or what have you. 143 00:12:58,540 --> 00:13:05,460 You know, just for giggles, go ahead and you can look up all the different translations for password. 144 00:13:05,780 --> 00:13:06,540 Search for them, too. 145 00:13:06,920 --> 00:13:10,000 You end up finding plenty of stuff that you wouldn't think of. 146 00:13:10,760 --> 00:13:18,980 Defcon, especially, being a pretty international event, a lot of people come from a lot of different places with a lot, a lot of misconfigured web servers. 147 00:13:23,100 --> 00:13:26,100 So, you know, those are all kind of individual examples. 148 00:13:26,400 --> 00:13:31,900 But when it comes to all of these plain text protocols, email is the absolute king, right? 149 00:13:32,160 --> 00:13:40,040 These three, POP3, IMAP, and SMTP, make up about 75% of all the credentials that we pulled there. 150 00:13:40,440 --> 00:13:42,480 And that's, you know, a little bit weird. 151 00:13:42,600 --> 00:13:48,360 Because if you remember the previous slide, the vast majority of all the traffic we were seeing was HTTP. 152 00:13:49,060 --> 00:13:49,880 By far. 153 00:13:50,460 --> 00:13:53,380 The mail didn't even make it on the board, right? 154 00:13:53,440 --> 00:13:57,240 Those were all stuck in that other category that was about 7%. 155 00:13:57,240 --> 00:14:02,100 So, 7% of our traffic is responsible for 75% of our credentials. 156 00:14:03,060 --> 00:14:05,120 Yeah, that might be a little bit of a problem. 157 00:14:06,180 --> 00:14:08,460 So, you know, there are a lot of things going on. 158 00:14:08,520 --> 00:14:13,620 One of the big ones is that mail is kind of a given by now, right? 159 00:14:14,220 --> 00:14:18,840 The vast majority of these mail sessions that we were seeing were coming from mobile devices. 160 00:14:19,660 --> 00:14:26,640 I don't know about you guys, but I update the mail settings on my phone maybe about once every two years when I get a new one. 161 00:14:27,040 --> 00:14:28,980 You know, I put it in and I forget about it. 162 00:14:30,580 --> 00:14:33,220 It's also, from then on, it's just talking out. 163 00:14:33,300 --> 00:14:33,980 It's beaconing. 164 00:14:34,220 --> 00:14:38,220 And it's doing it every 10, 15 minutes for the next two years. 165 00:14:39,940 --> 00:14:43,720 When that kind of thing happens in the background, people just don't think about it anymore. 166 00:14:44,100 --> 00:14:45,420 People don't consider it. 167 00:14:45,520 --> 00:14:48,960 And it's really easy to completely misconfigure. 168 00:14:48,980 --> 00:14:58,000 It's really easy to misconfigure it in those first, you know, week when you've got a new phone and you've got all these shiny new buttons and, you know, look, the camera's awesome and, hey, I got a shiny new case for it. 169 00:14:59,280 --> 00:15:02,860 This is completely a problem of almost of the users on making. 170 00:15:03,580 --> 00:15:08,260 You know, a lot of the mobile devices we were seeing, the vast majority of them were iPhones. 171 00:15:08,920 --> 00:15:13,360 And we told that based on the MIME headers for outgoing mail, IMAP ID responses. 172 00:15:14,480 --> 00:15:18,900 And from what we could tell, most of the major providers were actually supported. 173 00:15:18,980 --> 00:15:23,860 They were supported SSL, things like mail.163.com, very, very big Chinese supplier. 174 00:15:25,100 --> 00:15:36,000 In iOS, there's really just these two fields that separate you from, you know, happy, blissful email and being up on that wall over there. 175 00:15:38,820 --> 00:15:47,480 If your provider doesn't support SSL, if you can't check this box because it won't work otherwise, find another provider who isn't complete crap. 176 00:15:47,960 --> 00:15:48,900 It's 25. 177 00:15:48,980 --> 00:15:51,160 15, we've got SSL figured out by now. 178 00:15:53,620 --> 00:16:05,360 One other thing worth noting, none of the major providers, you know, the Googles, the Yahoos, all those guys, actually seem to have credentials up on the board for the mail protocols. 179 00:16:05,700 --> 00:16:16,620 The big reason that we're seeing for that is that the major mail providers, you know, if they have, especially in iOS, I'm using iOS as an example here just because, you know, iPhones. 180 00:16:17,580 --> 00:16:18,820 But, you know. 181 00:16:18,980 --> 00:16:27,060 Even for Outlook, even for Apple Mail, almost every mail client out there, if you select one of these guys, they already know what's going on. 182 00:16:27,220 --> 00:16:28,780 They automatically enable SSL. 183 00:16:28,860 --> 00:16:31,840 Most of these providers don't even support unencrypted mail anymore. 184 00:16:32,480 --> 00:16:39,400 You know, if you go to Outlook or Thunderbird, it'll auto probe and say, all right, your provider supports SSL. 185 00:16:39,520 --> 00:16:43,520 You aren't doing plain text because, you know, I'm going to give you a little bit of a safety net here. 186 00:16:44,400 --> 00:16:48,900 This seems to work pretty well for the mass majority of people. 187 00:16:48,980 --> 00:16:57,720 Just because, like I said, there wasn't a single Gmail credential up there that was actually scraped from somebody doing Gmail. 188 00:16:57,940 --> 00:16:58,860 Same thing with Yahoo. 189 00:16:59,160 --> 00:17:00,840 Same thing with Outlook.com. 190 00:17:01,180 --> 00:17:02,180 Same thing with AOL. 191 00:17:02,220 --> 00:17:03,020 Any of these guys. 192 00:17:03,580 --> 00:17:15,700 Almost everyone was some, you know, some of them were rather large providers, but none of them had those commercial relationships with, you know, Android handset manufacturers, Apple, whoever. 193 00:17:16,180 --> 00:17:18,420 So, you know, the easy button. 194 00:17:18,420 --> 00:17:20,320 It seems to help out a lot here. 195 00:17:21,340 --> 00:17:25,340 So that's, you know, one class of, again, the fish in the barrel credentials. 196 00:17:26,240 --> 00:17:28,980 Stuff straight on the wire, straight plain text. 197 00:17:29,260 --> 00:17:33,640 You know, if you're just looking through them, you can optically just say, all right, there's something bad here. 198 00:17:34,320 --> 00:17:42,580 There's a whole other category of things, and I'm really only going to talk about one of them as an example, that I call encoded credentials. 199 00:17:43,100 --> 00:17:48,400 You know, some people call them obfuscated credentials, but obfuscation kind of implies that there's... 200 00:17:48,420 --> 00:17:54,880 There's an intent to actually hide something, and if you actually had an intent to hide it, you'd try a heck of a lot harder. 201 00:17:56,300 --> 00:18:03,940 So, you know, one of the big ones is just HTTP basic authentication, and I'm showing the credentials here, but I blanked out the password. 202 00:18:05,540 --> 00:18:08,640 So there's one particular field here that's kind of interesting. 203 00:18:08,800 --> 00:18:11,220 It's that authorization basic, right? 204 00:18:11,340 --> 00:18:17,280 And if anybody's looking at this, you know, is thinking in their head, God, that looks a whole lot like Base64. 205 00:18:17,740 --> 00:18:18,180 Right? 206 00:18:18,220 --> 00:18:18,260 Right? 207 00:18:18,280 --> 00:18:18,400 Right? 208 00:18:18,420 --> 00:18:19,780 You are completely right, sir. 209 00:18:20,560 --> 00:18:24,580 So you decode that, and, you know, you just have this nice little colon separated. 210 00:18:25,040 --> 00:18:25,880 That's your username. 211 00:18:26,080 --> 00:18:26,740 That's your password. 212 00:18:27,360 --> 00:18:30,400 If you're looking at this in Wireshark, obviously, you aren't going to see it. 213 00:18:30,460 --> 00:18:34,200 Even if you're doing your little follow stream thing, you're going to have to do a little bit of manual decoding. 214 00:18:34,300 --> 00:18:44,700 Again, this is where a tool like Bro that's a little more content aware really comes in handy, because all that stuff can be scripted very, very easily, just so it pops the passwords out the other end. 215 00:18:45,660 --> 00:18:46,860 So this is... 216 00:18:46,860 --> 00:18:54,300 And, you know, I really shouldn't have used the word okay, because okay implies some kind of, you know, did I agree with it? 217 00:18:54,340 --> 00:18:54,980 It still sucks. 218 00:18:55,260 --> 00:19:00,300 But it's not as much of a problem if your transport layer is providing confidentiality. 219 00:19:00,360 --> 00:19:03,560 Things like HTTPS, where you've got a TLS layer. 220 00:19:04,360 --> 00:19:12,260 You know, most of the time there, you know, just the fact that you're sending it in the clear, all right, you think you've got a pretty good safety net there. 221 00:19:13,120 --> 00:19:16,600 Obviously, that's not the case if you have a misconfigured web server, which... 222 00:19:16,600 --> 00:19:17,840 A bunch of them seem to be. 223 00:19:18,600 --> 00:19:22,180 But, you know, if you're doing straight HTTP, this is a problem. 224 00:19:23,560 --> 00:19:33,400 So if you've ever seen the syntax where you've got a URL and a username and password kind of tacked on the front, this is what your HTTP client is sending out the other side. 225 00:19:33,600 --> 00:19:39,860 It's taking this info, base64 encoding it, and putting it into that header up there. 226 00:19:43,720 --> 00:19:46,320 So, you know, that's okay. 227 00:19:46,600 --> 00:19:51,660 You know, in a case like this, this is somebody actually logging into a website, right? 228 00:19:51,740 --> 00:19:57,460 They try to go somewhere, password prompt stuff, they put in their info, you know, there it is. 229 00:19:57,720 --> 00:20:02,860 But, you know, there's a whole other set of things where stuff goes on in the background you're not aware of. 230 00:20:03,440 --> 00:20:05,780 You know, this is a kind of one where... 231 00:20:06,560 --> 00:20:08,860 This is something we found last year. 232 00:20:09,700 --> 00:20:16,280 And it seemed to be a seller of ink cartridges, toner, office supplies, all sorts of good stuff like that. 233 00:20:17,000 --> 00:20:22,560 There was a user login that was completely, you know, it actually was HTTPS. 234 00:20:22,560 --> 00:20:24,220 We couldn't see the original login. 235 00:20:24,580 --> 00:20:27,080 Cool, you know, they seem to be doing pretty well. 236 00:20:27,280 --> 00:20:31,300 But then it switches over to HTTP for everything else. 237 00:20:31,500 --> 00:20:35,740 And when it does that, it has this funny little thing here. 238 00:20:35,980 --> 00:20:39,360 Now, this is, you know, this isn't the credentials. 239 00:20:40,120 --> 00:20:40,640 Cool. 240 00:20:40,760 --> 00:20:44,180 This isn't the username and password that somebody logged into the site with. 241 00:20:44,820 --> 00:20:46,580 But what it has actually... 242 00:20:46,600 --> 00:20:51,360 What it actually is, is a key that's actually, it says API, but this is actually a session key. 243 00:20:51,740 --> 00:20:55,680 So, I'm playing around with this a little bit and there's a timeout on it. 244 00:20:55,980 --> 00:21:05,360 But for the duration of that timeout, if you keep making requests, this little key here will get you access to the user session. 245 00:21:05,740 --> 00:21:14,020 So, if you happen to see something like this going across the wire, and then, you know, really quickly start sending some requests to that site 246 00:21:14,020 --> 00:21:15,220 with this particular... 247 00:21:16,600 --> 00:21:26,340 You know, these credentials here, forging your own HTTP authorization basic, and honestly, you don't even need to decode it for that. 248 00:21:26,500 --> 00:21:30,960 You could just copy and paste this guy into the same one, use the same header that he's got here. 249 00:21:31,600 --> 00:21:37,800 You could pretty much, well, ship as much toner you want anywhere on the face of the planet. 250 00:21:38,580 --> 00:21:45,240 And in this case, it actually, from what we could tell, again, we didn't do any actual logging in with these credentials. 251 00:21:45,320 --> 00:21:46,580 But from the traffic, we got... 252 00:21:46,580 --> 00:21:48,920 This guy had a saved credit card number. 253 00:21:49,720 --> 00:21:55,000 They didn't, from the quick test we did, they didn't seem to ask for a lot of info once all that was in. 254 00:21:55,100 --> 00:21:57,740 They really prided themselves on that one-click ordering. 255 00:21:58,960 --> 00:22:02,080 And, you know, being able to deliver everything speedy. 256 00:22:02,100 --> 00:22:09,600 Whether you were the guy that actually wanted to do this stuff or the guy who was sitting on the console over there who just saw his credentials go across. 257 00:22:10,460 --> 00:22:13,180 So, again, all this stuff, really basic, right? 258 00:22:13,540 --> 00:22:15,640 We were here for three days or so. 259 00:22:16,100 --> 00:22:16,560 It was a lot of work. 260 00:22:16,580 --> 00:22:21,660 It's pretty easy just pulling this stuff out for, you know, two days, maybe a day and a half. 261 00:22:21,800 --> 00:22:23,040 Then you start getting bored. 262 00:22:24,020 --> 00:22:25,320 Again, fish in a barrel. 263 00:22:25,600 --> 00:22:27,020 There's not a lot of challenge to this. 264 00:22:27,140 --> 00:22:32,620 A bunch of bored guys looking at your network traffic really isn't a good thing. 265 00:22:33,540 --> 00:22:36,000 Especially when you start doing dumb stuff in the clear. 266 00:22:37,140 --> 00:22:40,100 So then we started looking at, all right, what else can we find, right? 267 00:22:40,200 --> 00:22:42,880 And even if it's not credentials, it isn't even high impact. 268 00:22:43,120 --> 00:22:45,440 What fun stuff is going on? 269 00:22:45,440 --> 00:22:47,320 We started seeing blobs like this. 270 00:22:47,720 --> 00:22:50,700 You know, a lot of info encoded in the URL. 271 00:22:50,940 --> 00:22:52,640 All this is URL encoding, right? 272 00:22:52,740 --> 00:22:54,580 There are only certain characters allotted in URLs. 273 00:22:55,080 --> 00:22:58,880 So there's a system for encoding the ones that aren't. 274 00:22:59,160 --> 00:23:02,080 And, you know, this is, you know, some fun stuff here. 275 00:23:02,300 --> 00:23:03,420 And we're seeing some keywords. 276 00:23:03,740 --> 00:23:04,060 All right. 277 00:23:04,100 --> 00:23:05,220 That's interesting. 278 00:23:06,160 --> 00:23:08,040 You know, talking about JSON content. 279 00:23:08,200 --> 00:23:11,080 So we URL decode this whole blob. 280 00:23:11,940 --> 00:23:13,320 That blob, right? 281 00:23:13,320 --> 00:23:16,680 And, you know, we see some interesting stuff. 282 00:23:17,140 --> 00:23:18,260 Mainly all this. 283 00:23:20,060 --> 00:23:25,980 So, you know, this was going to, and I'm probably going to completely slaughter the pronunciation of this, sorry. 284 00:23:26,460 --> 00:23:26,900 Taobao. 285 00:23:27,040 --> 00:23:31,940 My understanding is this is kind of a Chinese eBay kind of Craigslist kind of thing. 286 00:23:32,540 --> 00:23:37,060 And it seems like their mobile app, when you install it, you set some kind of default location. 287 00:23:37,820 --> 00:23:39,780 And you said, okay, this is my home area. 288 00:23:40,300 --> 00:23:42,320 Well, it really doesn't. 289 00:23:42,320 --> 00:23:50,000 Until it acquires a GPS lock and can tell where you are now, it always kind of pulls down that default location. 290 00:23:50,580 --> 00:23:52,360 And says, all right, hey, I'm here. 291 00:23:52,460 --> 00:23:54,140 What's going on in this particular area? 292 00:23:54,440 --> 00:24:00,440 So in this case, that particular area seems to be, you know, right around probably where this guy came from. 293 00:24:01,520 --> 00:24:08,280 You know, mobile apps are fun because they have pretty much complete access to your phone and your network traffic. 294 00:24:08,460 --> 00:24:11,840 So if you install this thing and don't think about it, you know. 295 00:24:12,320 --> 00:24:18,860 There's a possibility that it's just beaconing your home location out to everyone around you, whether you're thinking about it or not. 296 00:24:21,120 --> 00:24:23,580 So, okay, that's not too bad. 297 00:24:23,900 --> 00:24:24,340 Right? 298 00:24:24,400 --> 00:24:29,800 That could be, you know, if somebody came up and asked me, hey, where are you from, I'd probably tell them. 299 00:24:30,040 --> 00:24:34,620 I'd, you know, like to know that, you know, who I was talking to. 300 00:24:34,760 --> 00:24:36,820 But that's not that bad. 301 00:24:36,940 --> 00:24:39,420 And, you know, there's nothing really important in my email. 302 00:24:39,480 --> 00:24:39,720 Right? 303 00:24:39,720 --> 00:24:41,040 Nothing's going on. 304 00:24:42,780 --> 00:24:44,460 So I'll tell you a little story. 305 00:24:44,820 --> 00:24:55,360 There was a woman last year who, she was actually a teacher from Texas, who kind of sat down at our booth and said, hey, you know, I teach technology students. 306 00:24:55,840 --> 00:24:56,860 Teach me something. 307 00:24:57,060 --> 00:24:58,020 What are you guys doing? 308 00:24:58,080 --> 00:24:59,220 Tell me what's going on. 309 00:24:59,600 --> 00:25:07,600 And one of our guys, Dave Chirico, who's probably around here somewhere, but I can't see any of you because of this giant blinding light again. 310 00:25:08,980 --> 00:25:15,860 He sits down with her and he starts showing her, you know, what we're doing, the stuff going across the network, you know, what's going on. 311 00:25:16,300 --> 00:25:18,940 Starts, you know, talking about some of the same stuff here. 312 00:25:19,440 --> 00:25:24,240 And about five minutes later, she comes up and says, hey, this is kind of weird. 313 00:25:24,320 --> 00:25:24,960 Is this important? 314 00:25:26,240 --> 00:25:32,560 So she's looking through and she sees some email traffic going back and forth between these two people. 315 00:25:32,740 --> 00:25:37,140 And from their domain, we can tell that these guys seem to be a recruiting firm. 316 00:25:37,140 --> 00:25:37,960 Pretty small one. 317 00:25:38,080 --> 00:25:39,400 Actually family owned. 318 00:25:40,700 --> 00:25:42,880 You know, explains the names going back and forth. 319 00:25:43,100 --> 00:25:44,140 So, okay. 320 00:25:44,440 --> 00:25:45,560 You know, you've got some email. 321 00:25:45,840 --> 00:25:49,780 So the subject of this particular email was Megan's W4. 322 00:25:50,920 --> 00:25:51,480 Okay. 323 00:25:52,720 --> 00:25:54,200 Getting a little more interesting. 324 00:25:54,300 --> 00:25:54,640 Yeah. 325 00:25:55,160 --> 00:25:57,460 So there's an attachment to this email. 326 00:25:57,700 --> 00:26:01,260 It's called 2014w4.pdf. 327 00:26:02,760 --> 00:26:03,320 Okay. 328 00:26:03,640 --> 00:26:04,200 Yeah. 329 00:26:04,200 --> 00:26:07,040 So, you know, we open it up and say, hey, what's going on? 330 00:26:07,480 --> 00:26:10,420 So I will say that this is not the W4 we saw. 331 00:26:10,760 --> 00:26:11,420 Good news. 332 00:26:11,800 --> 00:26:15,160 There were two differences between the W4 that we saw and this one. 333 00:26:15,460 --> 00:26:17,320 So I'm lazy and I suck at Google foo. 334 00:26:17,420 --> 00:26:20,120 This is a 2015 W4. 335 00:26:20,240 --> 00:26:20,920 It was a 2014. 336 00:26:21,360 --> 00:26:29,660 The other difference was that it had Megan's name, home address, all this stuff, signature, and her social security number. 337 00:26:30,980 --> 00:26:33,760 So, you know, this kind of sucks. 338 00:26:33,880 --> 00:26:36,880 Because Megan is, of course, not the one at DEF CON. 339 00:26:38,220 --> 00:26:40,480 She's not the one passing her stuff in the clear. 340 00:26:40,660 --> 00:26:44,920 Her stuff is just in the email address of, you know, her boss, whatever. 341 00:26:46,660 --> 00:26:52,240 And, you know, now her social security number is probably, you know, on the hard drive of, well, us. 342 00:26:52,360 --> 00:26:54,860 And, you know, a whole bunch of people sitting over there. 343 00:26:56,040 --> 00:26:59,640 Why the hell would you put W4 forms in an unsecured account? 344 00:26:59,660 --> 00:27:00,360 Why the hell would you put W4 in an unsecured email box? 345 00:27:00,680 --> 00:27:05,560 So it's bad enough that this is going in transit across the network, right? 346 00:27:05,640 --> 00:27:10,960 But, you know, the implication here is it doesn't really matter if it went in the clear across the network. 347 00:27:11,880 --> 00:27:13,700 You've got their username and password. 348 00:27:14,000 --> 00:27:15,420 You can just log into their email. 349 00:27:15,540 --> 00:27:19,560 Even if they weren't looking at the time, it's still sitting there in their email box. 350 00:27:20,220 --> 00:27:23,800 And this is kind of where a concept called defense in depth comes in. 351 00:27:23,900 --> 00:27:27,820 And this is a very, very simple application of defense in depth, right? 352 00:27:27,980 --> 00:27:29,420 Protect your stuff in transit. 353 00:27:29,660 --> 00:27:31,760 And then also protect your stuff at rest. 354 00:27:31,960 --> 00:27:37,460 There's no good reason to have an unencrypted W4 form with social security numbers sitting in your email box. 355 00:27:37,720 --> 00:27:40,920 This is a problem that's been solved many, many, many times. 356 00:27:41,460 --> 00:27:43,720 You know, PGP, pretty good privacy. 357 00:27:43,900 --> 00:27:47,520 If you were to encrypt the mail on the client side, send it. 358 00:27:47,600 --> 00:27:49,320 The recipient could decrypt it. 359 00:27:49,420 --> 00:27:52,040 It's not sitting on your provider's email box. 360 00:27:52,560 --> 00:27:54,440 S-MIME certificates, they're cheap. 361 00:27:54,720 --> 00:27:56,340 You know, some of them are free. 362 00:27:56,460 --> 00:27:58,960 They're supported by pretty much every mail client out there. 363 00:27:59,140 --> 00:27:59,640 Encrypted. 364 00:27:59,660 --> 00:28:00,120 Including iOS. 365 00:28:00,320 --> 00:28:02,240 Most Android device manufacturers. 366 00:28:02,680 --> 00:28:03,840 Apple Mail, Exchange. 367 00:28:04,580 --> 00:28:09,960 Pretty much every mail client that doesn't support S-MIME by now is crap. 368 00:28:10,880 --> 00:28:16,220 And, you know, even just at the most basic level, put it in an AES encrypted zip file. 369 00:28:16,420 --> 00:28:20,840 Document-based encryption is better than just having it sit there for anybody to see. 370 00:28:21,040 --> 00:28:26,640 Don't let one password be what separates you from total financial loss. 371 00:28:26,640 --> 00:28:28,820 Or, you know, damaging someone else. 372 00:28:29,820 --> 00:28:30,580 So, yeah. 373 00:28:30,660 --> 00:28:35,380 Megan is probably going to be getting, I guess, one of those offers for one year of credit monitoring. 374 00:28:37,140 --> 00:28:38,780 So, you know, one other... 375 00:28:38,780 --> 00:28:41,080 We thought, okay, this is pretty good. 376 00:28:41,360 --> 00:28:45,180 From the find weird stuff perspective, you win. 377 00:28:45,400 --> 00:28:48,340 We thought that until one other funny little thing happened. 378 00:28:48,520 --> 00:28:52,920 If anybody remembers DEF CON 22, the band The Orb was playing. 379 00:28:53,780 --> 00:28:56,040 You know, 90s electronic band. 380 00:28:56,640 --> 00:28:57,200 Really good set. 381 00:28:59,300 --> 00:29:04,220 So, they were playing, I want to say, late, you know, 1 a.m., 2 a.m., something like that. 382 00:29:04,720 --> 00:29:12,240 Seems like after the set, one of the people affiliated with the band logged into the DEF CON wireless network. 383 00:29:13,240 --> 00:29:13,680 Yeah. 384 00:29:13,980 --> 00:29:16,300 That's going really well for those guys over there. 385 00:29:17,940 --> 00:29:21,780 And, you know, there's this whole email exchange going back and forth. 386 00:29:21,960 --> 00:29:23,780 But this is one of the last ones in the thread. 387 00:29:24,020 --> 00:29:25,360 And there's somebody with the band. 388 00:29:26,640 --> 00:29:33,800 This seems to be a domain that was configured by somebody who, you know, could have done a little bit better job. 389 00:29:34,040 --> 00:29:35,480 Didn't have SSL encryption enabled. 390 00:29:35,760 --> 00:29:38,520 Seems like SSL probably wasn't even an option at the time. 391 00:29:38,860 --> 00:29:45,020 And, you know, this particular person affiliated with the band, again, iPhone, configured, pulling down mail. 392 00:29:45,220 --> 00:29:48,180 So, this is the last one in this particular exchange. 393 00:29:48,580 --> 00:29:54,800 And he's saying, hey, can you pick up the balance of $6,500 for tonight's performance at Vegas? 394 00:29:54,800 --> 00:29:58,040 So, think about this for a sec. 395 00:29:58,740 --> 00:30:01,700 You have, you know the details of this transaction. 396 00:30:02,020 --> 00:30:02,400 Right? 397 00:30:02,520 --> 00:30:03,740 You know what it's for. 398 00:30:03,900 --> 00:30:05,460 You know who it's getting picked up from. 399 00:30:05,740 --> 00:30:09,040 You know, you know, who it's expecting to see. 400 00:30:09,280 --> 00:30:14,060 You can pretty much, you know, know enough to kind of figure your way through it. 401 00:30:14,100 --> 00:30:14,220 Right? 402 00:30:14,360 --> 00:30:17,380 You have unrestricted access to this guy's email address. 403 00:30:19,940 --> 00:30:24,780 Think really hard about how, what you could do within about a month. 404 00:30:24,800 --> 00:30:27,840 Or, I don't know, 30 seconds to try to get your hands on that check. 405 00:30:32,120 --> 00:30:36,500 So, you know, there are little transactions like this that people think aren't terribly important. 406 00:30:36,940 --> 00:30:39,880 But, you know, when it comes down to it, when you have info like this, 407 00:30:40,040 --> 00:30:44,620 you don't really need to spend much time over there at the social engineering village 408 00:30:44,620 --> 00:30:51,880 to, you know, use something like this to possibly cause a significant amount of damage financially. 409 00:30:53,800 --> 00:30:54,780 So, that's something. 410 00:30:54,800 --> 00:30:55,620 That's pretty much it. 411 00:30:55,720 --> 00:30:56,800 Just a quick recap. 412 00:30:57,640 --> 00:31:03,760 You know, through a misconfiguration, lack of controls, you know, poor choice of providers, 413 00:31:04,100 --> 00:31:07,760 it's pretty easy for some of this info to make its way across the network. 414 00:31:07,940 --> 00:31:08,080 Right? 415 00:31:08,180 --> 00:31:10,680 And, you know, again, one checkbox. 416 00:31:10,960 --> 00:31:15,180 That's the difference between everything's good and being up there on the wall. 417 00:31:17,000 --> 00:31:18,200 Consider descents in depth. 418 00:31:18,500 --> 00:31:22,280 The stuff that you, you know, if it's sitting in your email inbox, 419 00:31:22,600 --> 00:31:24,780 assume for a second that somebody has access to it. 420 00:31:24,800 --> 00:31:28,400 Anything that you're worried about losing probably shouldn't be there. 421 00:31:28,480 --> 00:31:29,240 At least not in the clear. 422 00:31:29,900 --> 00:31:34,560 Don't trust your email password as like the only source of security. 423 00:31:34,880 --> 00:31:39,040 Or at least, you know, trying to keep you from harm. 424 00:31:39,180 --> 00:31:42,280 And treat absolutely every network as untrusted. 425 00:31:42,400 --> 00:31:46,220 Especially the ones that put up a giant banner when you log in saying, 426 00:31:46,380 --> 00:31:48,780 holy crap, people may be monitoring your network traffic. 427 00:31:51,260 --> 00:31:52,300 That's pretty much it. 428 00:31:52,880 --> 00:31:53,820 Take questions. 429 00:31:54,800 --> 00:31:54,960 Anything?