1 00:00:00,660 --> 00:00:06,940 It is now 2.04. Thank you so much for being here at the Packet Hacking Village at DEFCON 24. 2 00:00:08,640 --> 00:00:14,920 Again, we cannot thank you enough for all your overwhelming support throughout the whole day. 3 00:00:15,680 --> 00:00:22,760 You know, we knew we were going to put together a good product, but we did not ever, ever, ever imagine that. 4 00:00:22,760 --> 00:00:25,820 It would just, like, be all the way back to the room. 5 00:00:27,300 --> 00:00:35,000 And thank you all so much for all your support, not only just today, but also for all these years. 6 00:00:36,480 --> 00:00:43,460 You know, I remember that Jay Beal was saying, Jay was saying, yeah, I mean, back in the days, I mean, it was literally, 7 00:00:43,520 --> 00:00:48,180 we just had to scribble username and passwords and put them onto the wall. 8 00:00:48,420 --> 00:00:50,200 In fact, it's actually much worse than that. 9 00:00:50,260 --> 00:00:52,440 We actually had to use paper plates back in the days. 10 00:00:52,760 --> 00:00:57,760 Back at the, yeah, back at the Alexis Park days, it was all done using paper plates. 11 00:00:58,180 --> 00:01:00,160 It was all done using paper plates. 12 00:01:02,780 --> 00:01:07,960 So, we got a, yeah, we have a never-ending stream of, like, stuff to give away. 13 00:01:08,540 --> 00:01:17,240 And I guess while we're waiting for Gray Raven for his talk, I got two mices here, courtesy of F5, to give out. 14 00:01:18,260 --> 00:01:21,300 So, I have the dream of a, you got a good question to ask? 15 00:01:21,580 --> 00:01:22,660 A trivia question? 16 00:01:22,760 --> 00:01:28,180 Something that's technical or something like, like something that, of education? 17 00:01:29,120 --> 00:01:30,180 Probably not really, no. 18 00:01:30,380 --> 00:01:30,820 Okay. 19 00:01:31,620 --> 00:01:32,380 Oh, boy. 20 00:01:32,680 --> 00:01:34,400 What does DTLS stand for? 21 00:01:35,120 --> 00:01:35,640 Huh? 22 00:01:36,400 --> 00:01:36,920 DTLS. 23 00:01:37,500 --> 00:01:38,720 Oh, oh, oh. 24 00:01:38,860 --> 00:01:39,540 You ask. 25 00:01:39,740 --> 00:01:40,480 No, you ask. 26 00:01:40,740 --> 00:01:41,680 No, you ask. 27 00:01:41,680 --> 00:01:41,960 Go ahead. 28 00:01:42,360 --> 00:01:43,040 All right. 29 00:01:43,280 --> 00:01:43,800 DTLS. 30 00:01:43,840 --> 00:01:45,260 What does the acronym stand for? 31 00:01:45,740 --> 00:01:46,260 DTLS. 32 00:01:46,340 --> 00:01:47,240 Does anybody know? 33 00:01:47,420 --> 00:01:48,200 What is it? 34 00:01:50,180 --> 00:01:51,220 Oh, yes. 35 00:01:52,780 --> 00:01:53,520 There we go. 36 00:01:54,540 --> 00:01:55,240 Right here. 37 00:01:56,200 --> 00:01:58,800 Diatagram, is it Diatagram Transport Layer? 38 00:02:01,000 --> 00:02:01,480 What? 39 00:02:03,600 --> 00:02:05,480 No, no, it's not Bluetooth Low Energy. 40 00:02:06,620 --> 00:02:09,180 Okay, here's a good one I like to get. 41 00:02:10,200 --> 00:02:11,800 The HTTP protocol. 42 00:02:13,100 --> 00:02:15,260 Hypertext Transfer Protocol. 43 00:02:15,740 --> 00:02:16,120 HTTP. 44 00:02:17,080 --> 00:02:18,280 We all use it, right? 45 00:02:18,500 --> 00:02:21,620 We also know that as a plain text protocol, right? 46 00:02:22,760 --> 00:02:24,320 Can someone explain how it works? 47 00:02:25,120 --> 00:02:27,840 In the shortest form possible. 48 00:02:28,040 --> 00:02:30,540 How does HTTP works? 49 00:02:32,300 --> 00:02:42,060 Okay, I am looking for, what I'm looking for is if you, okay, it is, I'm looking for 50 00:02:42,060 --> 00:02:44,700 two words, fill in the blank, let's start with an R. 51 00:02:47,000 --> 00:02:49,100 Oh, it is request respond. 52 00:02:49,160 --> 00:02:50,000 There we go. 53 00:02:50,380 --> 00:02:51,360 And question. 54 00:02:52,760 --> 00:02:53,200 Client server. 55 00:02:54,560 --> 00:02:55,740 Okay, I'll get one here. 56 00:02:55,820 --> 00:02:56,700 All right, here you go. 57 00:02:57,620 --> 00:03:02,180 Courtesy of, whoa, whoa, whoa, I'm not going to, I'm not going to spill, no, I'm not going 58 00:03:02,180 --> 00:03:05,940 to spill, oh, no, no, I'm not going to spill, no, I'm not going to spill drinks. 59 00:03:06,240 --> 00:03:07,740 We don't want liability here. 60 00:03:08,780 --> 00:03:14,140 Okay, also on the HTTP, we're talking about status codes here. 61 00:03:18,780 --> 00:03:19,180 Okay. 62 00:03:19,180 --> 00:03:19,200 Okay. 63 00:03:21,020 --> 00:03:21,420 Okay. 64 00:03:22,340 --> 00:03:22,740 Okay. 65 00:03:28,600 --> 00:03:30,560 What is the status code? 66 00:03:30,840 --> 00:03:41,020 What is the status code for unauthorized? 67 00:03:43,200 --> 00:03:44,960 Who said 401? 68 00:03:46,100 --> 00:03:51,900 Uh, I've already got something, I know that. 69 00:03:52,760 --> 00:03:53,500 So let's be fair. 70 00:03:53,540 --> 00:03:54,220 Who said 4-1? 71 00:03:56,840 --> 00:03:57,560 Who said it? 72 00:03:58,880 --> 00:03:59,280 Okay. 73 00:03:59,820 --> 00:04:01,000 Way in the back. 74 00:04:02,280 --> 00:04:03,220 Way in the back. 75 00:04:03,260 --> 00:04:03,900 Here we go. 76 00:04:04,740 --> 00:04:05,140 Okay. 77 00:04:08,360 --> 00:04:09,560 So another one. 78 00:04:09,620 --> 00:04:11,280 I just want to decide while we're waiting. 79 00:04:12,420 --> 00:04:13,880 Yeah, we got two minutes left. 80 00:04:14,020 --> 00:04:14,900 We got two minutes left. 81 00:04:15,480 --> 00:04:15,880 Okay. 82 00:04:15,920 --> 00:04:16,280 So. 83 00:04:22,780 --> 00:04:23,780 Oh, we got another one. 84 00:04:23,820 --> 00:04:24,020 Okay. 85 00:04:24,060 --> 00:04:25,460 We got another projector. 86 00:04:34,420 --> 00:04:35,780 You should know this one. 87 00:04:36,660 --> 00:04:39,920 I think everyone have encountered this. 88 00:04:41,020 --> 00:04:45,140 This one is the internal server error. 89 00:04:46,660 --> 00:04:48,120 I heard it in this side. 90 00:04:48,260 --> 00:04:48,480 You ready? 91 00:04:48,640 --> 00:04:49,660 This is going to be a toss-up. 92 00:04:49,720 --> 00:04:49,900 You ready? 93 00:04:51,620 --> 00:04:52,020 Ready? 94 00:04:54,360 --> 00:04:55,280 Thank you. 95 00:04:55,600 --> 00:04:56,060 Okay. 96 00:04:57,360 --> 00:04:58,600 So it is. 97 00:04:58,680 --> 00:05:00,160 We got a minute left. 98 00:05:00,760 --> 00:05:01,920 We have a minute left. 99 00:05:02,220 --> 00:05:02,680 Welcome. 100 00:05:03,080 --> 00:05:06,340 This talk has been a long time coming. 101 00:05:07,180 --> 00:05:14,540 And this gentleman here that we have, he's been a friend of the Wall of Sheep for a little while. 102 00:05:15,860 --> 00:05:21,680 You said at the end of last year that you want to give a presentation. 103 00:05:22,760 --> 00:05:23,760 You said at the Speaker Workshops. 104 00:05:24,940 --> 00:05:27,400 And so here we are. 105 00:05:29,760 --> 00:05:34,520 And of course, this is, I guess, one of those things that, you know, you check off as that bucket list. 106 00:05:36,180 --> 00:05:39,540 And, you know, I was, like, noticing, I was conversing with this gentleman. 107 00:05:39,660 --> 00:05:41,260 I was like, wait, what do you go by? 108 00:05:41,360 --> 00:05:42,440 He's like, no, call me Gray Raven. 109 00:05:43,080 --> 00:05:44,740 And I was like, okay, okay. 110 00:05:44,920 --> 00:05:45,440 All right. 111 00:05:45,560 --> 00:05:45,820 All right. 112 00:05:46,440 --> 00:05:52,680 So I can tell you right now that this is going to be a little bit of a, let's say, a little bit of a, 113 00:05:52,760 --> 00:05:53,800 a little bit of a provocative talk. 114 00:05:54,960 --> 00:05:59,200 And it is my pleasure now to introduce to you Gray Raven. 115 00:06:02,800 --> 00:06:03,320 All right. 116 00:06:04,740 --> 00:06:05,100 Afternoon. 117 00:06:05,120 --> 00:06:06,340 You guys having a good DEF CON? 118 00:06:07,240 --> 00:06:07,600 Good? 119 00:06:07,720 --> 00:06:07,880 Okay. 120 00:06:08,220 --> 00:06:12,100 So I actually can't see anybody when I'm right here, which is kind of cool. 121 00:06:12,320 --> 00:06:16,740 Because now I think I'm just in a room talking to myself, which is usually how I prepare for all of my talks. 122 00:06:17,600 --> 00:06:20,120 Just so no one actually hears the bad approaches. 123 00:06:21,320 --> 00:06:22,740 With that in mind, do you guys mind? 124 00:06:22,740 --> 00:06:23,820 I know it's the Packet Hacking Village. 125 00:06:23,960 --> 00:06:24,520 I know it's DEF CON. 126 00:06:24,680 --> 00:06:25,700 You may not want your picture taken. 127 00:06:26,420 --> 00:06:28,220 So if you don't, just put your head down for the next second. 128 00:06:28,340 --> 00:06:30,920 But no one's going to believe that I was here unless, you know, there's a photo. 129 00:06:31,000 --> 00:06:31,960 That's what I keep hearing on the Internet. 130 00:06:32,340 --> 00:06:34,740 So I'm going to step out of the light, snap a photo of the room. 131 00:06:34,860 --> 00:06:37,500 And if you don't want your face in it, you know, you can either do a thumbs up if you do, 132 00:06:37,580 --> 00:06:38,580 or you can put your head down if you don't. 133 00:06:38,640 --> 00:06:39,600 But anyway, give me about two seconds. 134 00:06:41,260 --> 00:06:43,020 And I will start my talk. 135 00:06:43,840 --> 00:06:44,260 All right. 136 00:06:44,340 --> 00:06:49,000 So if you want to be in the picture, say, geez. 137 00:06:51,400 --> 00:06:51,880 All right. 138 00:06:51,900 --> 00:06:52,340 Here we go. 139 00:06:52,420 --> 00:06:52,580 Ready? 140 00:06:52,960 --> 00:06:54,600 One, two, three. 141 00:06:55,620 --> 00:06:56,020 Sweet. 142 00:06:56,160 --> 00:06:56,680 Thank you. 143 00:06:59,580 --> 00:06:59,980 Okay. 144 00:07:00,080 --> 00:07:06,060 So, you know, I could point out that I did just manipulate everybody in the room to letting me take their picture. 145 00:07:07,080 --> 00:07:08,320 So back to the title. 146 00:07:08,400 --> 00:07:09,500 You are always being manipulated. 147 00:07:09,800 --> 00:07:18,600 So before we kind of get into that, this talk came about because I ended up becoming a father about three and a half years ago. 148 00:07:19,540 --> 00:07:19,940 Yeah. 149 00:07:20,120 --> 00:07:20,740 Very cool. 150 00:07:20,860 --> 00:07:21,940 And so, you know. 151 00:07:23,160 --> 00:07:24,220 So my name's on the slide. 152 00:07:24,320 --> 00:07:26,940 I figured you guys didn't want a three and a half year old running around while I was doing it. 153 00:07:27,120 --> 00:07:28,940 So my daughter's not here. 154 00:07:30,020 --> 00:07:30,820 And that's okay. 155 00:07:33,660 --> 00:07:35,140 But, here, let me do this real quick. 156 00:07:35,200 --> 00:07:35,360 Sorry. 157 00:07:35,700 --> 00:07:37,060 Getting used to the new layout. 158 00:07:39,180 --> 00:07:44,840 I want to say a quick thanks to Tony for loaning me his laptop and mine decided not to work. 159 00:07:45,020 --> 00:07:47,380 So as I said, this is my daughter. 160 00:07:48,080 --> 00:07:50,300 This was one morning we were just playing around with my cat. 161 00:07:50,300 --> 00:07:54,620 And so, this is really a story about her. 162 00:07:54,700 --> 00:07:58,280 So I'm not going to tell you guys about me because I'm, you know, I'm like a lot of people out here. 163 00:07:58,340 --> 00:07:58,960 I'm an MFSEC nerd. 164 00:07:59,100 --> 00:08:00,460 It's really what I do. 165 00:08:00,940 --> 00:08:01,900 You guys already know that. 166 00:08:01,940 --> 00:08:02,920 I could tell you all that stuff. 167 00:08:03,020 --> 00:08:04,320 But so let me tell you about Lena, my daughter. 168 00:08:04,740 --> 00:08:10,760 She is the hero of this story because she's the reason why I can then tell you guys the whole plan. 169 00:08:11,420 --> 00:08:14,920 And what the plan is is that children are natural social engineers. 170 00:08:15,820 --> 00:08:18,620 They have a certain, and I hesitate to say this because I have my daughter. 171 00:08:18,680 --> 00:08:19,360 She's a really cool kid. 172 00:08:19,800 --> 00:08:21,380 But they have a certain moral flexibility. 173 00:08:21,960 --> 00:08:23,240 I think we can all agree about that. 174 00:08:23,580 --> 00:08:24,420 They have goals. 175 00:08:24,560 --> 00:08:25,320 They go for them. 176 00:08:26,040 --> 00:08:32,520 And that's great because, you know, after you kind of give up hope and you realize my own daughter is manipulating me. 177 00:08:32,560 --> 00:08:34,160 What hope do I have with strangers out in the real world? 178 00:08:36,280 --> 00:08:38,300 You can start to focus on how we can use this. 179 00:08:38,380 --> 00:08:39,380 And that's really the important part. 180 00:08:41,200 --> 00:08:44,520 So you guys may, half of you probably are like, yeah, I already know I was being manipulated. 181 00:08:44,760 --> 00:08:45,440 It happens all the time. 182 00:08:45,520 --> 00:08:48,060 The other half, maybe not in this room, but we'll go with that. 183 00:08:48,580 --> 00:08:49,340 You guys may be thinking. 184 00:08:49,360 --> 00:08:51,300 You may be thinking to yourself, why did he say that? 185 00:08:51,560 --> 00:08:54,240 Well, the truth is you're always being manipulated. 186 00:08:54,560 --> 00:08:55,620 Some of it is benign. 187 00:08:55,640 --> 00:08:56,360 Some of it's malicious. 188 00:08:57,120 --> 00:09:01,500 And I didn't really catch a lot of this because, you know, I'm not the smartest guy. 189 00:09:01,620 --> 00:09:05,420 It's just kind of I'm very shocked to be standing up here because there's a lot of smart people that are always speaking at DEF CON. 190 00:09:07,260 --> 00:09:11,280 So I happened to notice that my daughter was manipulating not only me but other people. 191 00:09:11,800 --> 00:09:18,060 And she was doing it in ways that you would, you know, us adults, we pay like thousands of dollars in training to be as good as she is. 192 00:09:19,580 --> 00:09:20,160 It's true. 193 00:09:20,260 --> 00:09:21,960 You know, we have bounds that we got to stand within. 194 00:09:22,060 --> 00:09:22,540 She doesn't. 195 00:09:24,440 --> 00:09:26,780 So most of these interactions, like I said, are not malicious. 196 00:09:28,560 --> 00:09:33,760 And once I realized that these manipulations are happening all the time, it allowed me to kind of think about things. 197 00:09:34,960 --> 00:09:41,060 Now, before we get into like what I actually learned, we got to know all the players that are involved in this new world we're in. 198 00:09:41,600 --> 00:09:43,020 I guess I say new, it's probably old. 199 00:09:43,680 --> 00:09:44,920 Everything that's old is new again. 200 00:09:45,040 --> 00:09:46,360 So let's start with the good guys. 201 00:09:46,620 --> 00:09:49,040 Now, on the left, we have... 202 00:09:49,980 --> 00:09:50,780 Corporations, advertising. 203 00:09:52,420 --> 00:09:54,420 You know, they have billions of dollars. 204 00:09:54,680 --> 00:09:56,260 They want you to buy stuff. 205 00:09:56,540 --> 00:09:58,440 They spend billions of dollars so that you will buy stuff. 206 00:09:58,760 --> 00:09:59,660 It seems pretty straightforward. 207 00:10:00,220 --> 00:10:03,780 And I put a question mark because really and truly, good guys? 208 00:10:04,160 --> 00:10:04,920 Maybe, maybe not. 209 00:10:05,600 --> 00:10:06,940 And then we have friends and family. 210 00:10:06,960 --> 00:10:11,060 As you can tell from the picture, my daughter is winning at the moment because I have no idea where I am. 211 00:10:11,480 --> 00:10:15,180 And I really have no idea except that she wanted me to go that direction that she's pointing. 212 00:10:15,340 --> 00:10:17,560 And I did because I was beat down. 213 00:10:18,220 --> 00:10:19,340 And on the right, we have... 214 00:10:20,140 --> 00:10:20,500 Pets. 215 00:10:20,680 --> 00:10:27,100 Now, I include pets because really and truly, if you have a pet, you've taken in a small, strange animal. 216 00:10:27,520 --> 00:10:30,200 You have fed it, cared for it, you love it. 217 00:10:30,540 --> 00:10:34,380 And, you know, yeah, it's soft and it's friendly and all that stuff. 218 00:10:34,500 --> 00:10:37,900 But I mean, really, with cats, it's kind of a toss-up, right? 219 00:10:37,920 --> 00:10:38,540 They may love you. 220 00:10:38,600 --> 00:10:39,280 They may not. 221 00:10:40,180 --> 00:10:40,720 They're cats. 222 00:10:40,940 --> 00:10:46,060 And I will point out that this does meet the requirement for any InfoSec talk of having at least one cat picture in the video. 223 00:10:47,660 --> 00:10:48,780 You always got to have one. 224 00:10:48,780 --> 00:10:50,080 I now have mine. 225 00:10:50,620 --> 00:10:53,080 And I would have more in the talk. 226 00:10:53,160 --> 00:10:57,680 I always hate to disappoint some people who are cat lovers in the room, but I could not find any more cat pictures on the Internet. 227 00:10:58,140 --> 00:10:58,900 It was weird. 228 00:10:58,960 --> 00:10:59,860 They just weren't there that day. 229 00:11:00,960 --> 00:11:01,880 I don't know what happened. 230 00:11:03,420 --> 00:11:05,040 So then there are the bad guys. 231 00:11:05,220 --> 00:11:10,200 And let me point out that when you stumble across a picture of a pirate with a butter knife attacking a computer, 232 00:11:10,360 --> 00:11:13,920 you add it to the next presentation that you have because it's a... 233 00:11:13,920 --> 00:11:15,440 When do you ever see this in real life? 234 00:11:16,200 --> 00:11:17,120 So the bad guys. 235 00:11:17,260 --> 00:11:18,760 Let's go through the list of the usual stuff. 236 00:11:18,760 --> 00:11:18,980 We have the usual suspects. 237 00:11:19,200 --> 00:11:21,800 We have the obvious con artist and scammers. 238 00:11:22,640 --> 00:11:26,300 We have, you know, the phishing and vishing attacks that we're all so familiar with. 239 00:11:26,640 --> 00:11:31,880 And I do include watering hole attacks in this kind of approach because they're taking advantage of something that you trust, 240 00:11:32,020 --> 00:11:34,660 a well-known site, and then they're injecting something bad into it. 241 00:11:34,820 --> 00:11:37,060 So still similar. 242 00:11:37,220 --> 00:11:39,420 And then coming back to my favorite, advertising. 243 00:11:39,720 --> 00:11:43,280 Because once again, really, are they the good guys or the bad guys? 244 00:11:44,860 --> 00:11:46,600 So we know who our good guys are. 245 00:11:47,140 --> 00:11:48,500 We know who our bad guys are. 246 00:11:48,760 --> 00:11:53,360 Now, to explain a little bit about what we're going to get into, the good guys are our training partners. 247 00:11:54,060 --> 00:11:58,720 They're the ones who create kind of a low-risk environment where we can realize what's happening, 248 00:11:58,780 --> 00:12:02,220 the dynamics of a social engineering attack, kind of in a safe environment. 249 00:12:02,700 --> 00:12:08,960 So the bad guys are the ones who want to steal our money, you know, give us, you know, get away with lots of stuff, 250 00:12:09,060 --> 00:12:11,280 get us to do things we're not supposed to, compromise our companies. 251 00:12:12,400 --> 00:12:14,000 So they're what we're training for. 252 00:12:17,000 --> 00:12:20,440 So let's start with the thing that is the basis of all social engineering attacks, trust. 253 00:12:21,220 --> 00:12:23,360 So once again, I pointed out, you guys let me take a picture of you. 254 00:12:23,660 --> 00:12:26,500 And you guys also have a little bit of trust in me because you're sitting here. 255 00:12:27,300 --> 00:12:29,940 If someone left the room, since I can't see that, cool. 256 00:12:31,140 --> 00:12:32,760 You know, you may have learned something. 257 00:12:34,560 --> 00:12:42,800 But, you know, when you look at the case with my daughter, she has, I mean, I have a ton of trust in her because I've known her since the moment she was born. 258 00:12:43,660 --> 00:12:43,980 I've known her since the moment she was born. 259 00:12:44,000 --> 00:12:46,160 And so this both works to her advantage and disadvantage. 260 00:12:46,480 --> 00:12:49,440 But with any social engineering attack, you have to build trust with the target. 261 00:12:49,560 --> 00:12:52,720 Or, you know, in the case the attacker has to build trust with me because I'm trying to defend. 262 00:12:53,540 --> 00:12:55,000 So let's look at my daughter's example. 263 00:12:56,320 --> 00:12:57,480 Now, here she is. 264 00:12:58,640 --> 00:12:59,360 She's adorable. 265 00:13:00,200 --> 00:13:03,040 Half the room probably wants to give her a cookie right now just from the picture. 266 00:13:03,780 --> 00:13:06,500 And this is a question that I get asked almost on a daily basis. 267 00:13:07,360 --> 00:13:08,960 Papa, are you happy with me? 268 00:13:10,400 --> 00:13:13,360 And unless she's done something immediately before asking that question, 269 00:13:13,360 --> 00:13:17,360 that has made me frustrated or angry, my answer is, of course, I'm happy with you. 270 00:13:18,300 --> 00:13:19,240 So this is the thing. 271 00:13:19,360 --> 00:13:20,600 She's already started with the ask. 272 00:13:20,840 --> 00:13:22,420 You know, Papa, are you happy with me? 273 00:13:22,500 --> 00:13:23,300 She's building that trust. 274 00:13:23,380 --> 00:13:25,240 She's taking advantage of the rapport between us. 275 00:13:25,740 --> 00:13:31,160 And then I respond as a parent favorably because I want my daughter to grow up, you know, healthy and psychologically stable and all that. 276 00:13:31,560 --> 00:13:33,240 And so I say, of course, I'm happy with you. 277 00:13:33,660 --> 00:13:35,120 And then comes the tail. 278 00:13:35,360 --> 00:13:36,380 She doesn't ask this. 279 00:13:36,420 --> 00:13:37,120 She tells me this. 280 00:13:37,800 --> 00:13:39,240 Then I will have chocolate for dinner. 281 00:13:40,960 --> 00:13:43,340 So as you guys can see, this is not overly complicated. 282 00:13:43,360 --> 00:13:43,700 This is a complex attack. 283 00:13:43,900 --> 00:13:45,880 I mean, she's 3 1⁄2, but it will get better. 284 00:13:45,960 --> 00:13:46,300 Trust me. 285 00:13:47,320 --> 00:13:51,960 But she's taking advantage of a very basic principle and something that, you know, if you're not in the moment 286 00:13:51,960 --> 00:13:56,240 and it's somebody that you do trust or someone that's built trust with you, you could potentially fall for it, 287 00:13:56,280 --> 00:13:59,840 especially when it's not quite as, well, let's just say my daughter lacks subtlety at times. 288 00:14:00,520 --> 00:14:01,620 So this is what she does. 289 00:14:01,740 --> 00:14:04,360 Now let's see how we can defend against this basic attack of trust. 290 00:14:06,020 --> 00:14:07,720 You guys are pretty familiar with this be cautious. 291 00:14:08,900 --> 00:14:09,840 We are at DEF CON. 292 00:14:10,420 --> 00:14:11,620 We are pretty much cautious. 293 00:14:11,620 --> 00:14:13,820 I want to say pretty much in our nature. 294 00:14:14,800 --> 00:14:16,740 So how can being cautious help us? 295 00:14:16,900 --> 00:14:19,340 Well, it makes us slow down a little bit, you know. 296 00:14:21,520 --> 00:14:22,780 I'm trying to think of the best way to say this. 297 00:14:22,860 --> 00:14:28,540 So like trust is the foundational beginning of any attack, being cautious is the foundational defense. 298 00:14:30,200 --> 00:14:32,640 And when we are cautious, we slow down and we think. 299 00:14:32,820 --> 00:14:35,960 When we can think, we evaluate the situation and we really see what's going on. 300 00:14:36,440 --> 00:14:40,180 So you'll see that caution is kind of like the thing that follows through all of the basic defenses. 301 00:14:41,860 --> 00:14:44,460 Next defense, we all are familiar with this phrase, trust but verify. 302 00:14:44,680 --> 00:14:48,560 I used to work as a software engineer until about three weeks ago, and then I changed roles. 303 00:14:49,180 --> 00:14:52,120 And when I was working through code, you know, someone would say, oh, this is how it works. 304 00:14:52,700 --> 00:14:54,240 And you're like, okay, you're a good programmer. 305 00:14:54,280 --> 00:14:54,820 I trust you. 306 00:14:55,220 --> 00:14:57,960 But I'm just going to go look at it to make sure that's actually how it works. 307 00:14:58,680 --> 00:15:00,660 And so this is what we need to do with other people. 308 00:15:01,160 --> 00:15:02,140 We trust but verify. 309 00:15:02,440 --> 00:15:10,080 And I want to put this in here because I don't want you guys to think that in trying to defend yourself against social engineering attacks, you need to be distrustful. 310 00:15:10,880 --> 00:15:11,600 I trust myself. 311 00:15:11,600 --> 00:15:11,740 I trust my daughter. 312 00:15:12,340 --> 00:15:13,600 I trust the people around me. 313 00:15:13,680 --> 00:15:14,740 I trust you guys in the room. 314 00:15:14,840 --> 00:15:15,540 You all seem pretty cool. 315 00:15:16,780 --> 00:15:17,960 And so it's instinctive. 316 00:15:18,060 --> 00:15:19,940 You know, trust is what helped us as humans survive. 317 00:15:20,140 --> 00:15:21,160 It's what helped us build civilizations. 318 00:15:21,780 --> 00:15:22,700 So we have to have it. 319 00:15:22,760 --> 00:15:24,360 But we don't have to just trust blindly. 320 00:15:24,460 --> 00:15:25,960 We can actually, you know, verify the things. 321 00:15:26,680 --> 00:15:32,680 So we verify by going through independent sources. 322 00:15:32,940 --> 00:15:39,260 So in the case of my daughter, returning to her because she's our good example, I usually go to my wife for independent verification. 323 00:15:40,400 --> 00:15:41,580 Because, I mean, we can all admit it. 324 00:15:41,600 --> 00:15:43,180 My wife is the one who actually knows what's going on. 325 00:15:43,240 --> 00:15:48,020 I'm just here and trying to get through day by day, usually with the help of a lot of coffee. 326 00:15:49,820 --> 00:15:53,720 So when my daughter asks me for something and I'm not quite sure, I go to my wife and I'm like, hey, do we need to do this? 327 00:15:53,800 --> 00:15:54,700 And she usually says, no. 328 00:15:55,180 --> 00:15:56,000 What are you, an idiot? 329 00:15:56,160 --> 00:15:57,740 And I say, good call. 330 00:15:57,920 --> 00:15:59,200 And then I go back and tell my daughter, no. 331 00:16:00,720 --> 00:16:02,980 So now we've kind of got this basic example. 332 00:16:03,080 --> 00:16:04,380 You guys kind of see where this is going. 333 00:16:04,440 --> 00:16:05,640 Now we're going to look at a real world example. 334 00:16:06,720 --> 00:16:07,640 And it's my favorite. 335 00:16:08,040 --> 00:16:08,660 This is Dan. 336 00:16:08,940 --> 00:16:09,600 He's from IT. 337 00:16:09,700 --> 00:16:10,320 He's here to help. 338 00:16:11,760 --> 00:16:15,800 And so Dan has actually taken advantage of two things that we know and trust. 339 00:16:16,160 --> 00:16:24,420 So he's taken advantage of trust in the fact that if you are probably not one of us or not in IT in general, you don't really trust IT a lot. 340 00:16:24,760 --> 00:16:30,820 There's always that hesitation because when they say they're there to help, it's usually to stop you from doing something that would be cool and awesome, and they just don't realize that yet. 341 00:16:35,340 --> 00:16:38,340 So there's also the actual pushing of authority. 342 00:16:38,560 --> 00:16:41,580 And most companies, IT has a certain amount of authority, especially over in the United States. 343 00:16:41,580 --> 00:16:44,040 And it works in systems and keeping everybody safe and all of that. 344 00:16:44,240 --> 00:16:46,540 So Dan is applying these two things. 345 00:16:46,680 --> 00:16:48,260 So he's going to build trust with our target. 346 00:16:49,480 --> 00:16:53,340 He's going to say, okay, well, I need you to install some updates. 347 00:16:53,420 --> 00:16:56,740 I want to make sure that your system is fully updated because we have reason to believe 348 00:16:56,740 --> 00:16:58,780 that we're under attack because that's happening all the time. 349 00:16:59,580 --> 00:17:05,860 And then if Dan's done, comes up with a good approach, people will say, well, Dan, I appreciate 350 00:17:05,860 --> 00:17:06,120 that. 351 00:17:06,140 --> 00:17:07,240 My computer is up to date. 352 00:17:07,260 --> 00:17:08,440 I'm pretty on top of that. 353 00:17:08,540 --> 00:17:11,480 And Dan will say, excellent, because he wants to continue to build this report. 354 00:17:12,200 --> 00:17:15,500 And then he'll say, I just need you to verify through this website X. 355 00:17:15,700 --> 00:17:17,940 We'll call it X because we know there's probably some other website. 356 00:17:18,900 --> 00:17:23,740 And what you'll see is that this is a little bit more complicated because Dan is actually 357 00:17:23,740 --> 00:17:24,500 applying a couple of things. 358 00:17:24,620 --> 00:17:26,120 He's trying to create a little bit of an urgency. 359 00:17:26,260 --> 00:17:29,560 He's trying to get the person to do something not quite as straightforward as my daughter 360 00:17:29,560 --> 00:17:31,280 just saying, I'm going to have chocolate now. 361 00:17:32,720 --> 00:17:34,720 So how do we get around this? 362 00:17:34,820 --> 00:17:36,000 Well, we first are cautious. 363 00:17:36,240 --> 00:17:37,000 We are on the phone. 364 00:17:37,100 --> 00:17:38,040 We don't really know who Dan is. 365 00:17:39,100 --> 00:17:40,200 He may be from IT. 366 00:17:40,200 --> 00:17:42,200 I work for a rather large company right now. 367 00:17:42,700 --> 00:17:45,180 So I have no idea who any of the IT people are in my company. 368 00:17:45,840 --> 00:17:46,960 So there could be a Dan. 369 00:17:47,080 --> 00:17:47,760 Probably is a Dan. 370 00:17:48,460 --> 00:17:49,320 But I don't know that. 371 00:17:49,600 --> 00:17:51,020 So then I have to trust but verify. 372 00:17:51,260 --> 00:17:52,780 So the way you trust or verify, it's pretty easy. 373 00:17:52,880 --> 00:17:54,340 You just say, hey, Dan, I appreciate that. 374 00:17:54,960 --> 00:17:56,720 I'm in a meeting right now, or I'm really busy. 375 00:17:58,260 --> 00:18:01,020 Let me just call back later, and I'll make sure I go to the website and verify. 376 00:18:01,160 --> 00:18:02,080 So it could be legitimate. 377 00:18:02,180 --> 00:18:02,720 It could not be. 378 00:18:02,980 --> 00:18:03,880 We kind of get through it. 379 00:18:03,900 --> 00:18:05,120 We're using the tactics that we saw. 380 00:18:06,500 --> 00:18:09,020 So the next level my daughter developed was this. 381 00:18:09,240 --> 00:18:10,180 So for those of you who don't know this, I'm going to give you a little bit of a 382 00:18:10,200 --> 00:18:12,040 review, who may not be familiar with the term reciprocity. 383 00:18:12,560 --> 00:18:16,480 It's creating an imbalance, because naturally, as humans, we want to recreate this balance. 384 00:18:16,660 --> 00:18:19,620 So you'll give somebody something to kind of make them beholden to you. 385 00:18:21,520 --> 00:18:25,220 And when my daughter learned this, it was actually pretty cool, because it showed me 386 00:18:25,220 --> 00:18:29,220 that she's evolving in her attack strategy, which, for a crazy person like me, that's 387 00:18:29,220 --> 00:18:29,480 awesome. 388 00:18:29,580 --> 00:18:30,460 I kind of encourage this. 389 00:18:30,580 --> 00:18:31,480 It's like, yes, do this. 390 00:18:31,580 --> 00:18:32,120 Keep attacking. 391 00:18:33,960 --> 00:18:35,500 And that's the great thing about children. 392 00:18:35,740 --> 00:18:36,520 They evolve quickly. 393 00:18:36,680 --> 00:18:37,280 They adapt quickly. 394 00:18:37,460 --> 00:18:39,380 And so it keeps you on your toes when you're training against them. 395 00:18:40,200 --> 00:18:40,800 And let's be fair. 396 00:18:40,860 --> 00:18:41,660 My daughter is the trainer. 397 00:18:41,740 --> 00:18:42,940 I am just the student in this case. 398 00:18:43,060 --> 00:18:47,940 So if anyone has children, you know that they don't clean up anything. 399 00:18:48,660 --> 00:18:51,140 We had a clean house, and now there's toys everywhere. 400 00:18:51,980 --> 00:18:55,260 I'm not sure how many toys there are in the house, because I step on them like every 401 00:18:55,260 --> 00:18:55,700 two footsteps. 402 00:18:56,280 --> 00:18:59,640 So one day, my daughter says, Papa, look how good I'm cleaning. 403 00:19:00,380 --> 00:19:03,560 And she actually had found a vacuum cleaner, drug it out, and started pushing things around 404 00:19:03,560 --> 00:19:06,080 with the vacuum cleaner, as you can see. 405 00:19:06,640 --> 00:19:09,600 And so the opening is to give something unexpected to the parent. 406 00:19:10,060 --> 00:19:11,500 And this is a great approach, right? 407 00:19:12,040 --> 00:19:15,380 We want to give something unexpected to the parent so that they will feel beholden to 408 00:19:16,300 --> 00:19:17,480 do something for us later on. 409 00:19:18,480 --> 00:19:19,880 And then she reinforces that. 410 00:19:19,940 --> 00:19:21,700 And she said, look how clean I made it. 411 00:19:22,080 --> 00:19:23,260 I did a good job, right? 412 00:19:23,620 --> 00:19:25,860 This is great, because now she's using that trust again, right? 413 00:19:26,380 --> 00:19:27,880 And so I should clarify. 414 00:19:28,200 --> 00:19:29,080 I'm not making these up. 415 00:19:29,140 --> 00:19:30,760 I actually wrote these down when I had the idea for the talk. 416 00:19:30,820 --> 00:19:31,700 These all actually happened. 417 00:19:31,860 --> 00:19:35,840 And I wrote down word for word what had happened, just so you guys can understand that this 418 00:19:35,840 --> 00:19:37,780 is like real world scenarios, even though they're low risk. 419 00:19:37,780 --> 00:19:39,640 And then she came up with the ask. 420 00:19:40,160 --> 00:19:42,860 Since I did a good job, can I have candy? 421 00:19:44,100 --> 00:19:44,420 Hmm. 422 00:19:44,620 --> 00:19:47,180 Well, that's a pretty small ask for what, you know, you cleaned up stuff. 423 00:19:47,280 --> 00:19:47,580 Okay. 424 00:19:49,880 --> 00:19:52,260 So it's pretty easy for that request from my daughter. 425 00:19:52,600 --> 00:19:55,700 It's more of a mental exercise of seeing what she did and understanding the attack. 426 00:19:55,980 --> 00:20:00,740 So what helps us with reciprocity is the first defense of do I know this person, right? 427 00:20:02,140 --> 00:20:04,560 Well, with Lena, once again, I've known her since the moment she was born. 428 00:20:04,920 --> 00:20:07,760 This actually is a disadvantage for her in this case, because I know her. 429 00:20:07,780 --> 00:20:08,200 I know her motivations. 430 00:20:08,540 --> 00:20:11,600 I know all of the attacks she's going to come with me at, or come at me with. 431 00:20:14,040 --> 00:20:16,940 However, with most people who are going to try this attack, you don't know them that 432 00:20:16,940 --> 00:20:18,600 well, or you may know them just a little bit. 433 00:20:18,760 --> 00:20:19,960 So how well can you trust this person? 434 00:20:20,480 --> 00:20:21,900 Once again, it makes you want to be cautious. 435 00:20:22,200 --> 00:20:24,100 You know, don't just accept that they're giving you something that's good. 436 00:20:24,380 --> 00:20:24,940 Keep going. 437 00:20:28,140 --> 00:20:34,860 So after you kind of analyze how well you know the person, you want to move on to looking 438 00:20:34,860 --> 00:20:36,160 at the actual situation that you're in. 439 00:20:36,840 --> 00:20:38,160 Is it more give than take? 440 00:20:38,340 --> 00:20:42,300 And so when you add urgency to this, it's a little hard to do this. 441 00:20:42,300 --> 00:20:44,580 You know, someone who's going to come with you with a repressive prosody attack is not 442 00:20:44,580 --> 00:20:46,960 going to say, you know, I want you to think about this. 443 00:20:47,160 --> 00:20:48,240 You know, give it a day. 444 00:20:48,500 --> 00:20:49,340 I'll come back tomorrow. 445 00:20:49,640 --> 00:20:51,700 They're going to try to like get you to move right now. 446 00:20:51,780 --> 00:20:56,880 And that's to interrupt this part of your brain that can actually evaluate, you know, 447 00:20:58,200 --> 00:20:58,880 these approaches. 448 00:20:59,040 --> 00:21:02,880 So instinctively, we're going to try to seek this fairness and balance in all of our, 449 00:21:02,900 --> 00:21:04,260 you know, interactions. 450 00:21:05,500 --> 00:21:08,260 And when we like somebody, we kind of want to give in to that. 451 00:21:08,360 --> 00:21:10,760 So, you know, if they've built a good bit of trust, they've built, you know, rapport 452 00:21:10,760 --> 00:21:12,220 with us, we're going to kind of want to give in to that. 453 00:21:12,820 --> 00:21:14,360 And we want to make this balanced. 454 00:21:14,600 --> 00:21:17,780 And the key is that the reason why this is very important to practice is that we're 455 00:21:17,780 --> 00:21:20,140 not very good at judging that in the situation. 456 00:21:20,360 --> 00:21:21,960 We really need time to analyze it. 457 00:21:23,520 --> 00:21:23,980 So, yeah. 458 00:21:24,540 --> 00:21:28,920 And this is my actual, my favorite real-world example because we're all so familiar with 459 00:21:28,920 --> 00:21:31,180 it and it brings me back to my favorite people in the world, advertisers. 460 00:21:33,320 --> 00:21:33,960 So everybody. 461 00:21:33,960 --> 00:21:35,180 Some people may not recognize this. 462 00:21:35,220 --> 00:21:35,780 This is Billy Mays. 463 00:21:35,840 --> 00:21:37,260 You may know OxyClean, the product. 464 00:21:38,360 --> 00:21:41,160 And you obviously know that phrase, but wait, there's more. 465 00:21:41,380 --> 00:21:42,560 So let's go through the attack. 466 00:21:42,860 --> 00:21:43,460 There's the opening. 467 00:21:44,300 --> 00:21:45,760 You know, I don't know about you guys. 468 00:21:45,840 --> 00:21:46,800 I stay up pretty late at night. 469 00:21:46,860 --> 00:21:50,860 And if the TV is on, granted, there's probably not that many infomercials anymore if you're, 470 00:21:50,860 --> 00:21:52,300 you know, doing Hulu or Netflix or whatnot. 471 00:21:52,440 --> 00:21:55,420 But you would see a TV commercial at like 3 o'clock in the morning. 472 00:21:56,300 --> 00:21:58,860 And you would think that it was part of a program because it was like, you know, all 473 00:21:58,860 --> 00:21:59,740 kinds of things were happening. 474 00:22:01,080 --> 00:22:02,000 And the opening. 475 00:22:02,140 --> 00:22:03,020 They would show you a product. 476 00:22:03,020 --> 00:22:05,600 And it's like, do you need one pound of OxyClean? 477 00:22:06,380 --> 00:22:06,700 No. 478 00:22:06,900 --> 00:22:07,680 No, I do not. 479 00:22:08,360 --> 00:22:09,160 Well, that's not true. 480 00:22:09,240 --> 00:22:09,740 I'm a home brewer. 481 00:22:09,820 --> 00:22:10,320 So, yes. 482 00:22:10,380 --> 00:22:10,840 Yes, I do. 483 00:22:10,940 --> 00:22:13,300 But I don't want to pay all the shipping and handling for you guys. 484 00:22:15,400 --> 00:22:17,200 So they're going to give me something unexpected, right? 485 00:22:17,220 --> 00:22:17,740 I'm watching this. 486 00:22:17,780 --> 00:22:18,160 I'm tired. 487 00:22:18,500 --> 00:22:20,780 And then they're going to say, but wait, there's more. 488 00:22:21,240 --> 00:22:24,520 If you call now, we'll give you three pounds of OxyClean. 489 00:22:24,700 --> 00:22:25,380 Oh, hang on. 490 00:22:25,620 --> 00:22:28,780 As a home brewer, I really want three pounds of OxyClean because I want to make some more 491 00:22:28,780 --> 00:22:28,940 beer. 492 00:22:30,240 --> 00:22:31,900 And that seems like a good deal. 493 00:22:31,980 --> 00:22:32,960 But, you know, I'm still not sold. 494 00:22:32,960 --> 00:22:34,280 So then they're going to reinforce it. 495 00:22:34,420 --> 00:22:35,840 You won't find a deal this good. 496 00:22:35,980 --> 00:22:39,800 Once again, 3 o'clock in the morning, I may not find a deal this good. 497 00:22:40,360 --> 00:22:41,800 And I only have five minutes to act. 498 00:22:41,940 --> 00:22:43,800 So let me think about that. 499 00:22:44,740 --> 00:22:46,220 Yeah, I'm probably going to buy the OxyClean. 500 00:22:47,440 --> 00:22:48,700 And then comes the ask. 501 00:22:48,960 --> 00:22:51,520 You know, right after they've told you how good of a deal it is, they're going to say, 502 00:22:51,580 --> 00:22:53,380 can you afford to pass up this offer? 503 00:22:54,240 --> 00:22:55,440 Well, as a home brewer, probably not. 504 00:22:56,460 --> 00:22:58,760 I really want to have lots of beer around me. 505 00:22:59,040 --> 00:23:00,600 And I like it when I make it. 506 00:23:00,640 --> 00:23:02,940 So I may fall for this one more than I should. 507 00:23:02,960 --> 00:23:04,360 I'm not going to lie. 508 00:23:05,300 --> 00:23:07,100 But that's, you know, we see the same attack. 509 00:23:07,280 --> 00:23:08,340 It's the same thing my daughter did. 510 00:23:08,440 --> 00:23:09,860 You know, they are going to give you something unexpected. 511 00:23:10,140 --> 00:23:12,560 They're going to kind of balance it out because they only want you to pay shipping and handling. 512 00:23:13,960 --> 00:23:14,880 You know, decent deal. 513 00:23:16,320 --> 00:23:22,040 So this leads us to the last part of our three kind of primary attacks. 514 00:23:22,280 --> 00:23:26,400 Now, if we began with foundation of trust, right, and then we start creating balances, 515 00:23:26,560 --> 00:23:29,480 we want to finish with this linchpin of any kind of good social engineering attack, 516 00:23:29,540 --> 00:23:31,000 which is we want to create urgency, right? 517 00:23:31,420 --> 00:23:32,940 And so I know what you guys are probably thinking. 518 00:23:32,960 --> 00:23:36,920 How can a small child create urgency in a situation? 519 00:23:37,200 --> 00:23:38,540 I mean, I'm the adult. 520 00:23:39,140 --> 00:23:41,440 I kind of dictate the pace of everything, right? 521 00:23:41,860 --> 00:23:46,980 Well, children, especially when they're infants and a little bit larger, have a secret weapon. 522 00:23:47,960 --> 00:23:51,980 It is biologically wired into your brain that the pitch that a kid makes when they're crying 523 00:23:53,100 --> 00:23:56,260 goes to a part of your brain that makes you want to react without thinking. 524 00:23:56,400 --> 00:23:56,960 It's instinctive. 525 00:23:57,560 --> 00:23:58,560 It's built in and biological. 526 00:23:58,640 --> 00:24:02,820 So to explain this story, because obviously there's not a lot of text up here, 527 00:24:02,960 --> 00:24:06,460 my daughter had very long hair, and then she wanted to get it cut. 528 00:24:06,640 --> 00:24:10,000 And so we cut it, and she asked the stylist if she could put it into an Elsa braid. 529 00:24:10,160 --> 00:24:15,240 Now, I know there may be some people out here who have not seen the movie Frozen 9,000 times like I have. 530 00:24:15,840 --> 00:24:19,460 Elsa is one of the main characters, and she has this nice braid that comes down the side of her head. 531 00:24:19,580 --> 00:24:24,320 So my daughter loves having an Elsa braid because she is a small child who's watched Frozen 9,000 times. 532 00:24:25,180 --> 00:24:28,000 And when she was told that she couldn't have it, she cried, Papa. 533 00:24:28,240 --> 00:24:31,020 And then there was just a wail of noise after that. 534 00:24:31,080 --> 00:24:32,320 I really had no idea what was going on. 535 00:24:32,960 --> 00:24:33,880 And as a parent, I rushed over. 536 00:24:34,020 --> 00:24:34,540 What can I do? 537 00:24:34,720 --> 00:24:35,480 How can I help? 538 00:24:35,600 --> 00:24:37,440 And so urgency. 539 00:24:37,780 --> 00:24:39,800 Force the parent into immediate action, right? 540 00:24:40,360 --> 00:24:44,520 And then after you force the parent into immediate action and I get her to calm down, 541 00:24:44,660 --> 00:24:48,260 you want to comfort the parent because you want to reinforce that rapport and the trust, right? 542 00:24:49,880 --> 00:24:50,920 So she comforts me. 543 00:24:51,000 --> 00:24:51,640 It's okay, Papa. 544 00:24:51,880 --> 00:24:52,400 It's okay. 545 00:24:54,380 --> 00:24:56,140 The hand gestures are there as well. 546 00:24:56,200 --> 00:24:56,880 She has little tiny hands. 547 00:24:56,940 --> 00:24:57,340 She puts them out. 548 00:24:58,060 --> 00:25:00,480 And then I don't even know what she wanted. 549 00:25:00,640 --> 00:25:01,700 But then she said, 550 00:25:01,700 --> 00:25:03,660 Can you get it for me, please? 551 00:25:04,400 --> 00:25:07,180 So once again, she has, you know, she's calmed down. 552 00:25:07,380 --> 00:25:08,820 And then she's asked for something. 553 00:25:08,920 --> 00:25:13,120 Now the urgency is there because if I say no at this point, she's in a very fragile emotional state, right? 554 00:25:13,920 --> 00:25:15,220 She's going to start crying again. 555 00:25:15,520 --> 00:25:16,640 This is what's going to happen. 556 00:25:16,700 --> 00:25:19,820 Everyone who is out there, if you've been around small children, you know this. 557 00:25:20,360 --> 00:25:22,360 They cry for really no reason at all at times. 558 00:25:25,140 --> 00:25:28,120 So this leads us to lesson one in the urgency situation. 559 00:25:28,720 --> 00:25:29,820 Follow the process. 560 00:25:31,160 --> 00:25:33,600 Now you may be thinking, what process? 561 00:25:33,900 --> 00:25:34,260 Okay, good. 562 00:25:34,400 --> 00:25:35,200 That's a good first step. 563 00:25:36,140 --> 00:25:37,100 Develop a process. 564 00:25:37,900 --> 00:25:40,600 And then once you've developed the process, train in the process. 565 00:25:40,940 --> 00:25:47,640 Make sure you can say the process in your sleep, especially when dealing with small children and malicious attackers. 566 00:25:48,420 --> 00:25:50,860 And then you always want to follow the process, right? 567 00:25:51,000 --> 00:25:54,760 Once you've got a process in place, you've trained with it, you're familiar with it, you want to follow it all the time. 568 00:25:54,900 --> 00:25:56,320 Do not deviate from the process. 569 00:25:56,700 --> 00:25:57,880 For there lies dragons. 570 00:25:59,420 --> 00:26:00,160 Lesson number two. 571 00:26:00,220 --> 00:26:02,880 Remember lesson number one about always following the process? 572 00:26:03,260 --> 00:26:04,820 Seriously, always follow the process. 573 00:26:06,380 --> 00:26:09,760 If you don't follow the process even in one instance, that's it. 574 00:26:09,960 --> 00:26:11,780 You know, attackers only need one chance. 575 00:26:12,980 --> 00:26:13,600 That's all they need. 576 00:26:15,100 --> 00:26:17,660 So we have developed our process. 577 00:26:17,820 --> 00:26:18,740 We are following our process. 578 00:26:18,900 --> 00:26:21,220 Let's take a look at our real world example. 579 00:26:22,020 --> 00:26:22,980 All right. 580 00:26:24,060 --> 00:26:26,360 So a lot of people in the room laugh at this. 581 00:26:26,860 --> 00:26:29,000 So I'm going to kind of tell it from a different point of view, right? 582 00:26:29,660 --> 00:26:32,660 And to be honest, I have a psychology major. 583 00:26:32,760 --> 00:26:37,740 I could do an entire talk just on the most awesome things that are in this actual attack, this pop-up. 584 00:26:37,860 --> 00:26:47,160 So there are a lot of things that draw you to the areas they want to and a lot of ways to get you to do the things they want to, especially, and this is the important part. 585 00:26:47,560 --> 00:26:54,440 The people who are going to see this and not immediately go, yeah, right, are really 90% of the companies we work with, right? 586 00:26:54,560 --> 00:26:55,620 They're the marketing people. 587 00:26:56,160 --> 00:26:59,740 They are the normal, non-tech power users. 588 00:27:00,540 --> 00:27:08,280 And when they see this, the first thought that goes through their head if they don't have a process is, oh, my God, I'm the person who just got our company owned. 589 00:27:09,440 --> 00:27:11,060 So they think they may have done something bad. 590 00:27:11,220 --> 00:27:13,120 Now, they may have actually been doing something bad. 591 00:27:13,220 --> 00:27:14,360 We'll save that for another talk. 592 00:27:15,300 --> 00:27:17,900 So the first part I want to point out is everything is in red. 593 00:27:18,120 --> 00:27:20,000 And that's, you know, why do we stop at stop signs? 594 00:27:20,140 --> 00:27:21,820 Because we're trained that red means we stop, right? 595 00:27:21,900 --> 00:27:25,060 My daughter at one, when she first learned to talk, knew that red light meant stop. 596 00:27:26,060 --> 00:27:27,240 Once again, children are amazing. 597 00:27:27,620 --> 00:27:30,980 And so what you want to do is you want to force the target into an immediate action. 598 00:27:31,040 --> 00:27:34,320 They create the urgency because the pop-up comes up on top of whatever you were doing, right? 599 00:27:34,460 --> 00:27:36,400 So you get scared if you're one of these people. 600 00:27:37,020 --> 00:27:39,680 And then they draw you to the things that they want you to see. 601 00:27:39,760 --> 00:27:43,460 The virus is all capitalized and underlined whereas everything else is lowercase. 602 00:27:44,240 --> 00:27:47,280 Credit card, account, all of these things are underlined. 603 00:27:47,360 --> 00:27:50,140 And, in fact, what I love about this is it doesn't even say that your computer has a virus. 604 00:27:50,220 --> 00:27:51,640 It just says it may have a virus. 605 00:27:52,800 --> 00:27:54,000 But you don't really pay attention to that. 606 00:27:54,040 --> 00:27:54,620 You see virus. 607 00:27:54,620 --> 00:27:55,840 And you see a phone number. 608 00:27:55,960 --> 00:27:58,220 And then comes the best part of this attack. 609 00:27:59,120 --> 00:28:01,720 We detected and we can fix the issue. 610 00:28:02,160 --> 00:28:03,340 They've reinforced it. 611 00:28:03,460 --> 00:28:04,800 They're comforting the target. 612 00:28:05,200 --> 00:28:05,900 Okay, cool. 613 00:28:05,940 --> 00:28:06,480 I made a mistake. 614 00:28:06,740 --> 00:28:09,900 But these nice people on the Internet are going to help me fix it. 615 00:28:11,180 --> 00:28:14,720 And then they reinforce it to get the action that they want from the victim. 616 00:28:15,420 --> 00:28:17,020 Click here to fix the problem now. 617 00:28:17,200 --> 00:28:20,500 Well, in this case, you know, it's call this number and give us your credit card numbers. 618 00:28:21,380 --> 00:28:23,240 But it's the same principle, you know. 619 00:28:23,300 --> 00:28:23,840 It's this. 620 00:28:24,620 --> 00:28:24,640 It's this and this. 621 00:28:24,640 --> 00:28:25,320 So, we're starting to draw it from that mindset. 622 00:28:25,540 --> 00:28:29,640 Because that's really what we're talking about is that, you know, we're specialized individuals. 623 00:28:30,900 --> 00:28:32,700 We kind of know the reality of the world. 624 00:28:32,780 --> 00:28:36,000 We dove into the Lovecraftian madness of the realities of information security. 625 00:28:37,360 --> 00:28:39,140 We know how dangerous people can be. 626 00:28:39,280 --> 00:28:41,460 And we know how bad things can be at times. 627 00:28:42,800 --> 00:28:45,100 So, in social engineering, you kind of have to look at it from the other side. 628 00:28:45,200 --> 00:28:47,220 This person is really thinking they've just gotten the company owned. 629 00:28:47,820 --> 00:28:49,560 And so, they're going to click without thinking. 630 00:28:49,800 --> 00:28:53,120 So, we want them to slow down, be cautious, follow the process. 631 00:28:55,160 --> 00:28:57,900 So why, you know, I've been sitting up here and I gave you guys some examples, 632 00:28:58,020 --> 00:29:00,540 and you guys have very patiently listened to me talk about my daughter, 633 00:29:00,640 --> 00:29:01,960 which I appreciate as a parent. 634 00:29:02,020 --> 00:29:02,780 That makes me very happy. 635 00:29:03,520 --> 00:29:06,260 But I really wanted to teach you guys something here, and so it's this. 636 00:29:07,520 --> 00:29:12,260 We pay, you know, lots of money for training for everyone in our companies 637 00:29:12,260 --> 00:29:14,920 and to train ourselves to be better at detecting social engineering attacks 638 00:29:14,920 --> 00:29:17,840 because, you know, really and truly, you know, we have the wall of sheep, 639 00:29:17,860 --> 00:29:18,760 and I love the wall of sheep. 640 00:29:18,800 --> 00:29:20,820 It's the most awesome thing that I can think of. 641 00:29:21,920 --> 00:29:26,040 But at the same time, we constantly are getting, you know, infiltrated 642 00:29:26,040 --> 00:29:27,900 and owned through, like, spear phishing attacks 643 00:29:27,900 --> 00:29:31,000 and through, you know, clever manipulations by people 644 00:29:31,820 --> 00:29:33,060 because you're always being manipulated. 645 00:29:33,900 --> 00:29:36,340 And yet we spend a lot of money on training, 646 00:29:36,440 --> 00:29:38,020 but we don't seem to be making any footholds. 647 00:29:38,100 --> 00:29:39,660 Actually, and I will say with one caveat, 648 00:29:39,780 --> 00:29:42,780 it does seem that some of the phishing attacks have gotten kind of gone down. 649 00:29:42,860 --> 00:29:45,340 We're starting to get people to realize because we're changing their behaviors in that way. 650 00:29:46,140 --> 00:29:49,160 But in general, we train people in a different way 651 00:29:49,160 --> 00:29:50,800 than the attacks are going to happen. 652 00:29:50,820 --> 00:29:52,100 You know, it's kind of like this. 653 00:29:52,200 --> 00:29:55,340 You have a guy on stage, and I tell you about all this stuff, 654 00:29:55,480 --> 00:29:57,260 and you guys are sitting out there, and you're listening, 655 00:29:57,380 --> 00:29:58,320 and that's what we do with our company. 656 00:29:58,420 --> 00:29:59,320 We tell them about the attacks. 657 00:29:59,460 --> 00:30:00,420 We tell them how they're set up. 658 00:30:00,780 --> 00:30:03,780 And then we expect them not to be nice, you know, people 659 00:30:03,780 --> 00:30:05,980 and hold doors open for the next person coming in. 660 00:30:06,860 --> 00:30:09,780 It reminds me, I saw a talk, I think, about a year ago that Jason Street did 661 00:30:09,780 --> 00:30:11,980 where he said, you know, I don't focus on the hard stuff 662 00:30:11,980 --> 00:30:13,440 because the easy stuff still works. 663 00:30:14,360 --> 00:30:15,780 That's really, you know, the downfall. 664 00:30:16,340 --> 00:30:18,240 So why do I think this program is different 665 00:30:18,240 --> 00:30:19,620 that I've been trying to convince you guys of? 666 00:30:20,000 --> 00:30:20,320 Well. 667 00:30:21,500 --> 00:30:22,200 It's very simple. 668 00:30:22,360 --> 00:30:24,320 In this one, I'm training like I fight. 669 00:30:24,480 --> 00:30:26,260 The attacks my daughter is doing on me 670 00:30:26,260 --> 00:30:29,000 and the attacks that are kind of around us all, even benign ones, 671 00:30:29,780 --> 00:30:32,760 they're exactly the same structure as a malicious attack is going to happen. 672 00:30:32,840 --> 00:30:34,680 Now, the malicious attack may combine multiple factors, 673 00:30:34,780 --> 00:30:35,740 may be a little more subtle. 674 00:30:36,340 --> 00:30:38,860 But if I'm training in the basics and I have a strong foundation, 675 00:30:39,620 --> 00:30:42,160 I'll detect and be aware of the things that are happening around me. 676 00:30:42,880 --> 00:30:45,620 So what I want to point out is, and I actually don't do Brazilian jiu-jitsu. 677 00:30:45,660 --> 00:30:46,720 I do train in other martial arts. 678 00:30:46,780 --> 00:30:50,640 But if you look at the guy who's on his back, right, 679 00:30:50,820 --> 00:30:52,020 he's in the guard position. 680 00:30:52,380 --> 00:30:56,320 The guy on top is trying to get past his guard because he wants to win. 681 00:30:56,440 --> 00:30:59,180 But if you'll notice, the guy that looks like he's at a disadvantage 682 00:30:59,180 --> 00:31:01,560 because he's on his back and he has this other person on top of him, 683 00:31:01,700 --> 00:31:02,760 look at his face. 684 00:31:02,920 --> 00:31:03,840 That guy is calm. 685 00:31:04,660 --> 00:31:05,820 He is very relaxed. 686 00:31:07,140 --> 00:31:09,260 He knows, I've got this. 687 00:31:09,340 --> 00:31:09,820 I've trained. 688 00:31:09,980 --> 00:31:11,900 I've trained to defend the guard position forever. 689 00:31:12,600 --> 00:31:13,440 I'm good at this. 690 00:31:14,620 --> 00:31:16,380 So we train like we fight. 691 00:31:17,700 --> 00:31:20,720 And it's, you know, it's basic. 692 00:31:20,820 --> 00:31:23,380 Basically what I'm trying to do with this thing that I've developed 693 00:31:23,380 --> 00:31:24,660 and now I'm just trying to share with you guys, 694 00:31:24,740 --> 00:31:27,900 because really the secret is you have to go out and create a personal program for you. 695 00:31:28,440 --> 00:31:30,420 You kind of will discover where your weaknesses are 696 00:31:30,420 --> 00:31:34,060 and then you can create a low-risk environment to start hardening up those weaknesses. 697 00:31:36,380 --> 00:31:38,940 So that's the first part that I wanted to say to you guys is, you know, 698 00:31:38,980 --> 00:31:40,020 train like you fight. 699 00:31:40,740 --> 00:31:41,960 You know, make sure it's low-risk. 700 00:31:42,220 --> 00:31:44,620 You don't want to jump in the, you know, the deep end and start, you know, 701 00:31:44,660 --> 00:31:47,180 going out there and finding every phishing email that you've ever gotten sent 702 00:31:47,180 --> 00:31:48,260 and be like, okay, I got this. 703 00:31:48,840 --> 00:31:50,120 I'm going to just click on things 704 00:31:50,120 --> 00:31:50,800 and make sure it's low-risk. 705 00:31:50,800 --> 00:31:51,740 I'm going to make sure it's legitimate and we're good. 706 00:31:52,060 --> 00:31:54,860 And you don't want to just go find, like, you know, a great con artist 707 00:31:54,860 --> 00:31:58,700 and have them pull a con on you because, I mean, you're probably going to lose. 708 00:31:58,940 --> 00:32:01,680 You got to train in the shallow end before you can start swimming in the deep end. 709 00:32:03,760 --> 00:32:06,340 Second thing I'd like to point out is you want to reward your training partners. 710 00:32:06,400 --> 00:32:10,320 So now I've used a lot of examples because my daughter's main motivation is candy, 711 00:32:10,440 --> 00:32:11,260 cookies, sweets. 712 00:32:11,560 --> 00:32:12,640 You guys see where this is going? 713 00:32:12,680 --> 00:32:13,200 There's a theme here. 714 00:32:14,280 --> 00:32:15,380 Reward your training partners. 715 00:32:15,620 --> 00:32:19,220 And, you know, pets, they're pretty easy. 716 00:32:19,360 --> 00:32:20,260 You know, pet them. 717 00:32:20,800 --> 00:32:22,080 Continue to feed them, love them. 718 00:32:22,840 --> 00:32:25,260 And with my daughter, I do occasionally give her cookies. 719 00:32:25,980 --> 00:32:28,820 Actually, what you guys can see right here is that she had pulled a successful attack 720 00:32:28,820 --> 00:32:29,920 in the middle of a mall on me. 721 00:32:30,680 --> 00:32:35,500 And when I say a successful attack, I should point out it's not like even though I am a sleep-deprived parent 722 00:32:35,500 --> 00:32:38,960 that when she said, you know, I want a cookie, I immediately said, okay, cool, let's do this. 723 00:32:39,320 --> 00:32:45,080 No, but if – so I should point out with small children, the way that you do this is if your child does something to you 724 00:32:45,080 --> 00:32:49,620 or if your training partner, pet, whatever, does something to you and you move without thinking, 725 00:32:50,020 --> 00:32:50,600 you lost. 726 00:32:51,420 --> 00:32:52,540 They won in that round. 727 00:32:52,760 --> 00:32:55,460 So, you know, reward them, point out what they did. 728 00:32:55,540 --> 00:33:00,100 And actually, the fun part is now that my daughter is almost four, I'm teaching her what she's doing. 729 00:33:00,220 --> 00:33:01,880 So I'm making her more dangerous. 730 00:33:02,100 --> 00:33:04,320 I hope to bring her here next year, so you guys watch out. 731 00:33:04,780 --> 00:33:05,860 She'll pull things on you. 732 00:33:05,940 --> 00:33:06,440 It'll be awesome. 733 00:33:07,840 --> 00:33:10,680 Now, I will say there's one caveat to our training partners. 734 00:33:12,020 --> 00:33:15,500 Marketing people and advertising people, I've made a couple of jokes about them already. 735 00:33:15,980 --> 00:33:17,480 They really don't need any more encouragement. 736 00:33:17,620 --> 00:33:18,220 They get paid. 737 00:33:18,400 --> 00:33:19,880 I mean, they get huge budgets. 738 00:33:21,360 --> 00:33:24,000 And really and truly, they have perfected the art. 739 00:33:24,620 --> 00:33:25,740 They're one of the best examples. 740 00:33:25,880 --> 00:33:26,340 You can watch. 741 00:33:26,380 --> 00:33:28,800 Once you start being aware of the things happening around you, watch commercials. 742 00:33:29,680 --> 00:33:34,740 I now actually go out of my way to find commercials and watch and just see if I can identify the different ways they set up their cells. 743 00:33:35,940 --> 00:33:37,400 Because that's the way you learn, right? 744 00:33:38,280 --> 00:33:40,740 And so now we have to remember we've built a training program. 745 00:33:41,420 --> 00:33:45,420 We are going to co-co-opt, you know, small children everywhere, hopefully, in good ways. 746 00:33:45,660 --> 00:33:49,120 And use them as training partners with the permission of their parents, if you are not the parent. 747 00:33:49,700 --> 00:33:50,780 And we're not going to – 748 00:33:50,780 --> 00:33:52,380 And we're not going to encourage the advertisers and marketers, right? 749 00:33:52,540 --> 00:33:52,960 Okay. 750 00:33:53,140 --> 00:33:56,880 So we have to remember what we're fighting against, right? 751 00:33:57,280 --> 00:34:00,540 So once again, this guy is in a full tactical hoodie. 752 00:34:00,860 --> 00:34:03,620 He has a laptop and a keyboard with three monitors. 753 00:34:03,760 --> 00:34:07,680 You put that in your presentation because I've never seen that before. 754 00:34:09,220 --> 00:34:10,940 And somehow it's awesome, right? 755 00:34:11,040 --> 00:34:12,800 You guys are thinking to yourselves, that's pretty cool. 756 00:34:13,980 --> 00:34:14,580 That's right. 757 00:34:14,640 --> 00:34:14,760 Yeah. 758 00:34:14,820 --> 00:34:16,120 I only have two monitors as well. 759 00:34:16,540 --> 00:34:17,160 Yeah, yeah. 760 00:34:18,880 --> 00:34:20,420 Three things go downhill. 761 00:34:21,260 --> 00:34:22,660 It's just too much stuff on the screen. 762 00:34:22,820 --> 00:34:23,980 But we've got to remember, right? 763 00:34:24,040 --> 00:34:25,400 The pressure is constant. 764 00:34:26,060 --> 00:34:27,300 You're always being manipulated. 765 00:34:27,680 --> 00:34:29,380 I mean, guys, we're in Vegas. 766 00:34:30,020 --> 00:34:31,420 You're always being manipulated. 767 00:34:32,460 --> 00:34:35,800 Everything from the lights on the casinos to the sound the slot machines make 768 00:34:36,220 --> 00:34:42,680 to the way the layout of the casino is made, the advertising all around you, the stuff in your room. 769 00:34:42,760 --> 00:34:47,300 The only moment that you get any peace is kind of right now during this talk, unless I'm really manipulating you. 770 00:34:48,180 --> 00:34:49,380 And when you're asleep. 771 00:34:49,640 --> 00:34:50,660 And even then, you've been. 772 00:34:50,780 --> 00:34:53,260 Bombarded, so you're probably having dreams about weird Vegas stuff. 773 00:34:53,400 --> 00:34:56,040 I know I am, but, you know, that could just be me. 774 00:34:56,860 --> 00:35:00,180 So the good news is everybody in this room is a hacker. 775 00:35:00,520 --> 00:35:06,340 Whether you think of yourself as being a hacker or not, you're here, you're playing around with stuff, you're listening, you're learning, you're adapting. 776 00:35:06,820 --> 00:35:08,060 That's really the hacker mindset. 777 00:35:08,300 --> 00:35:17,000 So the good news is, is we're all very capable of going out and building our own personalized training programs and becoming better and then teaching other people how to become better. 778 00:35:18,380 --> 00:35:20,600 So remember the attacker. 779 00:35:20,600 --> 00:35:30,460 Hackers are going to apply constant pressure, they're going to create urgency, they're going to build trust, they're going to create an imbalance so you're going to want to move, and they are well-funded and well-researched. 780 00:35:30,460 --> 00:35:32,560 They know this stuff better than all of us, really. 781 00:35:33,500 --> 00:35:36,720 And they're going to be much more subtle than my daughter's attempts, so remember that. 782 00:35:38,180 --> 00:35:41,580 And with that, I'm a little bit early, but that's okay, I've got a couple of things. 783 00:35:41,920 --> 00:35:42,920 Does anybody have any questions? 784 00:35:45,660 --> 00:35:47,120 I was going to say, if you don't, I do. 785 00:35:47,200 --> 00:35:47,680 Oh, we've got one. 786 00:35:47,740 --> 00:35:47,920 Yes, sir. 787 00:35:48,040 --> 00:35:48,240 Where are the exits? 788 00:35:49,360 --> 00:35:50,040 Where are the exits? 789 00:35:50,660 --> 00:35:51,240 No clue. 790 00:35:54,400 --> 00:35:57,900 So we'll say, to talk about... 791 00:35:58,920 --> 00:36:01,200 Oh, right, okay, so there's an exit over there. 792 00:36:01,400 --> 00:36:02,760 There's probably one over there, just guessing. 793 00:36:02,800 --> 00:36:04,260 No, that's a window, so go over that way. 794 00:36:05,420 --> 00:36:06,280 I will say this. 795 00:36:07,760 --> 00:36:12,960 When Ming introduced me, he said, you know, I've known him for a while, I did meet him last year, and I hung out for a while. 796 00:36:13,500 --> 00:36:16,640 That was my first DEF CON, and now I'm here at a village speaking. 797 00:36:16,840 --> 00:36:20,580 So what I would say is that you may think to yourself that you don't have... 798 00:36:20,600 --> 00:36:24,180 You don't have ideas, and you may think to yourself, you know, I don't know what I could talk about. 799 00:36:24,760 --> 00:36:29,640 The fact that you have a unique experience, I mean, you guys let me sit up here and talk for 30 minutes about my daughter and social engineering, 800 00:36:30,060 --> 00:36:34,580 and you're in a packet hacking village in the Wall of Sheep, so somehow this has worked out for us, I think. 801 00:36:36,120 --> 00:36:39,520 If you have an idea, put it together, submit it. 802 00:36:39,640 --> 00:36:43,380 You never know what can happen, and we need more speakers, and we need more people doing that. 803 00:36:44,040 --> 00:36:47,180 So if there aren't any other questions, you know, feel free to reach out to me, contact me. 804 00:36:47,280 --> 00:36:49,100 I'll be here through Sunday. 805 00:36:49,440 --> 00:36:49,880 Find me. 806 00:36:50,680 --> 00:36:52,560 And thank you for letting me speak. 807 00:36:56,320 --> 00:36:57,060 Thank you. 808 00:36:57,220 --> 00:37:00,160 Thank you so much again, man. 809 00:37:00,280 --> 00:37:01,060 Thank you. 810 00:37:02,240 --> 00:37:05,940 And yes, 308. 811 00:37:06,020 --> 00:37:09,460 So I just want to introduce the... 812 00:37:09,460 --> 00:37:17,000 I would like to now introduce the next speaker, Damon Small, also known as Chef. 813 00:37:18,660 --> 00:37:20,420 He's a diehard sports fan. 814 00:37:21,260 --> 00:37:23,280 And anyone from Louisiana here? 815 00:37:23,440 --> 00:37:24,220 Anyone from Louisiana? 816 00:37:25,200 --> 00:37:25,880 Anyone? 817 00:37:26,560 --> 00:37:28,220 Wow, no one. 818 00:37:28,280 --> 00:37:31,300 Anyone a fan of the LSU Tigers here? 819 00:37:33,120 --> 00:37:36,000 Okay, he's a fan of the LSU Tigers. 820 00:37:37,280 --> 00:37:40,320 He's also a dad, he's a hockey player. 821 00:37:41,960 --> 00:37:42,960 Oh, thank you. 822 00:37:43,080 --> 00:37:43,700 We'll stop that. 823 00:37:44,060 --> 00:37:49,460 And so now it's my great pleasure to introduce... 824 00:37:50,600 --> 00:37:53,800 Someone we've known you for a while now, Chef. 825 00:37:58,260 --> 00:37:59,320 Thank you, Ming. 826 00:37:59,700 --> 00:38:00,980 Very much appreciated. 827 00:38:02,420 --> 00:38:03,600 Let me log in. 828 00:38:03,760 --> 00:38:04,280 Sorry. 829 00:38:14,000 --> 00:38:14,680 All right. 830 00:38:14,820 --> 00:38:16,880 Thank you all very much for coming. 831 00:38:17,080 --> 00:38:20,460 Thank you to the Wall of Sheep for putting this on. 832 00:38:20,600 --> 00:38:20,980 Thank you to all of you for coming every year. 833 00:38:21,940 --> 00:38:25,500 This is my second year as a volunteer with the Wall of Sheep. 834 00:38:25,740 --> 00:38:27,980 It's a lot of work, but it's a lot of fun. 835 00:38:28,140 --> 00:38:32,060 And I'm privileged to not only be a volunteer with this great organization this year, 836 00:38:32,120 --> 00:38:33,760 but also here presenting to you. 837 00:38:34,180 --> 00:38:35,780 And thank you all for coming. 838 00:38:35,920 --> 00:38:38,580 This is where I did a new location here on the 26th floor. 839 00:38:39,100 --> 00:38:42,880 We're thrilled that you continue to support us in the way you do. 840 00:38:43,760 --> 00:38:45,920 As Ming mentioned, my name is Chef. 841 00:38:46,360 --> 00:38:48,640 You can call me Damon as well if you prefer. 842 00:38:49,500 --> 00:38:50,560 I do have... 843 00:38:50,600 --> 00:38:53,240 I have a son that's a hockey player, as he briefly mentioned. 844 00:38:53,340 --> 00:38:56,420 I want to just briefly and selfishly give a shout-out to my son, 845 00:38:57,100 --> 00:39:00,120 Ex-Nevis 24, who turned 13. 846 00:39:01,940 --> 00:39:02,940 Turned 13 today. 847 00:39:03,080 --> 00:39:04,820 So I am the father of a teenager. 848 00:39:06,460 --> 00:39:09,280 I am not at all qualified to have that job. 849 00:39:10,120 --> 00:39:10,600 Yeah. 850 00:39:11,940 --> 00:39:15,440 So shout-out to Ex-Nevis, Brody's his real name. 851 00:39:16,120 --> 00:39:20,500 And I want to talk to you today about Eisenhower and the Interstate. 852 00:39:20,600 --> 00:39:25,820 And, excuse me, Eisenhower and the Internet and what those two things have to do with one another. 853 00:39:25,960 --> 00:39:27,340 So a brief introduction. 854 00:39:27,440 --> 00:39:34,340 I need to also thank my employer who is supporting me being in here, being here today, NCC Group. 855 00:39:34,460 --> 00:39:37,400 We're a global security firm founded in 99. 856 00:39:37,520 --> 00:39:39,760 We're very big, 1,800 employees globally. 857 00:39:40,220 --> 00:39:41,360 You can read that. 858 00:39:41,500 --> 00:39:43,900 But I'm happy to answer questions if you like. 859 00:39:43,980 --> 00:39:45,780 But let's just move on. 860 00:39:45,820 --> 00:39:46,580 Enough about them. 861 00:39:46,660 --> 00:39:47,860 Let's talk about me. 862 00:39:49,120 --> 00:39:50,080 My name... 863 00:39:50,080 --> 00:39:50,920 That was a joke. 864 00:39:50,980 --> 00:39:52,000 Didn't work this time, did it? 865 00:39:52,060 --> 00:39:52,460 All right. 866 00:39:53,340 --> 00:39:56,220 My name is Damon, technical PM for the NCC Group. 867 00:39:56,360 --> 00:39:59,360 I've been in InfoSec since 2001. 868 00:39:59,620 --> 00:40:04,220 I've been in IT since 1995, in InfoSec since 2001. 869 00:40:04,500 --> 00:40:06,440 As Ming said, I am a Louisiana native. 870 00:40:07,400 --> 00:40:08,980 Been in Texas for 20 years. 871 00:40:09,020 --> 00:40:12,640 And as we say in Texas, I'm not from Texas, but I got there as fast as I could. 872 00:40:13,780 --> 00:40:15,600 Studied music at Louisiana State. 873 00:40:15,840 --> 00:40:16,540 Go Tigers. 874 00:40:17,240 --> 00:40:19,720 Don't anyone throw anything at me if you're not a Tiger fan. 875 00:40:20,640 --> 00:40:28,460 And I went to grad school in 2005 for information assurance to try and make myself feel like a legit geek, I guess. 876 00:40:29,080 --> 00:40:40,260 So I've done a lot of blue team InfoSec and health care for the DOD and aerospace at the Johnson Space Center in Houston and also in oil and gas. 877 00:40:40,460 --> 00:40:42,240 So that's a little bit about me. 878 00:40:43,660 --> 00:40:46,740 And let's jump into Eisenhower and the Internet. 879 00:40:46,820 --> 00:40:50,060 And this whole narrative began years... 880 00:40:50,080 --> 00:41:00,900 Years ago, I was having a conversation with a colleague of mine, and he made the comment, we were talking about the myriad problems we have in securing information assets for people. 881 00:41:01,120 --> 00:41:04,520 And basically the question was, why didn't they think of that? 882 00:41:05,200 --> 00:41:08,660 And it occurred to me that that's a perfectly legitimate question. 883 00:41:09,840 --> 00:41:17,100 You know, why do we have these problems and why couldn't we see that these things were going to be problems and why didn't they think of that? 884 00:41:17,140 --> 00:41:18,880 It's a simple and honest question. 885 00:41:20,080 --> 00:41:23,280 And I think the answer lies with how the Internet came to be. 886 00:41:23,500 --> 00:41:39,220 It's an important question because as information security practitioners, we have to understand why the technology is the way it is, how people will use it, and how malicious users will leverage design flaws to steal information. 887 00:41:40,560 --> 00:41:42,540 So why didn't they think of that? 888 00:41:42,620 --> 00:41:46,040 Let's explore that question a little bit further and try and find that out. 889 00:41:46,900 --> 00:41:49,220 Before I start to answer that, though, it is hot. 890 00:41:54,500 --> 00:41:58,040 As much as I love my lab coat, yeah, it's a little warm. 891 00:41:58,840 --> 00:42:03,580 So we're going to start first by talking about Eisenhower and his interstate system. 892 00:42:03,700 --> 00:42:05,160 And bear with me here. 893 00:42:05,280 --> 00:42:06,440 I'm going to loop these things together. 894 00:42:06,560 --> 00:42:07,020 I trust you. 895 00:42:07,060 --> 00:42:09,160 So this is a little bit of a history lesson first. 896 00:42:09,260 --> 00:42:13,280 The idea for a national interstate system began in 1919. 897 00:42:16,640 --> 00:42:19,420 Then Eisenhower, Lieutenant Colonel Eisenhower. 898 00:42:20,080 --> 00:42:23,860 He was involved in a road trip from Washington, D.C. to San Francisco. 899 00:42:23,960 --> 00:42:25,940 It involved 80 military vehicles. 900 00:42:26,720 --> 00:42:28,600 It covered 3,000 miles. 901 00:42:29,040 --> 00:42:31,180 And it took two months. 902 00:42:31,820 --> 00:42:36,180 And you can see from one of those pictures there that there were no highways. 903 00:42:36,440 --> 00:42:38,620 There were roads that didn't have big shoulders. 904 00:42:38,740 --> 00:42:41,820 And the vehicles were constantly getting stuck in ditches and breaking down. 905 00:42:42,360 --> 00:42:49,360 And Eisenhower realized that if it takes two months to move military vehicles from one coast to the other, 906 00:42:49,380 --> 00:42:50,060 it's going to be difficult. 907 00:42:50,080 --> 00:42:56,060 It's going to be difficult to defend the country in the event that there would be any kind of war activity on American soil. 908 00:42:56,420 --> 00:43:02,040 So he knew that that wasn't a good solution and that something had to be done. 909 00:43:04,640 --> 00:43:08,340 Years later, he was in Europe in the 1930s. 910 00:43:08,340 --> 00:43:13,720 If you think of your world history, in the 1930s in Germany in particular, there were some things going on. 911 00:43:14,060 --> 00:43:17,920 And he discovered that the Germans being, you know, very efficient, 912 00:43:18,460 --> 00:43:20,060 had already built a national interstate system. 913 00:43:20,080 --> 00:43:29,860 And it reinforced the idea in Eisenhower's mind that having a national road system was critical to the nation's security, 914 00:43:30,080 --> 00:43:35,520 but also to its economy, to be able to move things easily across great distances. 915 00:43:35,720 --> 00:43:41,180 So when he became president, he supported the idea of a nationwide infrastructure here in the United States 916 00:43:41,180 --> 00:43:48,460 that would not only facilitate military objectives, but also create jobs and boost the economy. 917 00:43:49,160 --> 00:43:50,060 So that's what he did. 918 00:43:50,060 --> 00:43:51,220 Let's recap that for a minute. 919 00:43:51,320 --> 00:43:58,100 The initial requirement was to facilitate the movement of military vehicles around the country easily. 920 00:43:58,700 --> 00:44:03,680 But the result was that a private industry was created that helped build the roads, 921 00:44:04,840 --> 00:44:05,740 excuse me, 922 00:44:05,800 --> 00:44:11,320 and created an entire culture around this new infrastructure. 923 00:44:15,030 --> 00:44:16,400 Let me go back there. 924 00:44:16,520 --> 00:44:18,540 I forgot a point. 925 00:44:18,720 --> 00:44:20,040 All right. 926 00:44:20,040 --> 00:44:22,200 You know, it wasn't just building the roads for the military, 927 00:44:22,360 --> 00:44:25,300 but once private citizens were able to use these roads, 928 00:44:25,480 --> 00:44:28,760 we were able to travel easily from place to place. 929 00:44:30,320 --> 00:44:33,600 Entire towns sprung up around where these roads were. 930 00:44:33,800 --> 00:44:38,640 And it did have a huge impact on commerce across the entire country. 931 00:44:39,260 --> 00:44:47,480 So because of his experiences, he fought hard to get Congress to pass the Federal Aid Highway Act of 1956. 932 00:44:47,760 --> 00:44:49,680 So for that reason, today, 933 00:44:50,040 --> 00:44:52,680 we do refer to it as the Eisenhower Interstate System. 934 00:44:52,860 --> 00:44:56,940 If you've been traveling, perhaps you've seen those signs along the side of the road. 935 00:44:57,500 --> 00:45:00,160 So as the father of the interstate system, 936 00:45:01,420 --> 00:45:05,640 Congress passed a bill in 1990 that legally changed the name 937 00:45:05,640 --> 00:45:11,960 to the Dwight D. Eisenhower System of Interstate and Defense Highways. 938 00:45:12,100 --> 00:45:15,140 And it's an important name because that defense word is still in there. 939 00:45:15,220 --> 00:45:19,240 It still has an important role should it need to be used in defense. 940 00:45:21,000 --> 00:45:27,620 So as I mentioned, we've got a car culture in this country, but also elsewhere. 941 00:45:27,900 --> 00:45:33,900 So when you facilitate transportation very well, interesting things tend to happen. 942 00:45:34,000 --> 00:45:41,000 For example, in around 1900 in France, the Michelin Guide was published. 943 00:45:41,560 --> 00:45:43,280 Michelin as in the tire company. 944 00:45:43,540 --> 00:45:45,180 So it's a little non-intuitive. 945 00:45:45,300 --> 00:45:49,440 Why would the Michelin Guide for fine dining and restaurants, 946 00:45:50,040 --> 00:45:52,020 be published by a tire company? 947 00:45:52,340 --> 00:45:57,080 Well, the answer is that the Michelin Company knew if they could publish a book of really nice restaurants 948 00:45:57,080 --> 00:45:59,580 that people had to drive to get to, 949 00:45:59,740 --> 00:46:03,580 then they would drive their car more and need to buy more tires. 950 00:46:03,940 --> 00:46:08,820 And therefore, it would be profitable for them to publish this book to get people to drive. 951 00:46:09,100 --> 00:46:13,920 As I mentioned earlier, entire towns existed only to support the interstate. 952 00:46:13,940 --> 00:46:15,840 I'm sure we've all seen the movie Cars, right? 953 00:46:15,960 --> 00:46:18,700 I mean, it's part of our culture. 954 00:46:20,040 --> 00:46:25,040 Route 66, which ran from Chicago to Santa Monica, about 2,500 miles, 955 00:46:25,240 --> 00:46:27,460 provided jobs for everyone that lived nearby. 956 00:46:27,820 --> 00:46:32,140 Now to be fair, Route 66 is not actually a part of the national highway system. 957 00:46:32,300 --> 00:46:35,140 It was built before the highway system existed, 958 00:46:35,360 --> 00:46:40,660 but it's a great example of car culture in this country. 959 00:46:41,560 --> 00:46:46,140 While I was doing research on this, this is an interesting bit of trivia here. 960 00:46:46,240 --> 00:46:50,020 Does anyone know where the middle of Route 66 is? 961 00:46:50,520 --> 00:46:50,920 Anyone? 962 00:46:53,820 --> 00:46:56,420 Is there anyone else here from Texas, by the way? 963 00:46:56,500 --> 00:46:57,240 I know there's no new... 964 00:46:57,980 --> 00:46:58,380 Texas. 965 00:46:59,320 --> 00:47:00,860 Well, it might be near there. 966 00:47:01,180 --> 00:47:05,720 All right, so for the Texans in the room, it's in Adrian, Texas. 967 00:47:06,100 --> 00:47:08,500 I'm not even sure I know where that is, to be honest with you. 968 00:47:08,540 --> 00:47:11,440 I just thought it was an interesting trivia question. 969 00:47:13,180 --> 00:47:14,460 So what's my point? 970 00:47:14,540 --> 00:47:19,500 The point is that what started as an infrastructure built for a very specific use case 971 00:47:19,500 --> 00:47:25,540 ended up having a profound economic and sociological effect once turned over to the private sector. 972 00:47:25,840 --> 00:47:27,080 Does that sound familiar? 973 00:47:27,280 --> 00:47:33,740 Does that sound like any other government-based infrastructure or government-funded infrastructure? 974 00:47:34,140 --> 00:47:37,180 So let's jump over to the Internet now that I've told that narrative. 975 00:47:40,020 --> 00:47:46,360 The DoD wanted to create a system that would allow for geographically dispersed computers 976 00:47:46,360 --> 00:47:48,400 to communicate with one another. 977 00:47:48,400 --> 00:47:55,740 If there was some sort of catastrophic event that disrupted the largely centralized computer capabilities 978 00:47:55,740 --> 00:47:59,600 that they had at the time, they were afraid that they would not be able to share the information 979 00:47:59,600 --> 00:48:02,520 they needed to defend this country. 980 00:48:02,760 --> 00:48:06,400 So if they could come up with some way for these geographically dispersed systems 981 00:48:06,920 --> 00:48:11,320 to communicate with one another, then perhaps they could do a better job at sharing information 982 00:48:11,320 --> 00:48:14,280 during disaster or war or whatever. 983 00:48:14,480 --> 00:48:16,220 Well, a funny thing happened. 984 00:48:16,320 --> 00:48:17,360 In 1958, 985 00:48:18,940 --> 00:48:22,700 Eisenhower funded ARPA, the Advanced Research Project Agency, 986 00:48:23,300 --> 00:48:26,860 directly in response to the Russians having launched Sputnik. 987 00:48:27,080 --> 00:48:31,120 So it was actually the space race that started ARPA. 988 00:48:31,400 --> 00:48:34,000 And the Americans were surprised. 989 00:48:34,180 --> 00:48:36,000 We had no idea the Russians were doing this. 990 00:48:36,040 --> 00:48:40,080 All of a sudden, they've launched a satellite, and we were taken off guard. 991 00:48:40,240 --> 00:48:45,100 So Eisenhower knew, okay, we've got to have somebody in the government that's doing scientific research 992 00:48:46,220 --> 00:48:47,580 in a collaborative way. 993 00:48:47,580 --> 00:48:50,680 So we don't get taken off guard ever again. 994 00:48:50,860 --> 00:48:55,140 So shortly, NASA was formed and took over the space race stuff. 995 00:48:55,400 --> 00:49:02,500 And ARPA at that time began in the 1960s to focus on computer science types of issues. 996 00:49:03,280 --> 00:49:05,520 So that's how ARPA came to be. 997 00:49:05,700 --> 00:49:10,060 By the way, in 1972, they changed their name to DARPA, 998 00:49:10,280 --> 00:49:13,280 the DoD, Advanced Research Projects Agency. 999 00:49:13,700 --> 00:49:16,360 Then in 1993, it was changed back to ARPA. 1000 00:49:16,360 --> 00:49:20,100 And in 1996, once again, back to DARPA. 1001 00:49:20,340 --> 00:49:23,900 So not sure why they keep changing the name and rebranding themselves, 1002 00:49:24,160 --> 00:49:27,060 but just, you know, again, a little more trivia there. 1003 00:49:28,140 --> 00:49:31,360 So the DoD knew they couldn't do it alone. 1004 00:49:31,540 --> 00:49:37,180 I mean, they have the ability to get large sums of money and to start programs and those sorts of things. 1005 00:49:37,460 --> 00:49:45,280 So they had to collaborate with academia and other, you know, academic agencies that could provide research. 1006 00:49:45,280 --> 00:49:50,400 So there was people, a lot of people in America, but also people all over the world, 1007 00:49:50,540 --> 00:49:57,300 that were working on the various technologies that would be required to make something like the Internet happen. 1008 00:49:58,620 --> 00:50:03,860 And by the way, guess who was in charge of starting ARPA? 1009 00:50:04,640 --> 00:50:06,640 Well, it was Eisenhower again. 1010 00:50:06,800 --> 00:50:10,860 So I didn't know that at the time when I started, you know, putting the story together. 1011 00:50:11,080 --> 00:50:15,260 But so the same guy who started the huge infrastructure for the interstate system, 1012 00:50:15,280 --> 00:50:17,060 also started ARPA. 1013 00:50:18,900 --> 00:50:24,840 The first four nodes of what was called at the time the ARPA net came online. 1014 00:50:25,460 --> 00:50:26,700 Oh, excuse me, forgot a point. 1015 00:50:26,840 --> 00:50:29,520 So in 1958, yeah, that's when it was founded. 1016 00:50:30,500 --> 00:50:35,380 And the goal was to, you know, come up with the technologies, as I mentioned, 1017 00:50:35,420 --> 00:50:37,680 that they would need to do the routing and switching. 1018 00:50:37,860 --> 00:50:39,540 So they came online. 1019 00:50:39,700 --> 00:50:44,900 The first four nodes were the University of California, Los Angeles, Stanford, 1020 00:50:45,280 --> 00:50:49,680 Stanford Research Institute, UC Santa Barbara, and the University of Utah. 1021 00:50:50,140 --> 00:50:52,280 So that, all right, a fan. 1022 00:50:52,800 --> 00:51:00,500 So this is what the topology map of the Internet looked like in December 1969 with four nodes. 1023 00:51:00,700 --> 00:51:03,380 That's a pretty straightforward topology map. 1024 00:51:03,560 --> 00:51:07,760 Has anyone seen a map of the Internet, you know, fairly recently? 1025 00:51:08,040 --> 00:51:10,040 You know what that one looks like? 1026 00:51:12,120 --> 00:51:14,040 I mean, it looks like a neural network. 1027 00:51:14,040 --> 00:51:15,720 I mean, there are so many nodes on there. 1028 00:51:15,880 --> 00:51:21,360 It may be impossible to really even, you know, understand how many nodes are actually there. 1029 00:51:23,680 --> 00:51:33,020 So the first message was actually sent on ARPA net on October 29, 1969, at 2230. 1030 00:51:34,620 --> 00:51:38,740 They were going to type logon. 1031 00:51:39,080 --> 00:51:41,480 They got the L and the O typed. 1032 00:51:44,040 --> 00:51:45,160 And then it crashed. 1033 00:51:45,540 --> 00:51:51,540 I would like to take this opportunity, however, at the packet hacking village, the Wall of Sheep, 1034 00:51:51,580 --> 00:51:58,160 to start the rumor that the actual message that they had intended to type was, in fact, LOL. 1035 00:52:00,320 --> 00:52:03,720 It's just a funnier story, but I don't think that's an actual command for anything. 1036 00:52:04,860 --> 00:52:08,260 So the key concepts involved in getting these four nodes. 1037 00:52:08,800 --> 00:52:12,020 Oh, and by the way, so that was at, yeah, October 29. 1038 00:52:12,040 --> 00:52:13,220 The system crashed. 1039 00:52:14,380 --> 00:52:21,480 A few hours later, the first permanent connection was established on the 21st of November. 1040 00:52:21,780 --> 00:52:27,000 So they finally got it back up and stable and working. 1041 00:52:27,300 --> 00:52:34,260 And so we like to think of it, ARPA and ARPA net, as a distinctly American thing. 1042 00:52:34,460 --> 00:52:39,100 And to be fair, it was Eisenhower and ARPA, and that's where the idea came from. 1043 00:52:39,180 --> 00:52:43,180 But in my research, I found there were people from all over the world 1044 00:52:43,180 --> 00:52:48,280 that were involved in the development of the protocols and the routing and switching technology. 1045 00:52:48,820 --> 00:52:54,840 And so I don't think it's fair anymore to say, well, it's certainly not fair to say that Al Gore invented the Internet. 1046 00:52:55,060 --> 00:53:00,640 Every time I give the elevator pitch of this presentation, that joke invariably comes up. 1047 00:53:01,340 --> 00:53:03,100 So there was people from all over the world. 1048 00:53:03,160 --> 00:53:04,840 It was a big, huge collaborative effort. 1049 00:53:05,280 --> 00:53:12,180 So I think what we can really conclude is that it was invented by humans in the 20th century. 1050 00:53:12,180 --> 00:53:14,860 Yet it was a big deal. 1051 00:53:15,120 --> 00:53:22,040 But not only was it invented by humans in the 20th century, but it was for very specific purposes. 1052 00:53:22,840 --> 00:53:30,540 The design requirements didn't fully account for unauthorized users and for non-private networks, for example. 1053 00:53:30,680 --> 00:53:34,360 So if you think about those first four nodes and then any of the nodes that followed 1054 00:53:34,360 --> 00:53:42,020 that were research organizations and universities that were approved by the DOD to participate in the research, 1055 00:53:42,180 --> 00:53:44,600 all of the users were pretty well known. 1056 00:53:44,720 --> 00:53:49,480 You couldn't even access the network unless you were a part of one of those research organizations. 1057 00:53:49,920 --> 00:53:56,800 So it's not that they didn't think of it, but the thing, the problem they were trying to solve at that time 1058 00:53:56,800 --> 00:54:05,740 looked nothing at all like the problems we try to solve today as security researchers or as users of global networks. 1059 00:54:05,980 --> 00:54:10,780 It just wasn't in the design book at all. 1060 00:54:14,520 --> 00:54:20,140 So as with the interstate, once it was built and private industry started using it, 1061 00:54:20,240 --> 00:54:26,380 we saw a distinct change in the nature of ARPANET when e-commerce happened. 1062 00:54:29,720 --> 00:54:38,640 It's interesting to me that up until 1995, ARPANET still had a lot of control over what we could do with the internet. 1063 00:54:38,780 --> 00:54:41,420 And in fact, e-commerce was specifically prohibited. 1064 00:54:42,500 --> 00:54:49,820 So UUNet, the first nonprofit internet access company, didn't even exist until around 1988. 1065 00:54:50,200 --> 00:54:52,940 They went for profit in 1990. 1066 00:54:53,520 --> 00:54:58,560 The world around that same time in 1989 offered internet access. 1067 00:54:59,000 --> 00:55:06,960 And they were also the first company that was able to offer full access to non-ARPA approved users by 1992. 1068 00:55:07,500 --> 00:55:11,740 Now 1992, that wasn't that long ago, at least not for me. 1069 00:55:13,380 --> 00:55:16,500 Being old and having a teenage son and all that stuff. 1070 00:55:16,860 --> 00:55:22,400 But before that, you could have access to the internet, but it wasn't necessarily the entire internet. 1071 00:55:22,620 --> 00:55:27,900 It was just those parts that those companies were able to expose to its end users. 1072 00:55:28,360 --> 00:55:34,360 So by 1992 was the first time that we could even really access the entire global network. 1073 00:55:34,700 --> 00:55:40,700 And eBay and Amazon didn't happen until the mid-90s because it was just simply against the law 1074 00:55:40,700 --> 00:55:43,480 to perform e-commerce on the internet. 1075 00:55:43,620 --> 00:55:45,020 That kind of blew my mind. 1076 00:55:45,120 --> 00:55:49,760 I mean, I did have e-mail accounts in school and everything back in the 90s, 1077 00:55:49,760 --> 00:55:56,120 but it just didn't occur to me that there was in fact a time that we didn't have Amazon and eBay and things. 1078 00:55:56,260 --> 00:56:02,160 Now, I said that e-commerce didn't exist before the mid-90s. 1079 00:56:02,180 --> 00:56:04,580 That's not really fair to say. 1080 00:56:04,680 --> 00:56:07,960 I mean, e-commerce did exist, but it wasn't necessarily above board. 1081 00:56:08,480 --> 00:56:10,260 I found an interesting article here. 1082 00:56:10,700 --> 00:56:23,160 The first e-commerce, 71, 72 or so, is believed to have been some weed that drug deal was brokered using ARPANET back then. 1083 00:56:24,200 --> 00:56:31,760 So you could say that the earliest examples of e-commerce were actually back in the 70s. 1084 00:56:31,780 --> 00:56:35,160 And, yeah, I thought that was funny. 1085 00:56:36,300 --> 00:56:40,460 So what's that have to do with us? 1086 00:56:40,460 --> 00:56:50,540 So the security concept, as I mentioned, is the initial design requirements of an infrastructure are not necessarily what they evolve into. 1087 00:56:51,000 --> 00:56:59,080 ARPA didn't have any facilities of its own, so it had to engage with academia to help to develop the technology and to design it. 1088 00:56:59,540 --> 00:57:05,220 Just as America's roads were fueled for America's love for automobiles and exploring cities, 1089 00:57:05,300 --> 00:57:09,400 the internet allowed people to exchange information across vast distances. 1090 00:57:09,400 --> 00:57:19,180 And this matured from the first application of simple email to e-commerce to delivery of streaming media and remote control of a variety of devices. 1091 00:57:19,460 --> 00:57:26,300 And the internet of things, just go over to Sheep City over there, and you can see some things that have IP stacks and can talk on the internet 1092 00:57:26,300 --> 00:57:30,300 that I'm quite sure the researchers in the 60s didn't think, 1093 00:57:30,360 --> 00:57:36,640 oh, well, we better put something in the protocol spec to make sure the garage door opener doesn't get attacked, right? 1094 00:57:36,760 --> 00:57:38,220 I mean, it just wouldn't have crossed their mind. 1095 00:57:38,220 --> 00:57:49,560 So I think we can all appreciate these concepts that, you know, we far exceeded ARPA's intention from 50 years ago with what they wanted to do with this network. 1096 00:57:49,800 --> 00:57:52,840 So what are we going to do about it? 1097 00:57:52,920 --> 00:58:02,380 I mean, there's been, since the first roads were built, it's not only just that the roads are better and more mature, you know, we have smarter vehicles as well, 1098 00:58:02,440 --> 00:58:06,380 but there is a concept of these so-called smart roads. 1099 00:58:06,620 --> 00:58:08,120 And I found this on a website. 1100 00:58:08,220 --> 00:58:10,740 It's a website called adsmartcorridor.org. 1101 00:58:11,000 --> 00:58:15,360 And you can see it's, you know, it's not, it's no longer just a hard, flat surface, right? 1102 00:58:15,460 --> 00:58:19,640 I mean, we've got ramp meters that will control the flow of traffic onto roads. 1103 00:58:19,800 --> 00:58:26,320 We have overhead signs that will give drivers critical information that they need to know about what's going on ahead of them, 1104 00:58:26,420 --> 00:58:34,900 and local street signs that will change and reroute traffic depending on, you know, conditions on the roads as well. 1105 00:58:35,080 --> 00:58:37,800 So I've got a series of predictions. 1106 00:58:37,800 --> 00:58:48,160 I'm not at all going to say that I'm, you know, an authority on this, but I hope if nothing else it starts or continues the discussion of what the, you know, 1107 00:58:48,180 --> 00:58:54,820 we know what the Internet is like now, you know, what is it going to look like in the future and what do we need to do to prepare for it. 1108 00:58:54,880 --> 00:58:57,740 So as I mentioned, you know, it started off as a hard, flat surface. 1109 00:58:58,380 --> 00:59:04,000 We've got adaptive construction materials now that we can use to build roads. 1110 00:59:05,000 --> 00:59:07,480 We've got toll roads that help pay for things. 1111 00:59:07,480 --> 00:59:14,540 And by virtue of the fact that people have to pay to use the roads, it might meter the traffic a little bit and the lighting and dynamic lanes. 1112 00:59:14,920 --> 00:59:18,880 And, again, we've got self-driving cars that are becoming a reality now. 1113 00:59:18,980 --> 00:59:24,840 Maybe we'll have the cars that will deal with getting us safely where we're going and communicate with one another. 1114 00:59:25,300 --> 00:59:33,380 So similarly, I think, you know, what we still use, you know, particles to transfer information. 1115 00:59:33,580 --> 00:59:37,460 And, you know, we're going to see more sophisticated vehicles. 1116 00:59:37,480 --> 00:59:37,800 We're going to see more sophisticated ways. 1117 00:59:38,080 --> 00:59:40,800 And quantum computing is one example that comes to mind. 1118 00:59:40,980 --> 00:59:47,860 But we started off with a simple Internetworking infrastructure, which, by the way, I'd like to mention that that word Internetworking, 1119 00:59:47,960 --> 00:59:52,800 that was the first verb that they used to describe what they were trying to do. 1120 00:59:52,880 --> 00:59:55,700 The computers were Internetworking with one another. 1121 00:59:55,880 --> 00:59:59,200 And that was shortened to Internet. 1122 00:59:59,700 --> 01:00:03,980 And so the Internet is just a shortened, made-up word for Internetworking. 1123 01:00:04,220 --> 01:00:06,300 And, of course, now it's a proper noun. 1124 01:00:06,300 --> 01:00:08,760 And it should always be capitalized, by the way. 1125 01:00:10,580 --> 01:00:16,200 So we'll have, you know, math-based encryption that will include elements of quantum computing. 1126 01:00:16,400 --> 01:00:18,960 Broadband will become more and more broad and ubiquitous. 1127 01:00:19,180 --> 01:00:25,500 And I think one key thing that as we have that more broadband and we're able to protect data more effectively, 1128 01:00:25,720 --> 01:00:29,980 physical possession of things will continue to lose value. 1129 01:00:30,140 --> 01:00:36,280 And access to the information is really going to be the currency as we continue through the 21st century. 1130 01:00:36,300 --> 01:00:39,160 The example I'll give, so my undergrad's in music, right? 1131 01:00:39,220 --> 01:00:47,040 So if I asked you to guess what my CD collection looked like, you might think it's pretty impressive because I really, really like music. 1132 01:00:47,300 --> 01:00:52,260 Well, the fact of the matter is I don't own a single CD anymore at all. 1133 01:00:52,600 --> 01:00:55,640 Now, I have access to lots and lots of music. 1134 01:00:55,680 --> 01:01:03,460 But it's all through music services or data that's stored in various cloud sorts of things and concepts like that. 1135 01:01:03,600 --> 01:01:06,280 So I no longer care that I have access. 1136 01:01:06,820 --> 01:01:15,680 Rather, I'm more concerned that I just have access to the information so that I can consume it in a meaningful way. 1137 01:01:18,660 --> 01:01:24,700 Infosec challenges seem like they keep moving up the OSI model from layer three. 1138 01:01:25,000 --> 01:01:28,960 I mean, network-based attacks are certainly still a real thing, and they're going to continue. 1139 01:01:30,640 --> 01:01:31,340 Excuse me. 1140 01:01:32,360 --> 01:01:35,840 But I think we're, you know, we obviously, you know, with web applications, 1141 01:01:36,580 --> 01:01:45,720 testing being a big deal these days, I think we're going to continue to see as we move security models up to the top of the OSI stack 1142 01:01:45,720 --> 01:01:49,500 that we're going to continue to see attacks against specific applications. 1143 01:01:49,880 --> 01:01:55,340 So just as we have, you know, smart highways, as I mentioned, and self-driving cars, 1144 01:01:55,400 --> 01:02:01,640 I think with the Internet 2 project where they're trying to basically replicate the Internet infrastructure, 1145 01:02:04,160 --> 01:02:06,280 I think we're, you know, redoing that. 1146 01:02:06,300 --> 01:02:10,840 Using it with modern materials, as it were, and modern protocols is going to be a big part of the solution. 1147 01:02:11,840 --> 01:02:17,440 But I think it's still up to us to try and think about these things and go through these, you know, thought experiments 1148 01:02:17,440 --> 01:02:25,340 and try and anticipate what, you know, what are the bad guys going to do next to coerce our users into silly things. 1149 01:02:25,500 --> 01:02:31,620 And to that point, you know, even with, you know, cars that have autopilot or self-driving cars, 1150 01:02:31,780 --> 01:02:35,660 do you think that there will still be traffic accidents in the future? 1151 01:02:36,300 --> 01:02:39,760 Do you think that there will ever be a time where there's never, ever a traffic accident again? 1152 01:02:40,280 --> 01:02:43,400 I'm cynical enough that I don't think that's ever going to happen 1153 01:02:43,400 --> 01:02:47,000 because people are still going to be capable of making poor decisions 1154 01:02:47,000 --> 01:02:52,940 and doing dumb things that will result in equipment malfunctioning and bad things happening. 1155 01:02:54,280 --> 01:03:00,840 So I think, you know, similarly with even no matter how, you know, many hoops we make our users jump through 1156 01:03:00,840 --> 01:03:06,280 to authenticate properly or to make sure that their data is protected, you know, 1157 01:03:06,300 --> 01:03:12,240 all of us, every single one of us, me and everyone in this room, we are capable of making poor decisions and doing silly things. 1158 01:03:12,420 --> 01:03:18,700 So even as the technology advances, I think the problem is just going to keep, you know, slipping away from us 1159 01:03:18,700 --> 01:03:22,140 and making us having to work harder to provide that protection. 1160 01:03:22,340 --> 01:03:31,300 So to sum it up, I think, as security professionals, our charge is not only to understand how the technology works 1161 01:03:31,300 --> 01:03:35,060 but how people interact with it because very often, 1162 01:03:35,060 --> 01:03:42,420 it's not that technology is broken as such but we, somebody figures out that it's a good technology 1163 01:03:42,420 --> 01:03:47,580 that it was implemented poorly or it's a good technology but the users are doing silly things 1164 01:03:47,580 --> 01:03:52,560 or that they can be tricked into divulging information that's useful to the bad guys. 1165 01:03:52,840 --> 01:03:59,980 So I guess the good news is, is that we will have jobs certainly for the foreseeable future. 1166 01:04:00,300 --> 01:04:05,040 But I think if we consider the story of how these companies, 1167 01:04:05,060 --> 01:04:10,380 these two huge infrastructures started in one place, ended up in a very, very different place, 1168 01:04:10,620 --> 01:04:16,560 we can see that it's a very similar trajectory that's taking and hopefully that will be useful 1169 01:04:16,560 --> 01:04:23,620 as this conversation continues as we go back to work and move through our careers. 1170 01:04:23,860 --> 01:04:26,800 So that's basically what I've got. 1171 01:04:26,920 --> 01:04:30,420 I certainly appreciate you all showing up and listening to this. 1172 01:04:30,520 --> 01:04:34,320 I'll be around for a bit after here and of course around the wall of sheep. 1173 01:04:34,320 --> 01:04:38,640 If anyone wants to get in touch, that's me. 1174 01:04:38,940 --> 01:04:42,360 My contact information is in that QR code. 1175 01:04:42,660 --> 01:04:45,700 I promise I didn't put anything malicious in it. 1176 01:04:46,460 --> 01:04:47,460 This is DEF CON. 1177 01:04:47,620 --> 01:04:48,560 But yeah, that's me. 1178 01:04:48,700 --> 01:04:50,720 If there's comments or questions, I'm happy to answer them. 1179 01:04:50,780 --> 01:04:53,540 Otherwise, enjoy the rest of DEF CON 24. 1180 01:04:53,740 --> 01:04:54,640 Thank you very much. 1181 01:05:00,620 --> 01:05:02,200 So it's almost the evening. 1182 01:05:03,040 --> 01:05:04,300 So thanks for coming. 1183 01:05:04,320 --> 01:05:08,660 Thanks for hanging in there with us for the Packet Hacking Village. 1184 01:05:10,680 --> 01:05:12,640 Gee, the whole day. 1185 01:05:12,920 --> 01:05:17,880 And again, we're very overwhelmed and we are absolutely amazed by your support. 1186 01:05:18,060 --> 01:05:19,580 So thank you all for being here. 1187 01:05:21,520 --> 01:05:22,960 Again, yes, I see. 1188 01:05:23,920 --> 01:05:29,120 So I guess I want to take some time, a quick moment, to introduce the next speaker. 1189 01:05:29,360 --> 01:05:32,120 Who here was at B-Sides Las Vegas this year? 1190 01:05:32,720 --> 01:05:33,200 Okay. 1191 01:05:33,200 --> 01:05:34,580 So you were at B-Sides. 1192 01:05:34,620 --> 01:05:38,480 You may have seen this talk at Proving Ground. 1193 01:05:38,800 --> 01:05:46,480 So at the Proving Ground track, you know, one of the talks on the Wednesday was on dorking. 1194 01:05:47,760 --> 01:05:54,360 And now it is my pleasure to introduce Philippe Risolo, flying in from Sweden. 1195 01:05:55,540 --> 01:05:56,740 Flying in from Sweden. 1196 01:05:57,080 --> 01:05:58,920 And he's going to talk about dorking. 1197 01:05:59,080 --> 01:06:00,620 So without much ado, Philippe. 1198 01:06:03,200 --> 01:06:03,620 Thank you. 1199 01:06:04,420 --> 01:06:06,880 So this talk is not going to run for 50 minutes. 1200 01:06:07,080 --> 01:06:09,160 It might run 15 minutes. 1201 01:06:10,620 --> 01:06:16,340 When I did this at B-Sides, they started me off 10 minutes early due to a scheduling issue. 1202 01:06:16,500 --> 01:06:19,640 So I ended up at five past, ten past three. 1203 01:06:21,560 --> 01:06:22,200 All right. 1204 01:06:22,780 --> 01:06:27,300 I'm going to introduce a little tool that I built for collecting dorking results. 1205 01:06:28,640 --> 01:06:32,340 I'll briefly explain what dorking is if someone doesn't know about it. 1206 01:06:34,140 --> 01:06:36,100 So my name is Philippe Risolo. 1207 01:06:37,080 --> 01:06:39,460 I'm a security researcher at Recorded Future. 1208 01:06:39,740 --> 01:06:46,720 I used to be a software engineer in the linguistics department as well as a data scientist for a few years. 1209 01:06:48,940 --> 01:06:51,720 I'm going to start off by introducing dorking. 1210 01:06:51,760 --> 01:06:57,360 I'm going to look at a few of the tools that I saw when I wanted to do this. 1211 01:06:57,500 --> 01:06:59,860 And then I'll introduce Dorky, as it's known. 1212 01:07:00,340 --> 01:07:02,660 And then some future stuff, like some issues. 1213 01:07:03,200 --> 01:07:06,440 And what I would like to see in the future. 1214 01:07:06,620 --> 01:07:12,280 This is an open source project, so it would be great if any of you have a need to collect dorking results. 1215 01:07:12,520 --> 01:07:13,520 It would be great if you used it. 1216 01:07:13,880 --> 01:07:15,840 Send me some feedback or help with the code. 1217 01:07:18,640 --> 01:07:24,680 So search engine hacking is, which is called dorking as well. 1218 01:07:24,820 --> 01:07:29,040 It's a way of exposing compromised or poorly configured servers. 1219 01:07:30,320 --> 01:07:33,020 It basically revolves around doing clever Google searches. 1220 01:07:33,200 --> 01:07:36,560 Looking at the results and then I'll show an example of a dork. 1221 01:07:38,180 --> 01:07:40,560 As Ming said, it's been around for ages. 1222 01:07:41,360 --> 01:07:46,300 2002 was when it sort of took off when Johnny Long started collecting dorks on a website. 1223 01:07:47,400 --> 01:07:52,200 And this sort of morphed into what's now known as the Google Hacking Database that some of you may have seen. 1224 01:07:54,540 --> 01:07:58,240 So this is what the Johnny Long page looked like. 1225 01:07:58,420 --> 01:08:00,520 It also explains why it's called a dork. 1226 01:08:01,160 --> 01:08:02,280 So a Google dork. 1227 01:08:02,280 --> 01:08:05,620 An inept or foolish person as revealed by Google. 1228 01:08:06,600 --> 01:08:10,200 You can see the top one there is SQL data dumps. 1229 01:08:12,060 --> 01:08:19,320 And that page has turned into this, which is a nice looking website hosted on at exploit DB. 1230 01:08:21,300 --> 01:08:23,520 New dorks are added every few days. 1231 01:08:23,880 --> 01:08:31,620 It sort of corresponds with whenever new vulnerabilities are released, people might craft together a good dork just to find vulnerable servers. 1232 01:08:34,060 --> 01:08:34,880 Here's an example. 1233 01:08:35,060 --> 01:08:41,260 I don't know if you can see it, but it says a Google search for intitle hamdida x shell backdoor. 1234 01:08:41,680 --> 01:08:43,140 And this is the type of web shell. 1235 01:08:44,540 --> 01:08:51,240 And doing this, the search finds 19 results of hosts that are compromised that you can collect through here. 1236 01:08:51,460 --> 01:08:56,500 I don't know if there's a username and password on these, but you have access to the hosts. 1237 01:08:59,560 --> 01:09:05,260 So since this has been around since 2002, it shouldn't be an issue anymore, but it still is. 1238 01:09:06,740 --> 01:09:07,940 There's the Internet of Things. 1239 01:09:08,060 --> 01:09:09,420 You could be DDoSed by toasters. 1240 01:09:10,700 --> 01:09:12,340 People put webcams up there. 1241 01:09:12,520 --> 01:09:13,800 No password, no username. 1242 01:09:16,240 --> 01:09:19,980 You can find ICS systems on there, industrial control systems. 1243 01:09:21,000 --> 01:09:22,480 And really nothing has changed. 1244 01:09:22,740 --> 01:09:26,480 The more stuff we put online, people aren't really paying attention to it. 1245 01:09:26,480 --> 01:09:28,460 And they're not really paying attention and securing their setups. 1246 01:09:29,800 --> 01:09:35,820 So I was looking to find a good example of where dorking matters. 1247 01:09:36,320 --> 01:09:40,880 Here we have an example of Google search technique aided New York dam hacker in Iran. 1248 01:09:42,000 --> 01:09:46,880 Basically someone gained access to a water plant system, I think. 1249 01:09:47,960 --> 01:09:49,180 That was cool, I thought. 1250 01:09:49,420 --> 01:09:51,860 And then I looked at the date it was published. 1251 01:09:52,020 --> 01:09:54,540 It was a few months ago, March 2016. 1252 01:09:55,960 --> 01:09:57,400 So it's still an issue. 1253 01:09:57,520 --> 01:09:58,860 And we haven't fixed anything. 1254 01:10:00,000 --> 01:10:03,840 So when most people think about dorking, they think about Google. 1255 01:10:05,980 --> 01:10:09,740 Just to give an example of the sort of differences between Google and Bing. 1256 01:10:10,260 --> 01:10:11,640 I do a little bit more. 1257 01:10:11,780 --> 01:10:13,660 I do Shodan as well in this project. 1258 01:10:13,820 --> 01:10:14,560 I'll get into that. 1259 01:10:15,340 --> 01:10:17,900 But Google has a great advanced query language. 1260 01:10:19,640 --> 01:10:21,900 And they don't filter their results as much. 1261 01:10:22,120 --> 01:10:23,540 Bing filters a ton of results. 1262 01:10:23,540 --> 01:10:27,680 And you can't search for SQL files, for example, because they filter it out. 1263 01:10:29,940 --> 01:10:34,260 The flip side, though, is that Google no longer has a search API. 1264 01:10:35,920 --> 01:10:40,920 So if you wanted to look at Google results, you will have to scrape it and use a thousand proxies. 1265 01:10:43,120 --> 01:10:46,660 On the other, Bing offers a very good one, a good API. 1266 01:10:48,400 --> 01:10:52,620 So what I wanted to do when I started this project is, 1267 01:10:53,540 --> 01:10:58,040 I would like these dorking results in a database that I could use to alert on. 1268 01:10:58,260 --> 01:11:02,420 Because I want to know if a certain site appears in a dorking result. 1269 01:11:02,700 --> 01:11:03,820 I want to send out an alert. 1270 01:11:05,280 --> 01:11:09,100 And the tools that I found, they were all sort of focused on single use. 1271 01:11:09,860 --> 01:11:12,680 So you input your query and you run it. 1272 01:11:12,780 --> 01:11:13,680 And you look at the results. 1273 01:11:13,920 --> 01:11:14,920 And then you take action. 1274 01:11:16,760 --> 01:11:20,220 And most of them didn't seem to have open source anywhere. 1275 01:11:21,200 --> 01:11:23,380 There is a cool one. 1276 01:11:23,380 --> 01:11:25,540 But I can't find any updates to it. 1277 01:11:25,660 --> 01:11:26,880 And it looks like it's dead. 1278 01:11:27,540 --> 01:11:28,660 That was closed source. 1279 01:11:28,900 --> 01:11:30,840 But it's a neat project. 1280 01:11:32,880 --> 01:11:34,660 That's why I built Dorky. 1281 01:11:37,060 --> 01:11:38,040 It's a great name. 1282 01:11:38,120 --> 01:11:39,240 And it's got a great logo. 1283 01:11:43,620 --> 01:11:45,220 It's basically two components. 1284 01:11:46,100 --> 01:11:47,140 Oh, sorry. 1285 01:11:48,540 --> 01:11:49,520 Is this better? 1286 01:11:50,100 --> 01:11:50,620 Woo! 1287 01:11:50,620 --> 01:11:50,680 Woo! 1288 01:11:52,780 --> 01:11:58,840 So Dorky is split into two components talking through a Mongo database. 1289 01:11:59,200 --> 01:12:03,040 It's a web UI where you manage your dorks. 1290 01:12:03,040 --> 01:12:04,560 You can look at the results if you wanted to. 1291 01:12:05,120 --> 01:12:07,140 But that's not the core intention of it. 1292 01:12:07,880 --> 01:12:11,940 And then there's the runner, which is basically what executes the queries. 1293 01:12:12,400 --> 01:12:15,940 So in the Mongo database, you store queries of different types. 1294 01:12:16,580 --> 01:12:19,820 The runner grabs all the dorks that are available. 1295 01:12:20,620 --> 01:12:22,220 Runs the correct search engine. 1296 01:12:22,660 --> 01:12:24,280 Saves the results to the Mongo database. 1297 01:12:25,540 --> 01:12:26,800 And it waits a little bit. 1298 01:12:26,900 --> 01:12:27,920 And then it does it all over again. 1299 01:12:28,560 --> 01:12:30,000 It's not rocket science. 1300 01:12:32,620 --> 01:12:35,040 So architecture-wise, it's built in Python. 1301 01:12:37,060 --> 01:12:38,540 Mostly because I like Python. 1302 01:12:38,800 --> 01:12:39,520 It's widely used. 1303 01:12:39,740 --> 01:12:40,720 A lot of people know it. 1304 01:12:42,780 --> 01:12:44,540 Mongo, it's very easy to set up. 1305 01:12:45,380 --> 01:12:47,860 Easy to develop against on pros and cons. 1306 01:12:48,180 --> 01:12:49,140 It has no schema. 1307 01:12:49,220 --> 01:12:50,380 So you can sort of... 1308 01:12:50,380 --> 01:12:53,340 Go wild west while developing, which is a good thing. 1309 01:12:53,380 --> 01:12:55,060 It might be a bad thing eventually. 1310 01:12:55,320 --> 01:12:56,140 But for now, it's good. 1311 01:12:56,620 --> 01:13:00,120 And then for the web server, for the management UI, I used Worksog. 1312 01:13:00,280 --> 01:13:02,920 Which is basically what powers Flask. 1313 01:13:03,000 --> 01:13:04,200 It's a lightweight version. 1314 01:13:04,820 --> 01:13:06,520 And it's very nice to use. 1315 01:13:07,960 --> 01:13:09,060 So I included... 1316 01:13:10,020 --> 01:13:12,240 I've included code for scraping Google. 1317 01:13:12,460 --> 01:13:14,780 Doing the Bing via the API searches. 1318 01:13:15,240 --> 01:13:18,480 Google custom search, which is something you can set up for... 1319 01:13:19,700 --> 01:13:20,480 Specific sites. 1320 01:13:20,700 --> 01:13:24,820 And then they give you sort of a little mini version of Google for specific keywords or sites. 1321 01:13:25,740 --> 01:13:29,960 And you can configure it through some trickery to search the whole web. 1322 01:13:30,100 --> 01:13:32,320 But you get very limited results back. 1323 01:13:33,360 --> 01:13:35,040 And then I also included Shodan. 1324 01:13:35,320 --> 01:13:40,900 If you guys don't know what Shodan is, it's basically a searchable end map. 1325 01:13:41,700 --> 01:13:43,820 They scan the web for open ports. 1326 01:13:44,080 --> 01:13:45,260 They collect the results. 1327 01:13:46,020 --> 01:13:47,320 And they cache them. 1328 01:13:51,400 --> 01:13:54,180 So sort of to look a little bit at what the UI looks like. 1329 01:13:54,220 --> 01:13:55,520 I'll show the UI as well. 1330 01:13:57,600 --> 01:13:58,880 Adding a dork is quite simple. 1331 01:13:59,040 --> 01:13:59,760 You add a query. 1332 01:14:00,000 --> 01:14:01,560 You add a description if you want to. 1333 01:14:01,640 --> 01:14:02,620 You put it in a category. 1334 01:14:03,940 --> 01:14:07,220 You can give it a source if you find it on a specific site. 1335 01:14:07,460 --> 01:14:09,540 And you pick which search engine you use. 1336 01:14:11,460 --> 01:14:14,440 After you add it, it pops up in this little list down here. 1337 01:14:17,100 --> 01:14:18,460 And as soon as the run starts... 1338 01:14:18,460 --> 01:14:22,580 As soon as the runner pulls this query and runs it, you get some results. 1339 01:14:22,880 --> 01:14:25,080 In this case, it's a webcam query for Shodan. 1340 01:14:26,620 --> 01:14:31,140 And you can see the IPs and ports as well as the banners being returned. 1341 01:14:31,760 --> 01:14:35,340 But in the Mongo database, you actually get the full results stored. 1342 01:14:35,500 --> 01:14:37,180 So you can go back to it later. 1343 01:14:40,760 --> 01:14:47,020 Let me go through the slides so I can show what it looks like afterwards. 1344 01:14:48,460 --> 01:14:50,140 As far as configuration goes, it's quite easy to set up. 1345 01:14:50,240 --> 01:14:50,960 You need a Mongo database. 1346 01:14:51,340 --> 01:14:52,820 You need to stack with search engines. 1347 01:14:52,920 --> 01:14:56,060 You want to run API keys if you're going to use any of those. 1348 01:14:56,520 --> 01:14:57,620 You need proxies. 1349 01:14:58,000 --> 01:15:00,660 You don't need a thousand, but a handful are good. 1350 01:15:01,780 --> 01:15:05,940 And as well as filtering, because a lot of the results you get back are not... 1351 01:15:06,400 --> 01:15:07,680 They won't be perfect. 1352 01:15:07,940 --> 01:15:09,420 And you need to filter some results out. 1353 01:15:10,140 --> 01:15:13,740 For example, you don't want to get the Google hacking database returned as a result. 1354 01:15:13,940 --> 01:15:15,340 That would be pointless. 1355 01:15:17,720 --> 01:15:20,660 Uncertain keywords, dorking, maybe hacking, et cetera. 1356 01:15:22,940 --> 01:15:27,580 And as I said, some of the results can be quite noisy. 1357 01:15:27,820 --> 01:15:28,980 It depends on your query. 1358 01:15:30,520 --> 01:15:32,560 There's the issue of rate limiting and API costs. 1359 01:15:33,240 --> 01:15:39,180 If you were to run the Bing API for all the queries that are in the Google hacking database, it would be expensive. 1360 01:15:40,200 --> 01:15:42,600 And if you have that sort of budget, go for it. 1361 01:15:42,680 --> 01:15:44,540 But I don't. 1362 01:15:46,700 --> 01:15:50,240 And I think the big issue is why... 1363 01:15:50,240 --> 01:15:57,020 The reason why a lot of these tools have sort of sprung up and then they died is because they require continuous maintenance. 1364 01:15:57,320 --> 01:16:03,560 Because if Google removes their API, for example, then I saw a ton of tools just wham. 1365 01:16:04,960 --> 01:16:08,760 And if they change their website layout, for example, then I need to update the scraper. 1366 01:16:11,800 --> 01:16:12,760 But hopefully... 1367 01:16:12,760 --> 01:16:17,380 I'm using this in my company production system right now. 1368 01:16:17,540 --> 01:16:22,940 So hopefully it will keep getting updates and won't die. 1369 01:16:25,580 --> 01:16:27,640 So some of the future work here. 1370 01:16:27,740 --> 01:16:29,700 I would like to add more search engines. 1371 01:16:31,440 --> 01:16:34,520 GitHub, VirusTotal, Hybrid Analysis are some examples. 1372 01:16:37,080 --> 01:16:39,680 There's some need to improve the logging and error handling. 1373 01:16:39,920 --> 01:16:42,640 I've been working on it. 1374 01:16:42,760 --> 01:16:43,780 But it's not perfect. 1375 01:16:45,840 --> 01:16:48,920 Then adding a pipe to Elasticsearch would be very cool. 1376 01:16:49,720 --> 01:16:54,640 So I pipe this data into my company system so I can set up alerts in there. 1377 01:16:55,620 --> 01:17:06,160 If you don't have access to recorded future on a developer level, which you don't unless you sign up for a job, you need some other way of alerting. 1378 01:17:09,740 --> 01:17:12,740 And if you wanted to take a look at it, it's on GitHub. 1379 01:17:12,740 --> 01:17:15,900 GitHub.com slash recorded future slash dorky. 1380 01:17:15,900 --> 01:17:16,780 It's MIT licensed. 1381 01:17:16,960 --> 01:17:20,560 So go ahead and steal the code and use it. 1382 01:17:21,280 --> 01:17:23,800 And if you have any questions, this is my personal e-mail address. 1383 01:17:24,780 --> 01:17:25,960 Freeslough at gmail.com. 1384 01:17:30,160 --> 01:17:32,180 I told you this would be painless and quick. 1385 01:17:35,940 --> 01:17:36,500 All right. 1386 01:17:37,180 --> 01:17:37,900 Adjusting the image. 1387 01:17:39,880 --> 01:17:41,420 So this is what the UI looks like. 1388 01:17:41,420 --> 01:17:47,420 I have added, I have scripts that pull in the entire Google hacking database and imports it into this database. 1389 01:17:49,460 --> 01:17:50,920 If you wanted to run all of them. 1390 01:17:52,980 --> 01:17:56,120 But I do, what I run, this is not the production system. 1391 01:17:56,360 --> 01:17:57,920 This is my local version running. 1392 01:17:58,160 --> 01:18:00,520 I'm not on the Wi-Fi, so I won't show you the actual running. 1393 01:18:00,880 --> 01:18:01,580 I apologize. 1394 01:18:04,500 --> 01:18:08,160 So, for example, if we wanted to enable one of these queries. 1395 01:18:08,160 --> 01:18:12,060 For example, some money broker's account. 1396 01:18:13,300 --> 01:18:14,080 We hit it. 1397 01:18:14,140 --> 01:18:14,980 It would be enabled. 1398 01:18:15,160 --> 01:18:20,280 And the next time the runner goes through this, it will execute the query and it will collect the results. 1399 01:18:23,680 --> 01:18:26,320 And here we have the webcam query from Shodan. 1400 01:18:26,500 --> 01:18:29,720 It's basically searching for server SQ webcam. 1401 01:18:30,640 --> 01:18:31,900 I stole it. 1402 01:18:31,940 --> 01:18:34,800 It was the top webcam query on the Shodan website. 1403 01:18:36,180 --> 01:18:37,480 We could look at the results. 1404 01:18:37,480 --> 01:18:40,140 We get a whole bunch of them back. 1405 01:18:40,280 --> 01:18:41,920 So if anyone wants to look at some webcams. 1406 01:18:41,940 --> 01:18:42,540 Here you go. 1407 01:18:47,980 --> 01:18:48,420 Yeah. 1408 01:18:48,540 --> 01:18:50,080 That was all I had to say. 1409 01:18:50,320 --> 01:18:52,300 And if you have any questions, please go ahead. 1410 01:19:02,420 --> 01:19:06,640 So the question was, if Shodan lists these webcams. 1411 01:19:06,640 --> 01:19:09,540 Can you go to any of these webcams and just look at the images? 1412 01:19:09,780 --> 01:19:10,520 You can. 1413 01:19:11,920 --> 01:19:14,480 There are a few that have a username and password protection. 1414 01:19:14,700 --> 01:19:17,100 But there's a ton of unprotected webcams out there. 1415 01:19:17,300 --> 01:19:22,360 You can spend a whole evening looking at garages and people's living rooms. 1416 01:19:22,560 --> 01:19:23,300 Don't do that. 1417 01:19:25,540 --> 01:19:26,220 But yes. 1418 01:19:26,500 --> 01:19:28,340 There's a ton of information out there. 1419 01:19:29,880 --> 01:19:30,780 Especially on Shodan. 1420 01:19:33,660 --> 01:19:34,520 Anything else? 1421 01:19:37,260 --> 01:19:37,620 Sorry? 1422 01:19:39,320 --> 01:19:39,680 Senses? 1423 01:19:40,640 --> 01:19:42,140 I haven't looked at it, no. 1424 01:19:46,400 --> 01:19:46,760 Cool. 1425 01:19:47,860 --> 01:19:48,660 I'll check it out. 1426 01:19:54,440 --> 01:19:54,800 YS. 1427 01:19:54,960 --> 01:19:55,320 Senses. 1428 01:19:55,620 --> 01:19:55,880 Okay. 1429 01:19:56,520 --> 01:19:56,880 C. 1430 01:19:57,020 --> 01:19:57,380 Yeah. 1431 01:19:57,400 --> 01:19:57,520 Okay. 1432 01:19:57,580 --> 01:19:58,140 I'll check it out. 1433 01:19:58,200 --> 01:19:58,560 Thank you. 1434 01:20:00,440 --> 01:20:00,800 Yep. 1435 01:20:10,840 --> 01:20:15,920 So the question was, or the question was, I said that Bing filters 1436 01:20:15,920 --> 01:20:18,580 results and Google doesn't. 1437 01:20:18,580 --> 01:20:20,440 And the question was, why don't they? 1438 01:20:20,660 --> 01:20:27,920 I think for Bing it's that they, I think they filter results out. 1439 01:20:28,020 --> 01:20:29,200 They put an effort into it. 1440 01:20:29,300 --> 01:20:32,980 I don't think Google has the sort of impetus to do it. 1441 01:20:34,560 --> 01:20:36,560 For Bing it's also a result. 1442 01:20:36,560 --> 01:20:39,440 They're like worse advanced query language. 1443 01:20:39,560 --> 01:20:41,820 You can't search for file type SQL, for example. 1444 01:20:43,120 --> 01:20:47,680 They only support PDF and like the standard formats, like the Office documents and things. 1445 01:20:50,980 --> 01:20:51,500 Oh, yeah. 1446 01:20:51,840 --> 01:20:53,000 No, no, no, no, no, no. 1447 01:20:53,380 --> 01:20:58,180 You have a way to set it towards specific posts or like any sense. 1448 01:20:58,400 --> 01:21:00,300 But also is there a way to put it out? 1449 01:21:01,960 --> 01:21:06,300 So the question was if there's a way to put it towards specific hosts. 1450 01:21:06,360 --> 01:21:06,540 Yeah. 1451 01:21:06,560 --> 01:21:08,820 I mean, you could update the code to do this. 1452 01:21:09,720 --> 01:21:11,960 Or you could just add that to your queries. 1453 01:21:12,380 --> 01:21:15,140 Just search for these sites or this site. 1454 01:21:17,140 --> 01:21:20,080 Exporting the data out, I use it in the Mongo database. 1455 01:21:20,400 --> 01:21:22,460 I'm comfortable with using it in the Mongo database. 1456 01:21:23,180 --> 01:21:27,520 If you would like to write a CSV export or whatever, please do. 1457 01:21:31,400 --> 01:21:32,220 Anything else? 1458 01:21:35,000 --> 01:21:35,660 All right. 1459 01:21:35,800 --> 01:21:38,160 Thank you very much for spending time here with me. 1460 01:21:39,140 --> 01:21:39,580 Okay. 1461 01:21:44,940 --> 01:21:46,500 It is now 510. 1462 01:21:47,160 --> 01:21:52,460 And it is my pleasure to introduce to you the next speaker from Austin, Texas, Garrett Montgomery. 1463 01:21:53,120 --> 01:21:53,560 Hi. 1464 01:21:54,300 --> 01:21:54,740 Hello. 1465 01:21:54,860 --> 01:21:55,300 Thank you. 1466 01:21:58,680 --> 01:22:00,740 So I'm going to talk about myself for a second. 1467 01:22:00,820 --> 01:22:01,820 My name is Garrett Montgomery. 1468 01:22:02,220 --> 01:22:02,940 I'm a security researcher. 1469 01:22:03,280 --> 01:22:05,620 I work at Breaking Point, now a part of ICSIA. 1470 01:22:05,800 --> 01:22:07,860 And I focus on the security side of the house. 1471 01:22:08,800 --> 01:22:13,800 Prior to my work at Breaking Point, I was a signature developer for an IPS company. 1472 01:22:14,440 --> 01:22:17,760 And prior to that, I worked as a snort analyst for the military. 1473 01:22:18,020 --> 01:22:19,140 So I have some background. 1474 01:22:19,400 --> 01:22:21,460 And I'd like to think that I know what I'm talking about. 1475 01:22:21,600 --> 01:22:22,860 Hopefully by the end you'll agree. 1476 01:22:25,280 --> 01:22:25,720 Okay. 1477 01:22:25,780 --> 01:22:30,320 So today we're going to talk about what is a protection device, at least from my perspective. 1478 01:22:30,320 --> 01:22:32,740 Why people should care about defense in depth. 1479 01:22:33,460 --> 01:22:37,020 What do you mean my protection device isn't protecting me? 1480 01:22:37,340 --> 01:22:37,960 Shocker, right? 1481 01:22:38,500 --> 01:22:41,960 So I'm going to talk about my testing setup because I'm fairly proud of it. 1482 01:22:42,520 --> 01:22:44,720 I'll talk about some of the initial results we've got. 1483 01:22:45,860 --> 01:22:51,320 I will cover why we don't have specifics on your particular protection device. 1484 01:22:51,600 --> 01:22:58,900 But I will talk about how you can get some of those results yourself for those with some budget, limited budget, and no budget. 1485 01:22:58,900 --> 01:23:03,860 And then I'll summarize at the end in case you guys have all forgotten what we're talking about. 1486 01:23:05,860 --> 01:23:12,960 So first off, for myself and the work that I do, we're looking at network-based protection devices. 1487 01:23:13,260 --> 01:23:18,460 These include IPS devices, next generation firewalls, unified threat management systems. 1488 01:23:18,880 --> 01:23:28,580 Basically anything that sits on the network that is supposed to block bad traffic one way or another, whether it's inline, layer 2, layer 3, layer 4, layer 5 in some cases. 1489 01:23:30,240 --> 01:23:36,640 And so we're looking at statistics and how well they do what they say they're going to do, which is protect you from the bad stuff. 1490 01:23:39,240 --> 01:23:43,520 So as an example, we have here IPS. 1491 01:23:46,140 --> 01:23:53,360 Devices that would sit here, next generation firewall, IPS, UTM, those are the devices that we're covering in this talk today. 1492 01:23:57,420 --> 01:23:57,860 So. 1493 01:23:58,900 --> 01:24:01,020 Some of you may recognize some of these. 1494 01:24:01,180 --> 01:24:12,060 They are lists of vulnerabilities that are claimed to be covered by network protection devices such as an IPS, next generation firewall, UTM. 1495 01:24:12,480 --> 01:24:14,300 There are various ways to find them. 1496 01:24:14,400 --> 01:24:16,520 Sometimes you can find them on a company website. 1497 01:24:16,840 --> 01:24:19,940 Sometimes you have to own the device and you have to know how to go and find it. 1498 01:24:20,420 --> 01:24:24,000 And so they provide a list of things they claim to protect you against. 1499 01:24:24,500 --> 01:24:28,100 So what we have done is tried to verify those claims. 1500 01:24:28,100 --> 01:24:30,360 You say you protect me against a certain vulnerability. 1501 01:24:30,700 --> 01:24:38,500 I expect you will protect me against all forms of that vulnerability and all exploits that may attempt to target that vulnerability. 1502 01:24:38,920 --> 01:24:41,720 And that's what the research is all about. 1503 01:24:44,580 --> 01:24:46,260 So protection is relative. 1504 01:24:47,140 --> 01:24:49,740 What do you mean I'm not protected against that exploit? 1505 01:24:50,160 --> 01:24:54,200 If you saw the previous list, you might think, oh, I have a great IPS. 1506 01:24:54,480 --> 01:24:56,320 They protect me from all these vulnerabilities. 1507 01:24:56,320 --> 01:25:01,480 And the only difference between them is maybe some devices have more protection. 1508 01:25:01,680 --> 01:25:03,300 They have more vulnerabilities on their list. 1509 01:25:03,400 --> 01:25:04,640 So that makes them better. 1510 01:25:04,720 --> 01:25:04,900 Right? 1511 01:25:05,780 --> 01:25:08,940 Well, I don't think that's going to be the case. 1512 01:25:12,840 --> 01:25:15,360 So there's a lot of different ways to exploit vulnerabilities. 1513 01:25:15,680 --> 01:25:21,540 You may see a public proof of concept which represents one type of exploit for that particular vulnerability. 1514 01:25:22,220 --> 01:25:25,960 So one of the things that I do at my job is to find all the other ways. 1515 01:25:25,960 --> 01:25:27,580 To exploit a particular vulnerability. 1516 01:25:28,040 --> 01:25:30,260 And believe me, it's a super fun job. 1517 01:25:30,420 --> 01:25:38,220 You spend a lot of time watching things crash, popping calc, and just riding on the coattails of others who do really cool exploit development work. 1518 01:25:38,440 --> 01:25:44,780 And all I have to do is just find the other hundred ways, a thousand ways that you can target a vulnerability. 1519 01:25:45,160 --> 01:25:46,780 And then we put that out as a product. 1520 01:25:48,740 --> 01:25:52,380 So, yes, some devices we'll find are better than others. 1521 01:25:54,720 --> 01:25:55,940 So my technique. 1522 01:25:55,940 --> 01:25:59,380 My testing framework is a dedicated security lab environment. 1523 01:25:59,820 --> 01:26:02,040 And that means I have hardware devices. 1524 01:26:02,200 --> 01:26:03,340 I have software devices. 1525 01:26:03,660 --> 01:26:04,940 I have a hardware switch. 1526 01:26:05,240 --> 01:26:07,560 I've got virtual networking via ESX. 1527 01:26:08,500 --> 01:26:13,180 We have a traffic generating device, which is where we generate our exploits. 1528 01:26:13,500 --> 01:26:16,240 Again, Breaking Point is the company that I work for. 1529 01:26:16,320 --> 01:26:17,780 We make a high throughput device. 1530 01:26:18,120 --> 01:26:21,920 Not that it's a sales pitch, but that's where I generated all my test data from. 1531 01:26:22,760 --> 01:26:25,140 So we've got eight of those in hardware. 1532 01:26:25,140 --> 01:26:27,180 And 12 of those virtualized devices. 1533 01:26:27,560 --> 01:26:29,980 We've got a layer three management switch for the hardware. 1534 01:26:30,840 --> 01:26:37,840 And we've got ESX networking where we can change the connections between the devices. 1535 01:26:38,140 --> 01:26:41,320 And so we have single paths in a virtual environment. 1536 01:26:41,520 --> 01:26:43,020 So you know where the traffic's going. 1537 01:26:43,220 --> 01:26:48,800 And you are verifying that the protection devices are seeing that traffic. 1538 01:26:51,640 --> 01:26:55,040 So what we've done in the hardware. 1539 01:26:55,040 --> 01:26:59,520 And the reason this is complicated is because I made do with what I have. 1540 01:26:59,700 --> 01:27:03,500 Many of you will probably have to do the same thing if you want to do some of this testing yourself. 1541 01:27:04,040 --> 01:27:05,640 You're probably not going to get a lot of budget. 1542 01:27:07,160 --> 01:27:09,940 Your superiors may say, we have an IPS device. 1543 01:27:10,120 --> 01:27:11,320 They're a Breaking Point customer. 1544 01:27:11,460 --> 01:27:12,620 Why should we do our own testing? 1545 01:27:12,780 --> 01:27:14,160 I'm sure they do all their own testing. 1546 01:27:14,240 --> 01:27:16,120 And they block everything that Breaking Point has, right? 1547 01:27:16,400 --> 01:27:18,320 No need to verify anything on your own. 1548 01:27:19,340 --> 01:27:23,180 So in order to prove the concept of my project, I found an old switch. 1549 01:27:25,040 --> 01:27:28,380 I have static MAC addresses on the input ports and the output ports. 1550 01:27:28,560 --> 01:27:30,500 And I use VLANs to segment the traffic. 1551 01:27:30,680 --> 01:27:37,460 And that's how I can direct traffic from any traffic generation device through a DUT, which is a device under test. 1552 01:27:38,320 --> 01:27:41,600 Back to the reception port to check whether the traffic got through or not. 1553 01:27:41,740 --> 01:27:46,040 And then back out if need be because some exploits, they start from the client side. 1554 01:27:46,160 --> 01:27:47,620 Sometimes they start from the server side. 1555 01:27:48,700 --> 01:27:50,060 So that's my setup. 1556 01:27:52,300 --> 01:27:52,780 Now. 1557 01:27:52,780 --> 01:27:56,760 I have a list of devices you guys are all likely familiar with. 1558 01:27:57,000 --> 01:27:59,340 These are included as part of our test bed. 1559 01:27:59,500 --> 01:28:01,940 Not all of them are included as part of the result set. 1560 01:28:02,180 --> 01:28:06,620 And I will not be talking about specific results because many of them are our partners. 1561 01:28:06,900 --> 01:28:18,420 And while I don't want to name and shame, I do want to point out that as a general rule or a class, a class of protection device, we are going to point out how well those devices are doing. 1562 01:28:18,660 --> 01:28:22,760 So that you can go follow up and say, my device falls into a certain class. 1563 01:28:22,780 --> 01:28:27,840 A class type like enterprise level or open source or it's a next generation firewall. 1564 01:28:28,860 --> 01:28:31,460 Maybe I should test my own device and check these results myself. 1565 01:28:31,980 --> 01:28:39,700 One of the things we plan to do is publish the test methodology so that if you are a breaking point customer, you can repeat these same results yourself. 1566 01:28:43,100 --> 01:28:50,920 So, unfortunately, the test devices in our lab did not perform as well as I would have hoped. 1567 01:28:50,920 --> 01:28:53,740 This is an initial look at the data. 1568 01:28:53,960 --> 01:28:57,020 Basically, I ran ten tests. 1569 01:28:57,200 --> 01:28:58,260 In some cases, 14. 1570 01:28:58,760 --> 01:29:05,920 I had many older devices that I didn't have the budget to update or I didn't have the time to update in time for this conference. 1571 01:29:07,420 --> 01:29:14,920 So we have test devices that were older and we only tested up to the age of their previous rule set update. 1572 01:29:15,300 --> 01:29:18,640 We have some test devices that are newer that had a limited demo license. 1573 01:29:18,860 --> 01:29:20,460 We couldn't fully test all of their features. 1574 01:29:20,920 --> 01:29:24,340 But if they're in line and they're claiming to be update, we use those results. 1575 01:29:24,900 --> 01:29:27,800 And we have some devices that we actually do have licensed. 1576 01:29:28,260 --> 01:29:31,740 So there is a good mix of results in here. 1577 01:29:31,860 --> 01:29:34,420 And as you can see, network layer attacks. 1578 01:29:34,620 --> 01:29:39,940 Those are things that I would say are TCP based, ICP based, maybe even ICMP. 1579 01:29:40,220 --> 01:29:48,640 Where you're looking at, say, buffer overflows in the option fields or out of bounds values in certain header fields. 1580 01:29:49,940 --> 01:29:50,660 Infrastructure layer. 1581 01:29:50,920 --> 01:29:55,920 Those bytes on the wire are basically fixed. 1582 01:29:56,100 --> 01:29:59,720 The only way to attack that is to have certain bad values in certain places. 1583 01:29:59,900 --> 01:30:02,440 And that's what a protection device would see on the wire. 1584 01:30:02,700 --> 01:30:07,620 I would expect a protection device that's network based to do a much better job than that. 1585 01:30:07,700 --> 01:30:09,760 We've got about a 16% detection ratio. 1586 01:30:10,380 --> 01:30:13,100 And it's possible I didn't configure it very well. 1587 01:30:13,360 --> 01:30:14,280 But guess what? 1588 01:30:14,400 --> 01:30:16,980 Not everybody has perfectly configured devices on their network. 1589 01:30:17,300 --> 01:30:20,900 If it's difficult to set up, then maybe your protection device isn't set up. 1590 01:30:20,920 --> 01:30:26,620 These results aren't invalid because I don't know how to set it up. 1591 01:30:26,760 --> 01:30:27,820 But I'm a customer. 1592 01:30:28,100 --> 01:30:34,400 And so I think the vendors need to do a better job of making it easier to configure and use their devices. 1593 01:30:34,820 --> 01:30:39,500 If they have better protection statistics in their own test labs. 1594 01:30:39,800 --> 01:30:41,700 And I'd like to think that they do have test labs. 1595 01:30:43,020 --> 01:30:43,900 So browsers. 1596 01:30:44,900 --> 01:30:48,800 HTML typically being served from a server where you have a client reach out and get it. 1597 01:30:48,880 --> 01:30:50,020 That's always hard for a firewall. 1598 01:30:50,020 --> 01:30:52,080 Because the connection comes from inside the network. 1599 01:30:52,640 --> 01:30:55,200 So this is going to be IPS protection alone. 1600 01:30:55,440 --> 01:30:56,780 We have a lot of strikes. 1601 01:30:57,260 --> 01:30:58,600 And these variants. 1602 01:30:59,060 --> 01:31:03,540 What I mean by that are the different ways that an exploit can target a vulnerability. 1603 01:31:04,060 --> 01:31:08,280 Some of these strikes which are exploits are they have many, many variations. 1604 01:31:08,440 --> 01:31:09,340 Hundreds or even thousands. 1605 01:31:09,640 --> 01:31:13,020 That are just significantly different enough to confuse an IPS. 1606 01:31:14,260 --> 01:31:16,580 And I'll be showing some examples of that later. 1607 01:31:17,700 --> 01:31:18,660 User applications. 1608 01:31:18,660 --> 01:31:20,320 Like Adobe. 1609 01:31:20,580 --> 01:31:24,840 They make a PDF application that some of you may use. 1610 01:31:25,400 --> 01:31:28,980 Flash is possibly considered a user application. 1611 01:31:29,240 --> 01:31:31,560 It may also be considered a browser based attack. 1612 01:31:31,680 --> 01:31:33,000 Because it typically comes from the browser. 1613 01:31:34,820 --> 01:31:37,340 Not surprisingly they did quite poorly in that. 1614 01:31:38,640 --> 01:31:39,200 Infrastructure. 1615 01:31:39,280 --> 01:31:46,520 What I mean by infrastructure are attacks that can come from somewhere on the network. 1616 01:31:46,680 --> 01:31:47,760 Or outside of the network. 1617 01:31:47,760 --> 01:31:53,060 That without having to be passed or interpreted or parsed can directly attack your servers. 1618 01:31:54,080 --> 01:31:55,100 Denial of service. 1619 01:31:55,320 --> 01:31:59,840 Or HTTP servers where you overflow a perimeter. 1620 01:32:00,400 --> 01:32:04,360 Those are things that basically an attacker can do is fire and forget. 1621 01:32:04,480 --> 01:32:06,620 They don't have to initiate any sessions. 1622 01:32:06,940 --> 01:32:10,280 They don't have to do much other than send bad stuff to the server. 1623 01:32:10,360 --> 01:32:11,720 And you crash the infrastructure. 1624 01:32:12,200 --> 01:32:16,500 These are particularly important for companies that like to keep an internet presence. 1625 01:32:16,620 --> 01:32:17,740 They want to have hosts that are alive. 1626 01:32:17,740 --> 01:32:18,260 On the internet. 1627 01:32:19,020 --> 01:32:20,120 So as you can see again. 1628 01:32:20,760 --> 01:32:21,960 They did a little bit better. 1629 01:32:22,220 --> 01:32:22,960 Which is good. 1630 01:32:23,140 --> 01:32:24,880 You want them to do well. 1631 01:32:25,040 --> 01:32:25,920 And we all want. 1632 01:32:26,100 --> 01:32:28,920 Everyone wants your IPS vendor to do well. 1633 01:32:28,980 --> 01:32:30,120 Because we all want to be secure. 1634 01:32:31,260 --> 01:32:37,580 So these results that I'm showing aren't to talk bad about a vendor. 1635 01:32:37,720 --> 01:32:39,540 Or say any particular vendor sucks. 1636 01:32:39,700 --> 01:32:40,880 Or that the technology is bad. 1637 01:32:41,160 --> 01:32:43,740 This is an attempt to raise awareness. 1638 01:32:44,260 --> 01:32:47,720 In the hopes that customers will go tell their vendors. 1639 01:32:47,720 --> 01:32:49,600 I can do a better job. 1640 01:32:49,800 --> 01:32:52,880 I saw this exploit being passed by the firewall. 1641 01:32:53,100 --> 01:32:53,780 Fix it. 1642 01:32:54,180 --> 01:33:00,120 I have a feeling that many customers will have much more effect. 1643 01:33:00,660 --> 01:33:02,280 And be heard by their vendors. 1644 01:33:02,420 --> 01:33:04,460 Than say a test company who makes a product. 1645 01:33:04,960 --> 01:33:07,560 And doesn't want to anger those partner customers. 1646 01:33:07,920 --> 01:33:10,600 So I want you guys to do my dirty work for me. 1647 01:33:10,780 --> 01:33:12,760 Go tell your vendors that they're doing poorly. 1648 01:33:12,920 --> 01:33:13,880 And you can prove it. 1649 01:33:14,280 --> 01:33:16,360 That's what we're going to continue talking about in the presentation. 1650 01:33:16,360 --> 01:33:19,180 How you guys can tell the vendors to get better. 1651 01:33:20,680 --> 01:33:22,080 So one example. 1652 01:33:22,440 --> 01:33:23,900 There is a vulnerability. 1653 01:33:24,260 --> 01:33:26,100 CVE 2015-099. 1654 01:33:26,820 --> 01:33:29,540 It is a browser based exploit. 1655 01:33:30,460 --> 01:33:31,020 Rstrike. 1656 01:33:31,180 --> 01:33:34,460 Which is what we call the attack. 1657 01:33:35,980 --> 01:33:36,820 288 variants. 1658 01:33:37,180 --> 01:33:40,820 And what we mean by that is different combinations of code placed in different places. 1659 01:33:41,100 --> 01:33:44,160 That fundamentally achieve the same thing. 1660 01:33:44,260 --> 01:33:46,180 They exploit the vulnerability in the same way. 1661 01:33:46,360 --> 01:33:48,400 But they show up on the network. 1662 01:33:48,500 --> 01:33:50,080 They traverse the network in a different way. 1663 01:33:50,280 --> 01:33:52,540 They are in the file in a slightly different way. 1664 01:33:55,400 --> 01:33:57,020 And we've lost. 1665 01:33:59,700 --> 01:34:00,340 It's back. 1666 01:34:00,600 --> 01:34:01,080 Okay. 1667 01:34:01,400 --> 01:34:02,500 So in this example. 1668 01:34:03,840 --> 01:34:08,360 We have browser based exploit. 1669 01:34:08,660 --> 01:34:11,680 Which was tied to CSS rules. 1670 01:34:12,260 --> 01:34:13,260 Cascading style sheets. 1671 01:34:14,600 --> 01:34:15,900 We have these arrows here. 1672 01:34:16,360 --> 01:34:19,200 They indicate the slight variations between the two exploits. 1673 01:34:19,240 --> 01:34:21,420 Which are two of the 288 variants. 1674 01:34:22,780 --> 01:34:23,780 You can see here. 1675 01:34:23,900 --> 01:34:25,460 There is a percentage value used. 1676 01:34:25,600 --> 01:34:26,280 And the other one. 1677 01:34:26,340 --> 01:34:27,600 We used a default value. 1678 01:34:29,020 --> 01:34:32,000 You have the animation specified below. 1679 01:34:32,200 --> 01:34:34,860 Versus animation specified in a different way. 1680 01:34:35,240 --> 01:34:36,920 So these show up on the wire. 1681 01:34:37,380 --> 01:34:40,640 And are inspected by protection devices in a slightly different manner. 1682 01:34:40,980 --> 01:34:43,980 But they are in the end interpreted by the browser in the same way. 1683 01:34:44,100 --> 01:34:45,360 So they hit the same vulnerability. 1684 01:34:46,360 --> 01:34:48,600 Just using a different attack vector. 1685 01:34:49,480 --> 01:34:50,360 And unfortunately. 1686 01:34:52,400 --> 01:34:53,480 They don't do so well. 1687 01:34:53,640 --> 01:34:54,480 What I found. 1688 01:34:54,540 --> 01:34:55,880 I posted a blog about this. 1689 01:34:56,000 --> 01:34:57,720 And that's why when you guys get the PowerPoint. 1690 01:34:57,980 --> 01:34:59,620 You can go look at my self promotion link. 1691 01:34:59,800 --> 01:35:01,100 Which is a previous blog post. 1692 01:35:01,240 --> 01:35:03,440 Where I talk specifically about this vulnerability. 1693 01:35:04,000 --> 01:35:04,540 In essence. 1694 01:35:05,780 --> 01:35:06,840 288 of them were blocked. 1695 01:35:08,260 --> 01:35:09,600 144 were blocked. 1696 01:35:09,700 --> 01:35:13,280 Because they triggered on a rule for JavaScript obfuscation. 1697 01:35:13,420 --> 01:35:14,240 That's all it looked for. 1698 01:35:14,340 --> 01:35:14,760 Was. 1699 01:35:16,720 --> 01:35:19,780 Lots of multiple encodings of JavaScript. 1700 01:35:20,080 --> 01:35:22,400 And for those of you who have looked at HTML source pages. 1701 01:35:22,620 --> 01:35:26,480 You will find that encoding JavaScript isn't a bad thing. 1702 01:35:26,540 --> 01:35:27,560 It's a very common practice. 1703 01:35:27,900 --> 01:35:31,720 And if you have an IPS where you're relying on JavaScript obfuscation. 1704 01:35:31,860 --> 01:35:35,020 You will probably find that you're going to get too many false positives. 1705 01:35:35,200 --> 01:35:36,460 And you're going to have to turn off this rule. 1706 01:35:37,320 --> 01:35:41,440 So this vulnerability would then be blocked zero times. 1707 01:35:42,380 --> 01:35:44,740 Because even without JavaScript obfuscation. 1708 01:35:45,700 --> 01:35:47,280 The IPS didn't block it. 1709 01:35:53,300 --> 01:35:53,820 Okay. 1710 01:35:53,960 --> 01:35:55,960 So I know it's very tiny print. 1711 01:35:56,160 --> 01:36:00,980 But that is the source code behind the Google.com homepage. 1712 01:36:01,220 --> 01:36:04,480 And that's the example of obfuscated JavaScript that I'm referring to. 1713 01:36:04,800 --> 01:36:06,420 There's a lot of JavaScript. 1714 01:36:06,560 --> 01:36:07,760 It's encoded for size. 1715 01:36:08,000 --> 01:36:10,960 It's also encoded in some cases to protect intellectual property. 1716 01:36:11,360 --> 01:36:14,400 Making it a little more difficult for somebody to copy your JavaScript. 1717 01:36:14,400 --> 01:36:17,180 So that's the type of stuff that you'll see on the wire. 1718 01:36:17,340 --> 01:36:21,480 Because you're looking at source when you're looking at packets that are going across the wire. 1719 01:36:21,640 --> 01:36:25,080 And it gets interpreted by the browser's nice clean Google page. 1720 01:36:26,460 --> 01:36:30,680 So obfuscated JavaScript is not a valid detection methodology. 1721 01:36:31,300 --> 01:36:34,260 Don't rely on obfuscated JavaScript to protect you from attacks. 1722 01:36:37,340 --> 01:36:39,000 So what about my device? 1723 01:36:39,260 --> 01:36:40,120 As I said. 1724 01:36:40,680 --> 01:36:43,400 We're not going to be releasing specific metrics. 1725 01:36:43,400 --> 01:36:46,600 And statistics on a per device basis. 1726 01:36:47,100 --> 01:36:48,880 But we will be talking about classes. 1727 01:36:49,700 --> 01:36:54,720 And that will be included in data that is hopefully going to be released by the end of the year. 1728 01:36:54,800 --> 01:36:55,380 For this talk. 1729 01:36:55,600 --> 01:37:00,540 We're going to just be talking about how you can apply some of the same principles that I use in my daily job. 1730 01:37:00,780 --> 01:37:02,100 To do some of this testing yourself. 1731 01:37:03,300 --> 01:37:04,900 So we've got direct firewall testing. 1732 01:37:05,420 --> 01:37:06,100 Demo testing. 1733 01:37:06,320 --> 01:37:07,440 And virtualized testing. 1734 01:37:09,400 --> 01:37:13,120 So if you are lucky enough where you have access to your own firewall. 1735 01:37:13,400 --> 01:37:18,160 You could hook up a couple of ports on each side of the inbound and outbound interfaces. 1736 01:37:18,520 --> 01:37:19,680 Maybe set up a VLAN. 1737 01:37:19,880 --> 01:37:24,180 And then use something like TCP replay with split interfaces. 1738 01:37:24,320 --> 01:37:25,280 And you could send the traffic. 1739 01:37:25,500 --> 01:37:26,940 You can send it from either side. 1740 01:37:27,220 --> 01:37:29,580 And you could see if your IPS is blocking it. 1741 01:37:30,200 --> 01:37:31,120 Not too difficult. 1742 01:37:31,660 --> 01:37:35,960 And if you had a public proof of concept on your laptop. 1743 01:37:36,060 --> 01:37:40,140 You can generate a PCAP from it by downloading it from somewhere. 1744 01:37:40,160 --> 01:37:41,980 If it's say an HTML based strike. 1745 01:37:41,980 --> 01:37:44,200 Or if it's any other type of exploit. 1746 01:37:44,300 --> 01:37:46,740 You could send it across the network and get a PCAP. 1747 01:37:46,980 --> 01:37:50,260 TCP replay that can then be used to send it out either interface. 1748 01:37:51,200 --> 01:37:57,880 So you can check whether your own IPS or protection device with your own configuration. 1749 01:37:58,020 --> 01:38:02,700 And you also get the benefit of seeing if next generation firewall type rules. 1750 01:38:02,860 --> 01:38:11,620 Such as IP block lists and application filtering help in preventing the traffic that's bad from passing through these interfaces. 1751 01:38:14,660 --> 01:38:17,600 So if you have a ESX host. 1752 01:38:17,960 --> 01:38:19,800 You might have a little bit more of a budget. 1753 01:38:19,980 --> 01:38:21,000 Maybe not a whole lot. 1754 01:38:21,160 --> 01:38:24,240 But you could do some configuration like we have. 1755 01:38:24,320 --> 01:38:25,940 We have limited budget. 1756 01:38:26,080 --> 01:38:27,900 But we managed to set up some virtual switches. 1757 01:38:28,440 --> 01:38:31,640 And then we have a large list of IPS devices. 1758 01:38:31,960 --> 01:38:36,940 And at this time we're configuring them where one at a time for each interface. 1759 01:38:37,040 --> 01:38:39,180 We hook it up to one of these switches. 1760 01:38:39,900 --> 01:38:41,900 And then we pass traffic from a server. 1761 01:38:41,980 --> 01:38:42,680 That has the bad stuff. 1762 01:38:42,800 --> 01:38:44,660 In our case these breaking point devices. 1763 01:38:44,860 --> 01:38:46,400 That can send a lot of bad stuff. 1764 01:38:46,920 --> 01:38:49,020 So we send traffic from one interface to the other. 1765 01:38:49,160 --> 01:38:50,680 It gets routed only to that dot. 1766 01:38:50,840 --> 01:38:51,600 And then it comes back. 1767 01:38:51,860 --> 01:38:54,360 And then we keep track of whether it blocked it or didn't block it. 1768 01:38:54,980 --> 01:38:56,760 You could do something similar in your own setups. 1769 01:38:59,960 --> 01:39:02,400 And Ansible is where we're migrating to. 1770 01:39:02,460 --> 01:39:05,420 Because I am a fan of automation. 1771 01:39:05,640 --> 01:39:08,160 And I don't like configuring interfaces myself manually. 1772 01:39:10,060 --> 01:39:11,520 So the high level concept is. 1773 01:39:11,980 --> 01:39:13,820 You have a management interface that's out of band. 1774 01:39:14,120 --> 01:39:17,560 You'd have one virtual switch where you would pass traffic in. 1775 01:39:17,700 --> 01:39:20,120 And another virtual switch where you would pass traffic out. 1776 01:39:20,180 --> 01:39:21,480 After it hits the protection device. 1777 01:39:21,860 --> 01:39:24,820 And you can also set up a third virtual switch that could be in line. 1778 01:39:24,900 --> 01:39:29,380 If you have any servers that you want to practice beating up. 1779 01:39:29,500 --> 01:39:31,820 Like the vulnerable bank applications. 1780 01:39:32,000 --> 01:39:32,940 Set up a target server. 1781 01:39:33,520 --> 01:39:35,500 Put your protection device in line. 1782 01:39:35,620 --> 01:39:36,400 See what it does. 1783 01:39:37,020 --> 01:39:39,740 This is a good use case for demos. 1784 01:39:40,040 --> 01:39:41,960 Often you can get 30 days free. 1785 01:39:41,980 --> 01:39:42,320 From a vendor. 1786 01:39:42,400 --> 01:39:43,720 If you already have a configuration. 1787 01:39:44,060 --> 01:39:45,880 You may even be able to import it from your own device. 1788 01:39:46,080 --> 01:39:50,720 And you get a fairly decent replica of what is on your network. 1789 01:39:50,840 --> 01:39:52,820 And you get a sense of what your protection level is. 1790 01:39:53,400 --> 01:39:54,920 With a real live device. 1791 01:39:55,200 --> 01:39:56,600 Just in an isolated environment. 1792 01:40:01,120 --> 01:40:02,700 So local testing in line. 1793 01:40:02,980 --> 01:40:05,660 So this is basically something you would do on your own system. 1794 01:40:05,780 --> 01:40:06,780 Which is what I usually do. 1795 01:40:06,860 --> 01:40:09,600 Because it's a lot more convenient for me to test this way. 1796 01:40:10,980 --> 01:40:12,320 The device at the top. 1797 01:40:13,160 --> 01:40:15,040 Say would be a gateway. 1798 01:40:15,180 --> 01:40:16,980 Or a routed virtual machine. 1799 01:40:17,260 --> 01:40:18,360 You can put two interfaces. 1800 01:40:18,860 --> 01:40:20,680 You create two internal networks. 1801 01:40:20,840 --> 01:40:22,140 Say a .100 and .200. 1802 01:40:22,440 --> 01:40:24,320 And you have that be the bridge interface. 1803 01:40:24,920 --> 01:40:26,060 On the two systems. 1804 01:40:26,100 --> 01:40:28,020 You set up say a default route. 1805 01:40:28,160 --> 01:40:31,880 So that they just automatically send traffic to that gateway device. 1806 01:40:32,120 --> 01:40:33,480 And then traffic gets passed back and forth. 1807 01:40:34,000 --> 01:40:36,160 What I like to do is have a shared folder on my host. 1808 01:40:36,320 --> 01:40:37,680 Where I can edit the target. 1809 01:40:37,880 --> 01:40:38,980 Or edit the exploit. 1810 01:40:38,980 --> 01:40:39,820 In real time. 1811 01:40:40,020 --> 01:40:42,360 And I can work on the client. 1812 01:40:42,540 --> 01:40:44,060 And then request it from the server. 1813 01:40:44,740 --> 01:40:46,040 And then I can change it. 1814 01:40:46,100 --> 01:40:47,080 And continue to do so. 1815 01:40:47,280 --> 01:40:50,340 And I can see if there's traffic getting blocked. 1816 01:40:50,940 --> 01:40:53,040 And in that case I hope it's the IPS. 1817 01:40:53,380 --> 01:40:54,880 I hope I configured my device right. 1818 01:40:55,060 --> 01:40:57,180 I hope it's the protection device that's dropping packets. 1819 01:40:57,580 --> 01:40:59,500 But then I can also find that if it's not. 1820 01:41:00,020 --> 01:41:01,080 I know that's a fail. 1821 01:41:01,200 --> 01:41:03,300 On that particular exploit variant. 1822 01:41:06,380 --> 01:41:07,520 An easier setup. 1823 01:41:07,640 --> 01:41:08,960 Which is the one I'm going to demonstrate to you. 1824 01:41:08,980 --> 01:41:11,720 Is you basically have one internal network. 1825 01:41:11,940 --> 01:41:13,900 You connect your client device. 1826 01:41:14,020 --> 01:41:14,660 Your server device. 1827 01:41:14,900 --> 01:41:16,660 And your IDS type device. 1828 01:41:16,860 --> 01:41:18,180 You set it up in promiscuous mode. 1829 01:41:18,860 --> 01:41:21,220 And just have it sniff the traffic. 1830 01:41:21,340 --> 01:41:22,500 And see what it can get. 1831 01:41:22,880 --> 01:41:24,640 For this example I've used security onion. 1832 01:41:25,420 --> 01:41:27,860 Which has snort and bro and surcott. 1833 01:41:27,960 --> 01:41:29,040 And a bunch of other security tools. 1834 01:41:29,200 --> 01:41:33,440 Great virtual machine host for testing things. 1835 01:41:33,560 --> 01:41:36,280 Because you should be able to configure everything on the device. 1836 01:41:37,820 --> 01:41:38,660 And so yeah. 1837 01:41:38,660 --> 01:41:41,260 I keep my exploits in a shared folder. 1838 01:41:41,380 --> 01:41:42,520 That's accessible by the server. 1839 01:41:42,680 --> 01:41:45,500 And then I can go visit it from my client. 1840 01:41:45,580 --> 01:41:47,020 Where I'm doing the requests. 1841 01:41:47,240 --> 01:41:48,040 And where I'm doing the editing. 1842 01:41:48,180 --> 01:41:49,280 And the server serves it. 1843 01:41:49,540 --> 01:41:50,460 And usually it's out of the. 1844 01:41:51,260 --> 01:41:53,880 I don't even have to see it once I verify network connectivity. 1845 01:41:56,600 --> 01:41:58,000 So here's the demo portion. 1846 01:41:58,340 --> 01:41:59,040 Fingers crossed. 1847 01:42:01,560 --> 01:42:02,620 Here I've got a server. 1848 01:42:04,040 --> 01:42:06,520 You can see the IP address is 10.0.2.4. 1849 01:42:11,480 --> 01:42:12,560 And security onion. 1850 01:42:12,720 --> 01:42:14,140 If you'll bear with me one second. 1851 01:42:14,200 --> 01:42:15,080 I have to re-login. 1852 01:42:21,900 --> 01:42:22,300 Okay. 1853 01:42:22,500 --> 01:42:25,500 Now over here you can see that there are some alerts. 1854 01:42:25,620 --> 01:42:26,680 I just left this up there. 1855 01:42:26,740 --> 01:42:28,520 Because I wanted to prove to you at some point. 1856 01:42:28,600 --> 01:42:31,900 That these rules did fire on the exploits. 1857 01:42:31,900 --> 01:42:33,040 That it's going to be seeing on the traffic. 1858 01:42:33,320 --> 01:42:36,840 Because shockingly enough they're difficult to detect. 1859 01:42:37,100 --> 01:42:38,420 And they don't always work. 1860 01:42:39,480 --> 01:42:40,800 Just as an example. 1861 01:42:40,900 --> 01:42:43,780 The exploit vulnerability example I'm going to be talking about. 1862 01:42:43,880 --> 01:42:47,800 Is for CVE 2014 6332. 1863 01:42:47,960 --> 01:42:51,120 Which is a vulnerability in Internet Explorer. 1864 01:42:51,640 --> 01:42:55,600 And it has to do with VBScript. 1865 01:42:56,640 --> 01:42:58,040 So let's see. 1866 01:42:58,680 --> 01:42:59,180 We had. 1867 01:42:59,280 --> 01:42:59,400 Oh. 1868 01:43:00,400 --> 01:43:04,460 Security onion has 23 snort rules from the base distribution. 1869 01:43:04,540 --> 01:43:05,700 As well as community rules. 1870 01:43:05,800 --> 01:43:07,700 So they're really trying to catch this vulnerability. 1871 01:43:13,040 --> 01:43:13,560 Okay. 1872 01:43:13,740 --> 01:43:14,840 So here's my client. 1873 01:43:15,220 --> 01:43:16,920 Where I've got the folder open. 1874 01:43:19,660 --> 01:43:23,300 You can see I have an IP address on the same subnet. 1875 01:43:23,420 --> 01:43:24,700 It's 10.0.2.15. 1876 01:43:25,200 --> 01:43:28,740 And here for this vulnerability 2014 6332. 1877 01:43:29,140 --> 01:43:31,200 I've got eight variations of this. 1878 01:43:31,940 --> 01:43:34,200 So what I would do is open a new tab. 1879 01:43:37,980 --> 01:43:38,800 Nothing happens. 1880 01:43:38,960 --> 01:43:39,080 Right? 1881 01:43:39,200 --> 01:43:40,200 What if I refresh it? 1882 01:43:41,460 --> 01:43:42,420 We get a crash. 1883 01:43:42,560 --> 01:43:42,720 Right? 1884 01:43:42,940 --> 01:43:45,140 So let's see if security onion caught it. 1885 01:43:47,900 --> 01:43:48,860 Not this time. 1886 01:43:49,480 --> 01:43:49,960 Well. 1887 01:43:50,120 --> 01:43:50,960 Let's try again. 1888 01:44:01,800 --> 01:44:02,600 Another crash. 1889 01:44:06,440 --> 01:44:08,380 Security onion still has not caught it. 1890 01:44:11,080 --> 01:44:12,140 Let's try one more time. 1891 01:44:12,260 --> 01:44:12,980 Just to make sure. 1892 01:44:13,080 --> 01:44:14,460 This really gives security onion a chance. 1893 01:44:15,040 --> 01:44:17,100 Which in this case it's running snort underneath. 1894 01:44:18,040 --> 01:44:20,840 And that's the rules that it's using to try and find this vulnerability. 1895 01:44:21,120 --> 01:44:22,060 So we've got another crash. 1896 01:44:24,500 --> 01:44:25,720 And it still hasn't triggered. 1897 01:44:26,200 --> 01:44:27,720 So this could go on and on. 1898 01:44:27,800 --> 01:44:28,620 And we could keep doing it. 1899 01:44:28,680 --> 01:44:29,500 And sometimes it will trigger. 1900 01:44:29,580 --> 01:44:30,180 And sometimes it won't. 1901 01:44:30,240 --> 01:44:32,580 But this is just a way to illustrate my point. 1902 01:44:32,580 --> 01:44:34,320 There are public proof of concepts. 1903 01:44:36,080 --> 01:44:42,520 And you can see there's several rules used to try and catch the vulnerability for this. 1904 01:44:42,640 --> 01:44:45,340 But HTML is very difficult to detect on the wire. 1905 01:44:45,500 --> 01:44:47,640 Something I learned from my prior experience. 1906 01:44:49,980 --> 01:44:53,780 So there's 23 versions of this rule. 1907 01:44:54,140 --> 01:44:56,880 Not one of them caught three different versions of the exploit. 1908 01:44:57,620 --> 01:44:59,580 This isn't to say that snort is a bad tool. 1909 01:44:59,660 --> 01:45:00,420 It's an excellent tool. 1910 01:45:00,540 --> 01:45:02,560 And it's included in a lot of the types. 1911 01:45:02,580 --> 01:45:04,300 Top of the line products for a good reason. 1912 01:45:04,680 --> 01:45:07,620 But the point here is that exploits. 1913 01:45:07,880 --> 01:45:09,200 There's a lot of exploits. 1914 01:45:09,440 --> 01:45:10,980 And they're difficult to detect. 1915 01:45:11,320 --> 01:45:13,720 So please, please go do your own testing. 1916 01:45:13,960 --> 01:45:15,640 And you can do very similar things to this. 1917 01:45:15,880 --> 01:45:17,060 In fact, I'll show you. 1918 01:45:18,240 --> 01:45:20,000 I think I had an example up previously. 1919 01:45:20,720 --> 01:45:22,080 So you can see. 1920 01:45:27,440 --> 01:45:28,240 Subtle differences. 1921 01:45:29,200 --> 01:45:30,560 You have an HTML file. 1922 01:45:30,740 --> 01:45:32,380 And there's a script that's VBScript. 1923 01:45:32,580 --> 01:45:34,840 And we're not even going to get into what they are. 1924 01:45:34,940 --> 01:45:38,640 But they're just minor differences in how the script is generated. 1925 01:45:38,900 --> 01:45:40,900 You have different randomized names for functions. 1926 01:45:41,660 --> 01:45:43,440 But the point is minor differences. 1927 01:45:43,740 --> 01:45:47,140 And the rules don't block them. 1928 01:45:47,220 --> 01:45:48,260 They need to do a better job. 1929 01:45:48,540 --> 01:45:53,000 So that is basically the point of this demo. 1930 01:45:55,880 --> 01:45:56,360 So. 1931 01:46:00,320 --> 01:46:00,960 All right. 1932 01:46:00,960 --> 01:46:02,720 So that's me wrapping up. 1933 01:46:02,740 --> 01:46:03,540 What were we talking about? 1934 01:46:04,260 --> 01:46:06,500 Again, network protection devices are valuable. 1935 01:46:06,780 --> 01:46:07,640 You should have them. 1936 01:46:07,720 --> 01:46:08,740 Defense in depth is key. 1937 01:46:08,920 --> 01:46:09,700 You want to have that. 1938 01:46:09,740 --> 01:46:15,580 The more chances you give something a chance to protect you from bad stuff, the lower your risk profile. 1939 01:46:15,940 --> 01:46:22,560 But be aware that just because an IPS says it's going to block something for you doesn't necessarily mean that it will. 1940 01:46:23,080 --> 01:46:24,580 Verify it yourself, please. 1941 01:46:24,760 --> 01:46:26,560 And then follow up with your vendor. 1942 01:46:26,680 --> 01:46:29,000 And each time you can get a network packet capture. 1943 01:46:29,100 --> 01:46:29,640 They love those. 1944 01:46:29,640 --> 01:46:33,920 Or if you can get the exploit itself and they have to send it across the wire, they will find a way to do it. 1945 01:46:34,380 --> 01:46:39,280 If there are enough customers complaining, they may make a change. 1946 01:46:39,520 --> 01:46:48,380 And if there are enough customers sending the same things with the same simple evasions, maybe they will put the detection logic into all of their rules. 1947 01:46:48,560 --> 01:46:50,660 And we all get more security that way. 1948 01:46:50,840 --> 01:46:52,860 So last time. 1949 01:46:52,900 --> 01:46:54,240 Please take an active role. 1950 01:46:54,960 --> 01:46:56,140 Verify your coverage claims. 1951 01:46:56,340 --> 01:46:57,800 And then follow up with your vendor. 1952 01:46:59,640 --> 01:47:00,960 That is all for my talk. 1953 01:47:01,400 --> 01:47:04,180 Does anybody have any questions that they want others to hear? 1954 01:47:05,020 --> 01:47:06,300 I see a hand. 1955 01:47:11,960 --> 01:47:17,200 How many unique vulnerabilities did you check and how many variants of those vulnerabilities? 1956 01:47:17,300 --> 01:47:18,320 That's a good question. 1957 01:47:18,400 --> 01:47:18,920 Let's go back. 1958 01:47:19,100 --> 01:47:26,560 The question was how many unique vulnerabilities did we check and how many variations of those vulnerabilities did we check? 1959 01:47:30,540 --> 01:47:30,980 Okay. 1960 01:47:35,580 --> 01:47:36,020 Okay. 1961 01:47:36,120 --> 01:47:39,120 So for the test results that I'm showing here, these are initial results. 1962 01:47:39,360 --> 01:47:40,420 They haven't been categorized. 1963 01:47:40,500 --> 01:47:44,840 We have individual strikes, which are basically the exploit targeting the vulnerability. 1964 01:47:44,980 --> 01:47:47,880 And within those, you had many variations. 1965 01:47:48,520 --> 01:47:49,740 Now you had a follow-up question. 1966 01:47:50,100 --> 01:47:55,160 And then where did you get that pool of variants to do the test with? 1967 01:47:55,280 --> 01:47:56,920 What were the pool of vulnerability tests? 1968 01:47:57,740 --> 01:47:58,180 Well. 1969 01:47:58,180 --> 01:47:59,040 . 1970 01:48:02,680 --> 01:48:03,120 Okay. 1971 01:48:03,300 --> 01:48:11,360 So the exploits and the variants come from the very expensive product that my company makes. 1972 01:48:12,040 --> 01:48:13,560 So that is the first answer, yes. 1973 01:48:13,620 --> 01:48:14,300 It's not free. 1974 01:48:14,680 --> 01:48:17,820 But you can use a tool like Metasploit, ExploitDB. 1975 01:48:17,960 --> 01:48:19,220 They have public proof of concepts. 1976 01:48:19,680 --> 01:48:20,460 Go in there. 1977 01:48:20,680 --> 01:48:21,800 Modify them a little bit. 1978 01:48:22,140 --> 01:48:25,740 See if you can make your protection device miss. 1979 01:48:26,440 --> 01:48:27,500 That's what we have found. 1980 01:48:28,180 --> 01:48:34,920 What we feel that we add a lot of value is we'll even find public proof of concepts that do something one way, and then we'll do it 100 other ways. 1981 01:48:36,240 --> 01:48:37,860 You guys can do one or two ways. 1982 01:48:38,080 --> 01:48:41,480 It takes some time and practice, but please do that. 1983 01:48:42,220 --> 01:48:48,500 And we'll all get more secure or at least lower our risk in some way if we can make our protection devices better. 1984 01:48:50,000 --> 01:48:51,680 So unless there are any more questions. 1985 01:48:52,260 --> 01:48:53,580 Oh, I got one down here. 1986 01:49:00,920 --> 01:49:03,920 Oh, HTML exploits and why they are hard to detect. 1987 01:49:04,120 --> 01:49:06,280 Well, let's see. 1988 01:49:08,040 --> 01:49:08,480 Okay. 1989 01:49:08,560 --> 01:49:10,620 So this is a packet capture. 1990 01:49:11,120 --> 01:49:11,560 Wireshark. 1991 01:49:11,600 --> 01:49:14,480 You've got a session that was initiated, typically a get request. 1992 01:49:14,840 --> 01:49:17,740 And then the server is responding with the HTML file. 1993 01:49:18,160 --> 01:49:23,360 When you're looking at this on the wire, which is where most of the protection devices operate, you're seeing bytes. 1994 01:49:24,380 --> 01:49:27,440 So in this case, stored. 1995 01:49:27,440 --> 01:49:31,380 And those who are familiar with it know that a lot of protection is regular expression based. 1996 01:49:32,020 --> 01:49:41,160 So you'll look for, say, in this case, you'd want to find key frames followed by perhaps an overly large percentage with a specific opacity. 1997 01:49:41,580 --> 01:49:43,920 Then you'd want to find that the animation was used. 1998 01:49:44,200 --> 01:49:54,080 So ordering in this particular variant means you have to write a regular expression that looks for one thing, jumps to another, and possibly captures one thing, and then looks for it further down the line. 1999 01:49:55,300 --> 01:49:56,980 Now, if I change the order in any way. 2000 01:49:57,440 --> 01:49:59,120 Which you can do with HTML very easily. 2001 01:49:59,620 --> 01:50:02,900 You'll basically have to write another version of that regular expression. 2002 01:50:03,260 --> 01:50:04,900 And now it has to check two different ways. 2003 01:50:05,520 --> 01:50:07,600 And then over here, you see we did it totally different. 2004 01:50:07,740 --> 01:50:09,140 We did it within a style tag. 2005 01:50:10,880 --> 01:50:12,320 They're both done in style tags. 2006 01:50:12,460 --> 01:50:17,940 But we have a CSS rule rather than HTML attribute on the style. 2007 01:50:18,200 --> 01:50:20,000 So you have to look for it in a third way. 2008 01:50:20,380 --> 01:50:24,740 And you don't typically want to write multiple rules for the same thing unless you're snort and you're open source. 2009 01:50:25,400 --> 01:50:27,420 And so the protection vendors want you to think about that. 2010 01:50:27,440 --> 01:50:28,400 They want you to think they're doing a very good job. 2011 01:50:28,480 --> 01:50:29,140 They have one rule. 2012 01:50:29,440 --> 01:50:31,220 But it could be very performance intensive. 2013 01:50:31,500 --> 01:50:35,600 And unfortunately, since most of them are in line, performance is still key for them. 2014 01:50:35,680 --> 01:50:38,380 They are concerned about affecting performance. 2015 01:50:38,860 --> 01:50:41,700 So detection ratios sometimes lag because of that. 2016 01:50:43,840 --> 01:50:44,460 Follow up? 2017 01:50:54,780 --> 01:50:57,920 Rules based on non-regular expressions. 2018 01:50:58,640 --> 01:51:01,520 There are probably several more people who can speak better to that. 2019 01:51:01,640 --> 01:51:11,740 But I believe Suricata is a little bit higher up in abstraction and can work on possibly interpreted things at a higher level. 2020 01:51:12,040 --> 01:51:13,520 I'm not familiar with the tool myself. 2021 01:51:13,520 --> 01:51:21,620 But I believe there are tools that kind of straddle the line between network-based and host-based where you're looking at the things that have been interpreted. 2022 01:51:21,800 --> 01:51:27,640 And sandbox tools are great as well because they evaluate things within a safe environment before passing them on. 2023 01:51:28,720 --> 01:51:29,980 Did I see another question? 2024 01:51:30,320 --> 01:51:30,840 Yes? 2025 01:51:32,100 --> 01:51:34,280 I'm not sure this is really a question. 2026 01:51:34,500 --> 01:51:38,980 I guess I'd like to push back a little bit on the premise that this is a valuable technology. 2027 01:51:40,020 --> 01:51:43,180 But the rates that you showed of detection were like... 2028 01:51:43,660 --> 01:51:44,140 20%. 2029 01:51:44,700 --> 01:51:54,340 If you add in the overhead of all the false positives, 20% detection rate, is this really a valuable place where you can spend my money? 2030 01:51:54,600 --> 01:52:04,400 The question was about if IPSs are so bad, then why should anybody spend any money on it because they seem to be really bad. 2031 01:52:04,600 --> 01:52:11,820 And then you get one high cost typically and you get false positives that have to be chased down or you have to spend a lot of time tuning your IPS. 2032 01:52:11,820 --> 01:52:13,140 That's a good question. 2033 01:52:15,440 --> 01:52:16,960 I'm not sure I have a good answer for that. 2034 01:52:17,120 --> 01:52:25,580 I'd like to think that if I spend some time tuning it, which I hope you guys have all had the vendors come in and help you tune it appropriate to your environment, 2035 01:52:25,760 --> 01:52:32,680 I would hope that upfront time will serve you well in seeing your own detection rates at least be hopefully higher. 2036 01:52:33,120 --> 01:52:37,320 I would certainly hope that anything at the network-based layer should be near 100%. 2037 01:52:37,320 --> 01:52:40,720 And it could just be because I didn't configure my devices correctly. 2038 01:52:40,920 --> 01:52:41,360 But... 2039 01:52:41,980 --> 01:52:52,040 Out of the box, testing with a default policy applies to me is a statistical probability that some people somewhere out there have their devices like that. 2040 01:52:52,140 --> 01:52:53,940 So we should include that as part of our testing. 2041 01:52:55,500 --> 01:52:57,480 Did that answer your question in any way? 2042 01:52:57,980 --> 01:52:59,340 It did a little bit. 2043 01:52:59,500 --> 01:53:06,080 But I guess it sounds like if I tune the thing when I install it, in two weeks that won't help. 2044 01:53:06,320 --> 01:53:11,740 Because there'll be all these little vulnerabilities that it's not touching anything but the default version. 2045 01:53:13,440 --> 01:53:21,020 So the question is, if you spend a bunch of time tuning it towards particular vulnerabilities, do you get a better coverage rate? 2046 01:53:21,120 --> 01:53:23,120 And how does that affect you when new vulnerabilities come out? 2047 01:53:29,480 --> 01:53:32,160 Well, you shouldn't have to tune for vulnerabilities. 2048 01:53:32,360 --> 01:53:36,040 You may have to tune a device with a configuration that's appropriate for your network. 2049 01:53:36,260 --> 01:53:41,040 You may want to block all IP addresses that are based in a foreign country. 2050 01:53:41,040 --> 01:53:44,540 If you have no foreign customers and you have no foreign business contacts. 2051 01:53:44,800 --> 01:53:53,360 If you're doing business-to-business networks, you may only want to have those IP ranges that you know communicate with your network. 2052 01:53:53,520 --> 01:53:59,340 So it's not so much about making your IPS be as good as possible, which it'd be nice if they did. 2053 01:54:00,080 --> 01:54:04,060 It's about lowering your risk profile and reducing the attack surface. 2054 01:54:04,420 --> 01:54:07,200 And an inline device can help. 2055 01:54:07,280 --> 01:54:11,020 And it should, I think, be viewed as a piece of the puzzle. 2056 01:54:11,020 --> 01:54:19,300 But just by seeing a vulnerability listed as being offered protection, don't take the vendors at face value. 2057 01:54:21,680 --> 01:54:23,300 So yes, it's a big investment. 2058 01:54:23,480 --> 01:54:29,320 And ideally, it will help lower your risk profile and reduce your attack surface. 2059 01:54:29,700 --> 01:54:36,060 So that if your follow-on mitigations have less work to do, you have less manual inspection to do, 2060 01:54:36,120 --> 01:54:40,400 your host IPS and IDS and your host antivirus should have less work to do. 2061 01:54:41,020 --> 01:54:42,080 At least that's the goal. 2062 01:54:42,580 --> 01:54:48,260 So I'm still a big fan of trying to stop things one time at the networks so that you don't have to stop that many times on the host. 2063 01:54:49,180 --> 01:54:50,620 But maybe that's just my opinion. 2064 01:54:53,180 --> 01:54:54,140 Any other questions? 2065 01:54:55,140 --> 01:54:55,720 Right here. 2066 01:54:56,620 --> 01:54:57,440 I saw a hand. 2067 01:54:57,820 --> 01:55:00,320 How old were the vulnerabilities that you tested for? 2068 01:55:01,120 --> 01:55:02,440 How old are the vulnerabilities? 2069 01:55:03,620 --> 01:55:10,180 Well, in some cases, we went back as far as 2002, which most people should have patched by now. 2070 01:55:10,180 --> 01:55:12,160 Those shouldn't be things that we care about. 2071 01:55:12,420 --> 01:55:16,500 But at the same time, the IPS vendors should have had plenty of time to block those. 2072 01:55:16,800 --> 01:55:22,960 We also had a large number or significant number of IPSs that we didn't have recently licensed. 2073 01:55:23,140 --> 01:55:26,840 So we tested older vulnerabilities in order to test their older detection logic. 2074 01:55:27,200 --> 01:55:33,160 So these vulnerabilities are from 2002 through 2016. 2075 01:55:36,200 --> 01:55:37,580 I see a hand right here. 2076 01:55:37,900 --> 01:55:40,140 Why do you think you didn't drop your vulnerability? 2077 01:55:42,960 --> 01:55:45,620 I have to hope it's because I did something wrong. 2078 01:55:46,280 --> 01:55:52,900 I'm really hoping my IPSs are not this bad and that with a default configuration, they don't do this poorly. 2079 01:55:53,120 --> 01:55:53,920 I really hope that. 2080 01:55:53,960 --> 01:55:58,000 I hope all of your results are much higher and that you have tuned interfaces. 2081 01:55:58,400 --> 01:56:01,380 They sent an engineer out to help you configure it when you first bought it. 2082 01:56:01,420 --> 01:56:04,040 Hopefully, it's much higher than this. 2083 01:56:06,240 --> 01:56:07,120 Any other questions? 2084 01:56:10,180 --> 01:56:11,100 Well then, oh, wait. 2085 01:56:22,860 --> 01:56:26,180 The question I believe was about performance, hardware versus virtual. 2086 01:56:26,680 --> 01:56:29,660 Unfortunately, I had no overlap in devices. 2087 01:56:30,100 --> 01:56:31,260 So I couldn't tell you. 2088 01:56:31,300 --> 01:56:38,120 But I would imagine if your device is configured for lower throughput, you should have the same detection logic regardless if it's hardware or software. 2089 01:56:38,120 --> 01:56:40,920 Just from a developer's perspective, you want to develop once. 2090 01:56:42,180 --> 01:56:44,940 So detection logic shouldn't be different. 2091 01:56:45,320 --> 01:56:45,840 Yes? 2092 01:56:47,040 --> 01:56:47,560 . 2093 01:56:51,580 --> 01:56:56,980 That is the additional research that I want to do because I believe that there are plenty of public proof of concepts. 2094 01:56:57,240 --> 01:57:02,860 I have a feeling that the vendors are going after the public proof of concepts, blocking them, and claiming coverage. 2095 01:57:03,280 --> 01:57:07,200 And then we do additional work to see what other ways you can exploit a vulnerability. 2096 01:57:07,200 --> 01:57:14,900 So at some point, I hope to have statistical data showing public proof of concept versus, say, our variations. 2097 01:57:16,080 --> 01:57:17,080 Any other questions? 2098 01:57:20,220 --> 01:57:20,800 No? 2099 01:57:20,880 --> 01:57:22,920 Well, if that's it, that's all. 2100 01:57:30,920 --> 01:57:32,440 And it's showtime. 2101 01:57:32,760 --> 01:57:33,740 Good evening. 2102 01:57:33,780 --> 01:57:36,860 And this is the final speaker workshop. 2103 01:57:36,860 --> 01:57:38,460 Talk of the day. 2104 01:57:39,880 --> 01:57:43,860 Again, thank you so much for spending your day and time with us. 2105 01:57:45,180 --> 01:57:46,340 We're very grateful. 2106 01:57:46,780 --> 01:57:48,060 We're very, very grateful. 2107 01:57:48,260 --> 01:57:50,900 And also, it's amazing to see everyone here. 2108 01:57:51,140 --> 01:58:00,220 I mean, I guess I'll be honest is that we did not anticipate people to be, like, standing, like, deep, deep, deep, and also standing on the floor for this talk. 2109 01:58:00,680 --> 01:58:06,180 And as I said earlier a number, a few times, we've saved the world. 2110 01:58:06,180 --> 01:58:06,840 We've saved the world. 2111 01:58:06,840 --> 01:58:09,440 We've saved the best for last for today. 2112 01:58:10,040 --> 01:58:11,620 Because it is our honor. 2113 01:58:11,900 --> 01:58:22,180 It is certainly our honor and our privilege to have a very, very, very, very special guest, very, very special speaker today, Ryan Mitchell. 2114 01:58:22,420 --> 01:58:30,040 And before Ryan, before I pass the mic over to Ryan, how many of you here are Python fans, fans of Python? 2115 01:58:30,560 --> 01:58:30,960 Woo! 2116 01:58:32,840 --> 01:58:33,800 So, Ryan. 2117 01:58:33,800 --> 01:58:40,020 Ryan is not only a DepCon alumnae. 2118 01:58:40,140 --> 01:58:44,700 She spoke last year at DepCon 23. 2119 01:58:45,300 --> 01:58:53,380 She is also the author of an O'Reilly book called Web Scraping with Python. 2120 01:58:53,940 --> 01:59:02,540 And we are very honored and very, very privileged to have Ryan Mitchell to give the last talk of the day. 2121 01:59:02,540 --> 01:59:04,480 And arguably the blockbuster. 2122 01:59:05,300 --> 01:59:06,880 Without much ado, Ryan Mitchell. 2123 01:59:07,560 --> 01:59:08,280 All right. 2124 01:59:08,880 --> 01:59:10,100 Thank you very much. 2125 01:59:10,900 --> 01:59:11,620 All right. 2126 01:59:11,660 --> 01:59:13,260 So, my name is up there. 2127 01:59:14,460 --> 01:59:17,160 My Twitter is also up there, in case you want that later. 2128 01:59:17,280 --> 01:59:21,360 I think I'll find some safe internet after this and then upload the files to Twitter. 2129 01:59:21,740 --> 01:59:24,020 So, who am I? 2130 01:59:24,860 --> 01:59:27,560 I am a senior developer at Hedgester. 2131 01:59:27,660 --> 01:59:32,520 We are an enterprise, enterprise analytics software management force. 2132 01:59:32,520 --> 01:59:34,560 For hedge fund, I don't even know. 2133 01:59:35,000 --> 01:59:40,500 Anyway, I wrote two books, which is what I actually talk about, because no one wants to hear about the first thing. 2134 01:59:40,980 --> 01:59:42,860 Web scraping with Python in 2015. 2135 01:59:43,280 --> 01:59:45,300 And instant web scraping with Java. 2136 01:59:45,700 --> 01:59:48,680 Which isn't quite as good, but, you know, it's packed. 2137 01:59:50,240 --> 01:59:53,760 I am also teaching web development class at the Boston Public Library in the fall. 2138 01:59:53,880 --> 01:59:57,440 And a data science course at my alma mater, Olin College of Engineering. 2139 01:59:57,700 --> 01:59:58,980 Go, Phoenixes! 2140 02:00:00,140 --> 02:00:00,780 All right. 2141 02:00:00,780 --> 02:00:02,940 So, who puts about me slides in deaf context? 2142 02:00:03,180 --> 02:00:03,880 That's super lame. 2143 02:00:05,280 --> 02:00:07,440 My background is a little different than all y'all's. 2144 02:00:07,480 --> 02:00:11,500 I am not, like, a network packet hacker networking person. 2145 02:00:11,980 --> 02:00:19,220 So, I'm, as hopefully you gathered, I am a software engineer and a data scientist and a web scraper. 2146 02:00:19,300 --> 02:00:20,220 And I do a lot of that stuff. 2147 02:00:20,520 --> 02:00:23,460 But I was talking to Davin Potts six months ago. 2148 02:00:23,620 --> 02:00:24,400 I don't know if you know him. 2149 02:00:24,440 --> 02:00:26,380 He's involved in, ah, there he is, Davin. 2150 02:00:27,140 --> 02:00:29,400 And we were talking at a conference in Austin. 2151 02:00:29,400 --> 02:00:33,280 And he said, hey, you know, I really enjoyed your talk about web scraping. 2152 02:00:33,680 --> 02:00:34,580 Maybe you said that. 2153 02:00:34,620 --> 02:00:35,080 I don't remember. 2154 02:00:35,360 --> 02:00:35,640 Eh. 2155 02:00:36,060 --> 02:00:37,340 You don't have to have enjoyed it. 2156 02:00:37,340 --> 02:00:37,640 That's fine. 2157 02:00:38,840 --> 02:00:41,340 But he said, you know, you should do a talk at Wall of Sheep. 2158 02:00:41,900 --> 02:00:46,080 Maybe about the intersection of wall of sheeping and web scraping. 2159 02:00:46,220 --> 02:00:48,600 And I thought, I don't even know what that would, what? 2160 02:00:49,340 --> 02:00:51,000 But I thought about it for a while. 2161 02:00:51,280 --> 02:00:52,660 And here's what I came up with. 2162 02:00:53,580 --> 02:00:55,040 So, traditional web scraping. 2163 02:00:56,880 --> 02:00:57,960 Automated data collection. 2164 02:00:57,960 --> 02:01:00,300 Generally, when you're scraping the web, you want to get data. 2165 02:01:00,680 --> 02:01:03,720 Web scrapers tend to behave like humans in a lot of ways. 2166 02:01:03,820 --> 02:01:04,620 So, they request URLs. 2167 02:01:04,960 --> 02:01:07,440 They parse HTML data for the most part. 2168 02:01:08,140 --> 02:01:12,880 If they get really frustrated by just parsing the HTML data, they automate web browsers. 2169 02:01:13,060 --> 02:01:16,200 They say, fuck it, we'll just automate the entire web browser. 2170 02:01:16,500 --> 02:01:19,120 They tend to navigate through hyperlinks like humans do. 2171 02:01:19,320 --> 02:01:19,580 Right? 2172 02:01:20,040 --> 02:01:22,780 They write requests and they deal with one response at a time. 2173 02:01:22,980 --> 02:01:26,340 They deal with security if they need to for the goal of data collection. 2174 02:01:27,100 --> 02:01:28,900 Traditional wall of sheeping, right? 2175 02:01:29,820 --> 02:01:33,480 So, it passively monitors all traffic across the network. 2176 02:01:33,680 --> 02:01:36,040 So, you're not just, you know, make a request, get something back. 2177 02:01:36,280 --> 02:01:38,360 But you're sort of monitoring traffic. 2178 02:01:39,220 --> 02:01:41,960 Scripts are usually very unhuman-like, right? 2179 02:01:42,060 --> 02:01:46,740 No one would watch that traffic and say, oh, someone must be browsing around my website. 2180 02:01:47,640 --> 02:01:53,220 They tend to focus on the transport layer, like relatively lower layer of Internet protocol. 2181 02:01:53,740 --> 02:01:56,220 And then they focus on data collection. 2182 02:01:56,340 --> 02:02:00,120 So, they're looking for the goal of security rather than dealing with security for the goal of data collection. 2183 02:02:00,460 --> 02:02:02,320 So, what's the intersection between those two? 2184 02:02:03,360 --> 02:02:06,200 So, I'm moving up the Internet protocol stack a bit. 2185 02:02:06,300 --> 02:02:07,920 And I'm going to focus on the presentation layer. 2186 02:02:08,100 --> 02:02:09,400 I know it's going to be really weird. 2187 02:02:09,540 --> 02:02:10,680 But you guys can do it. 2188 02:02:12,240 --> 02:02:14,620 But still, monitoring all traffic. 2189 02:02:14,820 --> 02:02:16,220 I really like that concept. 2190 02:02:16,440 --> 02:02:18,640 I think that's a good one that we can all take from wall of sheep. 2191 02:02:18,740 --> 02:02:21,600 Monitor all the traffic initiated by a single page load. 2192 02:02:21,900 --> 02:02:24,360 And focus on data search and extraction. 2193 02:02:26,340 --> 02:02:27,820 So, why is this needed? 2194 02:02:28,220 --> 02:02:30,440 I mean, web scraping isn't broke. 2195 02:02:30,640 --> 02:02:32,200 Why do we need this, right? 2196 02:02:33,300 --> 02:02:34,080 Here's why. 2197 02:02:35,240 --> 02:02:35,800 Okay. 2198 02:02:35,880 --> 02:02:40,380 So, you probably have all seen JavaScript around, right? 2199 02:02:41,100 --> 02:02:42,500 And it keeps coming. 2200 02:02:43,240 --> 02:02:44,560 And it keeps coming. 2201 02:02:45,740 --> 02:02:48,400 There are so many JavaScripts. 2202 02:02:48,400 --> 02:02:51,500 And everyone puts all their shit in your browser. 2203 02:02:52,100 --> 02:02:52,660 Right? 2204 02:02:53,300 --> 02:02:56,720 So, this is how the web used to work. 2205 02:02:57,480 --> 02:02:57,920 Okay? 2206 02:02:57,980 --> 02:02:58,840 I made these myself. 2207 02:03:00,380 --> 02:03:01,440 You have the database. 2208 02:03:01,620 --> 02:03:02,740 You have your API layer. 2209 02:03:03,180 --> 02:03:05,080 You have some shit going on on the server. 2210 02:03:05,440 --> 02:03:06,860 You have your little web service. 2211 02:03:07,060 --> 02:03:07,780 You have your user. 2212 02:03:08,060 --> 02:03:09,860 And you have this theoretically impenetrable wall. 2213 02:03:10,080 --> 02:03:10,240 Right? 2214 02:03:10,360 --> 02:03:13,480 And I say theoretically because this is DEF CON and that's kind of the point. 2215 02:03:13,960 --> 02:03:14,580 You know? 2216 02:03:15,580 --> 02:03:16,460 But theoretically. 2217 02:03:19,160 --> 02:03:20,460 Happy HTML file. 2218 02:03:21,620 --> 02:03:22,220 All right. 2219 02:03:22,660 --> 02:03:23,140 You have jQuery. 2220 02:03:23,840 --> 02:03:24,500 And fun fact. 2221 02:03:24,660 --> 02:03:27,960 As of August 26th, jQuery will be ten years old. 2222 02:03:29,260 --> 02:03:29,660 Yeah. 2223 02:03:29,800 --> 02:03:30,160 Yeah. 2224 02:03:30,220 --> 02:03:30,960 I feel old, too. 2225 02:03:31,080 --> 02:03:31,300 Right? 2226 02:03:33,040 --> 02:03:36,320 So, then we started having all these little formatting interaction things. 2227 02:03:36,440 --> 02:03:37,080 You click a thing. 2228 02:03:37,140 --> 02:03:38,020 A thing pops up. 2229 02:03:38,100 --> 02:03:38,700 It's so cute. 2230 02:03:38,860 --> 02:03:39,860 Oh, look at the website. 2231 02:03:40,180 --> 02:03:41,800 It's so awesome and new. 2232 02:03:42,880 --> 02:03:45,360 So, but you have your happy HTML file back here. 2233 02:03:45,560 --> 02:03:47,180 Then you got some little DOM rendering. 2234 02:03:47,460 --> 02:03:48,280 And the user is happy. 2235 02:03:49,900 --> 02:03:52,600 You have some happy little Ajaxes maybe eventually. 2236 02:03:52,660 --> 02:03:53,760 Stuff going on. 2237 02:03:56,440 --> 02:03:57,240 All right. 2238 02:03:58,140 --> 02:03:59,760 This is what it looks like today. 2239 02:03:59,940 --> 02:04:00,160 Right? 2240 02:04:01,040 --> 02:04:03,300 We have this sad HTML file. 2241 02:04:03,640 --> 02:04:04,840 It's like HTML. 2242 02:04:05,120 --> 02:04:05,600 Head. 2243 02:04:05,880 --> 02:04:06,420 And head. 2244 02:04:06,920 --> 02:04:07,420 Body. 2245 02:04:08,000 --> 02:04:08,980 Stuff goes here. 2246 02:04:09,240 --> 02:04:09,840 And body. 2247 02:04:10,000 --> 02:04:10,920 And HTML. 2248 02:04:11,300 --> 02:04:11,580 Oh. 2249 02:04:12,260 --> 02:04:14,600 And that's all the web scrapers are seeing. 2250 02:04:14,780 --> 02:04:14,980 Right? 2251 02:04:15,000 --> 02:04:16,940 Like the user is happy because they're using a browser. 2252 02:04:17,140 --> 02:04:19,740 And they have the whole fucking server in their browser. 2253 02:04:20,000 --> 02:04:22,320 And it's taking up five gigabytes of RAM. 2254 02:04:22,560 --> 02:04:22,640 So, we're happy. 2255 02:04:22,640 --> 02:04:23,220 Right? 2256 02:04:23,720 --> 02:04:26,780 I've talked to people who are like, we don't have a content management system. 2257 02:04:26,980 --> 02:04:30,220 We have a client side web application with an API. 2258 02:04:30,840 --> 02:04:33,560 It's like, what the fuck do you think a CMS is? 2259 02:04:33,700 --> 02:04:34,080 Like. 2260 02:04:36,120 --> 02:04:36,520 Okay. 2261 02:04:36,600 --> 02:04:39,500 And then you have like a thin layer that we don't have to worry about. 2262 02:04:40,820 --> 02:04:41,900 Happy little clouds. 2263 02:04:42,100 --> 02:04:42,460 Oh, yeah. 2264 02:04:42,520 --> 02:04:43,160 That's the other problem. 2265 02:04:43,260 --> 02:04:46,060 Then you have like external things going on. 2266 02:04:46,180 --> 02:04:47,280 And who knows what that is. 2267 02:04:49,460 --> 02:04:49,860 Oh. 2268 02:04:50,120 --> 02:04:52,000 The web scraper is so sad now. 2269 02:04:52,000 --> 02:04:55,160 Because all he's getting is this little HTML file. 2270 02:04:55,420 --> 02:04:56,160 None of this stuff. 2271 02:04:56,360 --> 02:04:57,320 He can't see any of it. 2272 02:04:57,680 --> 02:04:58,120 Ah. 2273 02:04:58,880 --> 02:05:00,680 This is why we have Selenium. 2274 02:05:00,820 --> 02:05:01,080 Right? 2275 02:05:01,680 --> 02:05:02,660 Selenium to the rescue. 2276 02:05:03,200 --> 02:05:03,840 All right. 2277 02:05:04,080 --> 02:05:06,400 So, instead of like making a little script. 2278 02:05:06,680 --> 02:05:08,640 And getting your sad little HTML file. 2279 02:05:08,940 --> 02:05:10,600 We'll just script the browser. 2280 02:05:10,980 --> 02:05:13,620 We can use browsers like normal human beings. 2281 02:05:13,860 --> 02:05:14,620 Human beings. 2282 02:05:14,960 --> 02:05:17,160 And we'll have the browser go out to the website. 2283 02:05:17,360 --> 02:05:19,140 And it will be our little server for us. 2284 02:05:19,240 --> 02:05:20,800 And it will render the DOM for us. 2285 02:05:20,860 --> 02:05:21,580 And we're so happy. 2286 02:05:22,400 --> 02:05:22,880 Oh. 2287 02:05:24,180 --> 02:05:25,040 Oh, no. 2288 02:05:25,200 --> 02:05:25,980 This is terrible. 2289 02:05:26,160 --> 02:05:29,860 Because to scrape the web, sometimes you need thousands of page loads. 2290 02:05:30,020 --> 02:05:30,240 Right? 2291 02:05:30,740 --> 02:05:33,220 And you need to do them really fast. 2292 02:05:33,560 --> 02:05:36,140 Because you don't want your computer to be taken over. 2293 02:05:36,200 --> 02:05:37,860 Your server to be taken over for days and days. 2294 02:05:38,000 --> 02:05:41,900 Doing this stupid browser that takes up five gigabytes of RAM. 2295 02:05:43,020 --> 02:05:43,500 Okay? 2296 02:05:49,020 --> 02:05:51,000 So, here's the data you actually want. 2297 02:05:51,000 --> 02:05:52,340 See that red thing? 2298 02:05:52,660 --> 02:05:54,160 That's the data they actually want. 2299 02:05:54,280 --> 02:05:57,940 That's like a JSON or an XML or something like that. 2300 02:05:58,660 --> 02:06:00,360 But we still use Selenium. 2301 02:06:00,440 --> 02:06:01,300 And why do we do this? 2302 02:06:03,560 --> 02:06:08,960 So, analyzing APIs and server communication is often thought of as the domain of security. 2303 02:06:09,800 --> 02:06:11,000 Which is why we're all here. 2304 02:06:11,140 --> 02:06:12,080 But not data collection. 2305 02:06:12,720 --> 02:06:14,520 I mean, obviously, there are a lot of overlaps. 2306 02:06:14,560 --> 02:06:15,700 People want to protect their data. 2307 02:06:15,840 --> 02:06:17,440 They take security measures to protect it. 2308 02:06:17,520 --> 02:06:17,640 Right? 2309 02:06:18,980 --> 02:06:20,860 But people who scrape the web. 2310 02:06:20,860 --> 02:06:23,480 Are usually more like data scientists or researchers. 2311 02:06:23,860 --> 02:06:25,700 And they have reasons they want to collect all this data. 2312 02:06:25,880 --> 02:06:28,400 And they're not really like security nerds like we all are. 2313 02:06:29,000 --> 02:06:30,760 So, they dig around in APIs. 2314 02:06:31,080 --> 02:06:32,660 They get all like, am I hacking? 2315 02:06:32,940 --> 02:06:33,380 I don't know. 2316 02:06:33,460 --> 02:06:34,040 This is weird. 2317 02:06:35,780 --> 02:06:37,600 It's also difficult to trudge through. 2318 02:06:37,800 --> 02:06:38,020 Right? 2319 02:06:38,320 --> 02:06:39,440 Like I kind of implied. 2320 02:06:39,600 --> 02:06:41,700 Like data scientists are not always programmers. 2321 02:06:43,800 --> 02:06:46,120 We really like link tags. 2322 02:06:46,320 --> 02:06:47,260 This is a subtle one. 2323 02:06:47,780 --> 02:06:50,460 So, since the 90s, this whole Google thing was invented. 2324 02:06:50,860 --> 02:06:51,600 And what did it do? 2325 02:06:51,700 --> 02:06:52,620 It crawled through websites. 2326 02:06:52,740 --> 02:06:54,520 It followed these link tags. 2327 02:06:54,600 --> 02:06:55,200 These anchor tags. 2328 02:06:56,440 --> 02:06:58,360 What have we completely ignored? 2329 02:06:58,620 --> 02:07:01,720 The fact that link tags only link to HTML. 2330 02:07:02,940 --> 02:07:03,380 Right? 2331 02:07:04,260 --> 02:07:06,380 Well, now the data's not in the HTML. 2332 02:07:06,760 --> 02:07:08,060 It's in the other places. 2333 02:07:09,100 --> 02:07:11,020 But still, whenever we build crawlers. 2334 02:07:11,100 --> 02:07:12,380 Whenever we build web scrapers. 2335 02:07:12,480 --> 02:07:14,960 We always base them on finding these anchor tags. 2336 02:07:15,040 --> 02:07:15,600 These link tags. 2337 02:07:15,860 --> 02:07:16,680 And then we follow those. 2338 02:07:16,800 --> 02:07:17,860 And all we get is HTML. 2339 02:07:18,040 --> 02:07:19,600 And we're really pissed off when that happens. 2340 02:07:19,600 --> 02:07:20,780 What's up with that? 2341 02:07:21,640 --> 02:07:23,140 And then the big one is. 2342 02:07:23,420 --> 02:07:25,260 When you have a hammer like Selenium. 2343 02:07:25,660 --> 02:07:27,840 Every page looks like an L. 2344 02:07:29,280 --> 02:07:31,580 Whenever you look at web scraping resources on the internet. 2345 02:07:31,820 --> 02:07:33,940 People say, oh, I have this JavaScript problem. 2346 02:07:34,360 --> 02:07:35,280 What should I do? 2347 02:07:35,420 --> 02:07:36,780 And people are like, just look at Selenium. 2348 02:07:36,820 --> 02:07:37,320 Just take it. 2349 02:07:37,340 --> 02:07:37,600 It's fine. 2350 02:07:37,840 --> 02:07:38,040 Go. 2351 02:07:38,220 --> 02:07:38,720 You're fine. 2352 02:07:39,260 --> 02:07:41,160 And we've never really thought past that. 2353 02:07:41,200 --> 02:07:41,980 Because it works. 2354 02:07:42,460 --> 02:07:43,580 It's really slow. 2355 02:07:44,100 --> 02:07:44,720 You know. 2356 02:07:44,800 --> 02:07:46,260 It takes up a ton of memory. 2357 02:07:46,560 --> 02:07:47,620 But it works. 2358 02:07:48,820 --> 02:07:50,280 I'm also guilty of this. 2359 02:07:52,680 --> 02:07:53,300 All right. 2360 02:07:53,460 --> 02:07:53,740 No. 2361 02:07:53,840 --> 02:07:54,180 It's actually. 2362 02:07:54,220 --> 02:07:55,340 Those are my two worst reviews. 2363 02:07:55,680 --> 02:07:57,660 It actually has 4.6 stars on Amazon. 2364 02:07:57,880 --> 02:07:59,960 It's being translated into Russian right now. 2365 02:08:00,020 --> 02:08:00,900 Which is like its fifth language. 2366 02:08:01,120 --> 02:08:02,860 It's sold over 20,000 copies. 2367 02:08:03,320 --> 02:08:05,460 Which apparently is a lot for a technical book. 2368 02:08:05,560 --> 02:08:06,260 I had no idea. 2369 02:08:06,900 --> 02:08:08,100 Not a lucrative field. 2370 02:08:09,520 --> 02:08:10,060 But, yeah. 2371 02:08:10,100 --> 02:08:10,680 Still doing good. 2372 02:08:10,880 --> 02:08:11,220 Anyway. 2373 02:08:11,940 --> 02:08:12,980 Summary of chapter 10. 2374 02:08:13,080 --> 02:08:14,660 This is what I did when I wrote chapter 10. 2375 02:08:14,760 --> 02:08:15,620 I mean, there's more to it. 2376 02:08:15,660 --> 02:08:16,540 But this is basically it. 2377 02:08:17,000 --> 02:08:17,600 You see. 2378 02:08:17,600 --> 02:08:18,800 I mean, just really simple things. 2379 02:08:19,380 --> 02:08:23,260 Let me do the translation. 2380 02:08:23,460 --> 02:08:23,660 I'm sorry. 2381 02:08:26,900 --> 02:08:28,200 But I'm going to do the translation. 2382 02:08:28,200 --> 02:08:31,380 This is going to be a great tip. 2383 02:08:31,380 --> 02:08:31,400 And I give it a 2.5 stars. 2384 02:08:31,520 --> 02:08:34,380 So, who not. 2385 02:08:34,380 --> 02:08:35,220 Better than me. 2386 02:08:35,320 --> 02:08:37,660 It's not even somebody. 2387 02:08:38,260 --> 02:08:39,000 So, if you have that. 2388 02:08:39,000 --> 02:08:39,040 There's somebody who's going to do it. 2389 02:08:39,040 --> 02:08:40,060 But there is someone who's going to do it. 2390 02:08:40,080 --> 02:08:40,520 But you're going to need someone to do it. 2391 02:08:40,740 --> 02:08:43,780 So, we're doing all three. 2392 02:08:43,780 --> 02:08:44,820 We're going to do over 100. 2393 02:08:46,200 --> 02:08:46,700 That's the most helpful. 2394 02:08:46,700 --> 02:08:47,580 This is the demand for this article. 2395 02:08:47,580 --> 02:08:55,960 sites. Oh, now it popped up. Look at that. This is HTML. It's not some weird flash thing, 2396 02:08:56,080 --> 02:09:04,760 but these are all SVGs. I would not even know because you have to click down in all of these 2397 02:09:04,760 --> 02:09:11,400 to even get the thing to pop up. Oh, that's weird. How would you scrape that? Even with 2398 02:09:11,400 --> 02:09:19,440 the Selenium, it can't be done. Give me a couple weeks and I don't know. But look at this. 2399 02:09:20,200 --> 02:09:29,940 What is this site? This is kind of screwed up. Oh, there we go. Okay. Oh, look at that. 2400 02:09:30,260 --> 02:09:35,000 Look at all of these things. Oh, what are all these things? My browser can't even load all 2401 02:09:35,000 --> 02:09:39,560 of it. There are so many things. Oh, and look at this. Oh, apparently you get the affiliate 2402 02:09:39,560 --> 02:09:41,380 IDs from over there. Oh, there you go. Oh, there you go. Oh, there you go. Oh, there you 2403 02:09:41,380 --> 02:09:44,940 you go it turns out you can literally just iterate through all these it starts 2404 02:09:44,940 --> 02:09:58,320 from zero goes up to like nine thousand something yeah that works way better so 2405 02:09:59,480 --> 02:10:03,640 why do we keep making web scrapers look like humans right so I give a lot of 2406 02:10:03,640 --> 02:10:06,620 talks about scraping and web security and I always describe this arms race 2407 02:10:06,620 --> 02:10:11,620 where we say hey you don't have the right headers you look like a Python 2408 02:10:11,620 --> 02:10:14,740 script so the Python scripts start putting headers in to look like humans 2409 02:10:14,740 --> 02:10:18,720 and then the the web scraper say wait a minute you're moving around the website 2410 02:10:18,720 --> 02:10:22,620 way too fast you filled out that form too quickly so then the scrapers say 2411 02:10:22,620 --> 02:10:26,100 like oh I'll fill out the form slow or I'll type slow or I'll press the button 2412 02:10:26,100 --> 02:10:30,280 slower and they're like wait a minute you don't even know what that image says 2413 02:10:30,280 --> 02:10:36,380 and the web scrapers are like OCR right but sometimes what you really need is 2414 02:10:36,380 --> 02:10:36,600 this 2415 02:10:36,600 --> 02:10:43,040 this right this isn't a human but it gets the job done a lot better right so 2416 02:10:43,040 --> 02:10:49,200 why should we use api's admins that bot add bot protection to the front end 2417 02:10:49,200 --> 02:10:53,920 because it's really easy it's really easy to do block the scrapers api's take 2418 02:10:53,920 --> 02:10:57,800 a lot of thought it's it's definitely not impossible it's not even that hard 2419 02:10:57,800 --> 02:11:03,140 but it takes thought which is a problem for some some web developers the problem 2420 02:11:03,140 --> 02:11:06,320 is that when you make an eight when your browser makes an 2421 02:11:06,320 --> 02:11:11,300 api request is essentially a bot making an api request right your browser is a 2422 02:11:11,300 --> 02:11:15,060 little program and it sends requests off and it gets things back and you know 2423 02:11:15,060 --> 02:11:21,640 and so it's it's much easier for a script to emulate the actions of just the 2424 02:11:21,640 --> 02:11:25,260 browser than it is for a script to emulate the actions of a human if that 2425 02:11:25,260 --> 02:11:30,340 makes sense so security is a little trickier with that sort of thing it's a 2426 02:11:30,340 --> 02:11:34,020 much lighter load for both servers and clients obviously it's a lot easier to 2427 02:11:34,020 --> 02:11:35,260 parse right 2428 02:11:36,000 --> 02:11:39,880 I'd rather just like dump some json and then pick out the thing I want then try 2429 02:11:39,880 --> 02:11:43,120 to figure out what their templates doing to the front end and why is the title 2430 02:11:43,120 --> 02:11:48,880 look like that and how do I take off the dollar sign and I don't know a lot 2431 02:11:48,880 --> 02:11:53,860 more metadata extra information I found this really cool API at Target where you 2432 02:11:53,860 --> 02:11:57,320 can tell so they have the sell price there and you can tell when the sell 2433 02:11:57,320 --> 02:12:01,780 price went into effect and when it's gonna be gone which is really cool but 2434 02:12:01,780 --> 02:12:04,180 they don't tell you that on the front of the website you can only see that in the 2435 02:12:04,180 --> 02:12:05,140 API that gives you the 2436 02:12:05,260 --> 02:12:09,380 sales the sell price and scrape once run everywhere 2437 02:12:09,900 --> 02:12:13,840 ok so here's the thing you have to use selenium to get all the api's in the 2438 02:12:13,840 --> 02:12:14,300 first place 2439 02:12:14,300 --> 02:12:18,360 I'll talk about that in a second but once you do that you use selenium a 2440 02:12:18,360 --> 02:12:19,020 couple of times 2441 02:12:19,480 --> 02:12:24,340 great now you can do your thousands of requests and then API request of course 2442 02:12:24,340 --> 02:12:28,320 could be modified in ways that the original site didn't intend right so 2443 02:12:28,320 --> 02:12:31,940 iterating through ID numbers to get all the pieces of data like in the crossfit 2444 02:12:31,940 --> 02:12:34,040 example automating pagination 2445 02:12:35,380 --> 02:12:40,320 you know another obvious one changing parameters to return lots of results 2446 02:12:40,320 --> 02:12:45,220 instead of just the ones you want again target.com look at stores near me 2447 02:12:45,530 --> 02:12:48,740 Oh 10 results what if I make it 10,000 results 2448 02:12:48,740 --> 02:12:53,820 oh look it's all of the targets right I love target because they don't really 2449 02:12:53,820 --> 02:12:56,120 protect their api's that much so it's a lot of fun 2450 02:12:57,220 --> 02:13:02,600 ok ok you get it we should use api's we find api's we should stop using selenium 2451 02:13:02,600 --> 02:13:04,340 so much but how do I do it Ryan? 2452 02:13:04,740 --> 02:13:05,240 ok you get it we should use api's we find api's we should stop using selenium so much but how do I do it Ryan? 2453 02:13:05,260 --> 02:13:10,580 all right so this is what I've been working on it's an API scraping tool and 2454 02:13:10,580 --> 02:13:15,740 you can run it from the command line and you can pass it in these cool little 2455 02:13:15,740 --> 02:13:22,900 these cool flags so here's your URL U for URL D for directory and then S for 2456 02:13:22,900 --> 02:13:25,640 search string and you can use any combination of these things that you 2457 02:13:25,640 --> 02:13:33,100 want so let me do a little example I don't know about the internet right now 2458 02:13:33,100 --> 02:13:35,240 not because of security but because I tried this last time 2459 02:13:35,260 --> 02:13:39,800 i am super slow and selenium loads up and it takes forever but I do have a 2460 02:13:39,800 --> 02:13:47,660 directory full of full of fun things so this is just like put these into 2461 02:13:47,660 --> 02:13:54,940 HAR files. HAR stands for HTTP archive so selenium loads up a huge stack of 2462 02:13:54,940 --> 02:13:58,920 things pushes into JSON files and then I parse them 2463 02:14:01,960 --> 02:14:04,560 alright so it finds all these API responses 2464 02:14:06,340 --> 02:14:09,040 There are a few methods of printing them out. 2465 02:14:10,000 --> 02:14:18,080 You can do the browser, you can do one of these things, you can view it as an HTML page, 2466 02:14:18,380 --> 02:14:20,400 there's also a JSON file that's pretty cool. 2467 02:14:21,540 --> 02:14:28,140 But you might be saying, wait a minute, this is just the same thing, we can do dumps anywhere, 2468 02:14:28,380 --> 02:14:28,600 right? 2469 02:14:29,020 --> 02:14:30,660 But not dumps like this. 2470 02:14:32,120 --> 02:14:32,600 Okay. 2471 02:14:32,600 --> 02:14:38,080 So, like I said before, you have a stack of Python, Selenium, Firefox, Firebug, and export 2472 02:14:38,480 --> 02:14:42,100 bunch of stuff with a layer of Python script on top. 2473 02:14:43,060 --> 02:14:46,800 Parse the resulting HAR files, the HP archive files for interesting stuff. 2474 02:14:47,360 --> 02:14:52,540 Then you can format the API call data in a useful way, which I don't think anyone's really 2475 02:14:52,540 --> 02:14:53,080 done before. 2476 02:14:54,200 --> 02:14:58,660 And then step two, this is a sort of like run anywhere step, right? 2477 02:14:58,760 --> 02:15:01,880 Which I am just trying to sort of think about and automate to some extent. 2478 02:15:02,800 --> 02:15:09,820 But the goal is to find the useful, specific, targeted API call to gather further data. 2479 02:15:10,060 --> 02:15:13,900 And of course, the big challenge of that is once you find the API call, how do you iterate 2480 02:15:13,900 --> 02:15:17,540 for the parameters and essentially crawl the site to iterate through those parameters? 2481 02:15:17,740 --> 02:15:18,700 But I have some thoughts on this. 2482 02:15:19,480 --> 02:15:20,120 All right. 2483 02:15:21,920 --> 02:15:23,260 So, here's what it does. 2484 02:15:23,580 --> 02:15:28,460 It encrypts the API calls with the same path and it records all the parameter values, so 2485 02:15:28,460 --> 02:15:31,640 you have like, you know, key value, key value, key value. 2486 02:15:34,120 --> 02:15:44,760 And it records all the key values that it sees and says, like, oh, for this key, here 2487 02:15:44,760 --> 02:15:48,040 are the array of values that you can put here. 2488 02:15:49,040 --> 02:15:51,240 Collects key values for both get and post. 2489 02:15:51,440 --> 02:15:53,320 Post key value pairs are a little bit different. 2490 02:15:54,160 --> 02:15:57,140 And it determines whether the parameters are necessary or not. 2491 02:15:57,400 --> 02:16:01,860 So, what it'll do is it'll take an API call and it'll just like one by one take off the 2492 02:16:01,880 --> 02:16:05,940 parameters and then it'll send the call back and say, like, oh, is the response the same? 2493 02:16:06,820 --> 02:16:11,000 And then it'll just like take those off and put them in a special little we don't need 2494 02:16:11,000 --> 02:16:15,640 you anymore group if it turns out that the API response is unchanged. 2495 02:16:16,840 --> 02:16:20,280 Then obviously several different types of data outputs depending on what you're into, 2496 02:16:20,460 --> 02:16:21,860 HTML, JSON, or the console. 2497 02:16:22,780 --> 02:16:26,280 And then the cool thing about this is that they have, I have these in the nice little 2498 02:16:26,280 --> 02:16:30,400 Python objects and I think there's a lot of flexibility there for more advanced parsing. 2499 02:16:31,320 --> 02:16:34,000 So, a little more about the unnecessary parameters. 2500 02:16:34,460 --> 02:16:39,240 So, you might have something like this, which is a real API call from target. 2501 02:16:40,580 --> 02:16:44,640 And then they have this and I think that this is just like some internal tracking metric. 2502 02:16:45,360 --> 02:16:48,220 So, it's probably best that we get rid of it. 2503 02:16:48,300 --> 02:16:49,160 It might be dangerous. 2504 02:16:51,860 --> 02:16:52,500 All right. 2505 02:16:52,540 --> 02:16:53,660 Path values is arguments. 2506 02:16:53,940 --> 02:16:55,200 This is the trickiest one. 2507 02:16:56,120 --> 02:16:59,200 And so, you have this thing here. 2508 02:16:59,600 --> 02:17:00,620 At the end. 2509 02:17:01,660 --> 02:17:06,480 Is that, that's obviously a parameter because we're humans and we can look at that and say, 2510 02:17:06,560 --> 02:17:07,600 oh, yeah, that's a parameter. 2511 02:17:08,760 --> 02:17:12,960 But what if it said similar products? 2512 02:17:14,340 --> 02:17:15,700 Is it the fact that it's numbers? 2513 02:17:15,960 --> 02:17:19,480 Does that mean it's an argument instead of an important path thing? 2514 02:17:19,640 --> 02:17:20,140 I don't know. 2515 02:17:20,280 --> 02:17:21,840 So, I did some best guessing with that. 2516 02:17:21,960 --> 02:17:26,900 I said, well, if it's at the end and I see a lot of similar API calls and it has a lot 2517 02:17:26,900 --> 02:17:28,980 of numbers in it, then it's probably a parameter. 2518 02:17:29,200 --> 02:17:30,180 But that's a really tricky one. 2519 02:17:30,240 --> 02:17:31,360 That's one I'm still working on. 2520 02:17:31,740 --> 02:17:36,380 But it does group those the same way it would group them if they were the exact same path 2521 02:17:36,380 --> 02:17:37,060 with different values. 2522 02:17:37,180 --> 02:17:40,200 And I keep track of the path parameters in a different way. 2523 02:17:40,920 --> 02:17:41,320 Okay. 2524 02:17:42,300 --> 02:17:44,700 So, there are a lot of short-term directions to go in with this. 2525 02:17:45,000 --> 02:17:48,840 So, obviously, more development with the web-based tool, drill down to explore APIs. 2526 02:17:49,020 --> 02:17:54,920 And this one is really important for me because I think that it will really allow people who 2527 02:17:54,920 --> 02:17:58,480 may not have the programming experience to say, oh, wow. 2528 02:17:58,480 --> 02:17:59,340 This is awesome. 2529 02:17:59,620 --> 02:18:01,020 There's all my data right there. 2530 02:18:01,460 --> 02:18:01,900 Done. 2531 02:18:02,140 --> 02:18:03,840 I don't need to bother with Selenium anymore. 2532 02:18:04,640 --> 02:18:06,820 Also, some APIs hide their content type. 2533 02:18:06,980 --> 02:18:08,460 So, they could say, oh, no. 2534 02:18:08,540 --> 02:18:09,620 This is just plain text. 2535 02:18:09,820 --> 02:18:11,840 But actually, it's JSON or something. 2536 02:18:13,020 --> 02:18:17,280 So, you know, that would slow the runtime a little bit to, like, try to parse everything 2537 02:18:17,280 --> 02:18:21,160 as every single category of response that we might be looking for. 2538 02:18:21,320 --> 02:18:22,480 But it could also be useful. 2539 02:18:23,120 --> 02:18:25,160 Also, I'm not doing any cookie tracking right now. 2540 02:18:25,220 --> 02:18:27,580 I found that it's not that big of a deal. 2541 02:18:27,580 --> 02:18:31,040 Like, websites don't really seem to care one way or the other. 2542 02:18:31,300 --> 02:18:33,960 What I found is the front end always cares. 2543 02:18:34,400 --> 02:18:38,260 Like, the front end of the website, like, super-duper cares what your cookies are and 2544 02:18:38,260 --> 02:18:39,980 what they say and what your user agent is. 2545 02:18:40,140 --> 02:18:43,400 But the APIs, not so much, which I thought was kind of interesting. 2546 02:18:44,880 --> 02:18:48,420 Search for other kinds of result content, CSV, plain text. 2547 02:18:49,320 --> 02:18:51,080 JavaScript is such a weird thing. 2548 02:18:51,300 --> 02:18:51,600 I don't know. 2549 02:18:51,620 --> 02:18:56,440 Sometimes people put data in the JavaScript, and it would be absolutely possible to search 2550 02:18:56,440 --> 02:18:57,980 for a specific string in JavaScript. 2551 02:18:58,300 --> 02:19:03,040 So maybe they embed, like, the title of a page that you want in some convoluted, stupid 2552 02:19:03,040 --> 02:19:04,880 JavaScript text file. 2553 02:19:05,260 --> 02:19:05,740 Sure. 2554 02:19:05,820 --> 02:19:06,400 I could do that. 2555 02:19:06,560 --> 02:19:13,280 As far as actually parsing it as data and putting it in some useful format, that's another 2556 02:19:13,280 --> 02:19:13,640 stretch. 2557 02:19:13,780 --> 02:19:14,920 So I've kind of ignored JavaScript. 2558 02:19:16,820 --> 02:19:18,000 This is the cool thing. 2559 02:19:18,300 --> 02:19:23,600 So remember when I said earlier about traditional web scraping being lame or web crawling being 2560 02:19:23,600 --> 02:19:25,540 lame because it only follows, like, the anchor tags? 2561 02:19:25,540 --> 02:19:29,800 Well, we get all this response content back, and we can actually treat it like data. 2562 02:19:29,900 --> 02:19:35,420 We can actually look for URLs, not URLs in the DOM and not URLs in the HTML and anchor 2563 02:19:35,420 --> 02:19:37,760 tags, but any URLs. 2564 02:19:38,180 --> 02:19:40,000 And we can see if they're internal or external. 2565 02:19:40,300 --> 02:19:44,260 I don't really bother with external, like, following external URLs so much because then 2566 02:19:44,260 --> 02:19:46,500 you're out in the wide-open internet, and who knows? 2567 02:19:47,180 --> 02:19:51,580 But internal URLs, following those, seeing where those lead, that would be pretty cool. 2568 02:19:53,540 --> 02:19:55,420 And then automating the second step. 2569 02:19:56,820 --> 02:19:59,660 So this is the one where you get the API that you want. 2570 02:19:59,780 --> 02:20:04,000 You say, this is my search string, and this is, like, the title of the page or the price 2571 02:20:04,000 --> 02:20:07,600 of the product or something, and I've entered this, and I get this API back, and apparently 2572 02:20:07,600 --> 02:20:08,620 this thing has it. 2573 02:20:09,780 --> 02:20:14,940 But how might you be able to sort of automate the rest of the script and go out and find 2574 02:20:14,940 --> 02:20:18,760 all of the other prices and all of the other titles and all of the other images and all 2575 02:20:18,760 --> 02:20:21,700 the things that you want to really build up your database from just one instance? 2576 02:20:23,820 --> 02:20:25,520 So currently, the user enters a script. 2577 02:20:25,520 --> 02:20:28,580 It has a complete search string to match on with the page that it's found on. 2578 02:20:29,100 --> 02:20:31,860 The web scraper automatically identifies two pieces of information. 2579 02:20:32,200 --> 02:20:34,620 Which API call returns the search string? 2580 02:20:34,780 --> 02:20:35,800 And this is already done. 2581 02:20:36,560 --> 02:20:40,580 And where in the response that information is located? 2582 02:20:40,960 --> 02:20:46,540 So we can tell whether or not it's XML or JSON or whatever, and we can also record, 2583 02:20:46,820 --> 02:20:50,340 oh, you go this way down the tree, and your search string is here. 2584 02:20:50,600 --> 02:20:54,920 And we can assume that with all the similar API calls, you go this way down the string, 2585 02:20:55,520 --> 02:20:56,860 and it's going to be there every single time. 2586 02:20:57,200 --> 02:20:58,300 Now, here's the trick. 2587 02:20:58,780 --> 02:21:01,880 You need to find those similar API calls, right? 2588 02:21:03,400 --> 02:21:08,600 And to find those similar API calls, you need to be able to iterate the parameter values. 2589 02:21:09,440 --> 02:21:12,660 So we can find the parameter values required for the API call. 2590 02:21:12,740 --> 02:21:13,420 That's already done. 2591 02:21:14,260 --> 02:21:17,520 And where those parameter values can be found? 2592 02:21:17,880 --> 02:21:18,440 OK. 2593 02:21:20,900 --> 02:21:21,940 This is a little tricky. 2594 02:21:22,080 --> 02:21:25,440 So you're treating the parameter values as a search string again. 2595 02:21:25,520 --> 02:21:28,220 And you are searching for them in the content. 2596 02:21:31,240 --> 02:21:33,300 Then you find other search parameters. 2597 02:21:33,560 --> 02:21:41,060 So the scraper must identify locations of analogous API calls and their associated parameters. 2598 02:21:42,280 --> 02:21:47,400 And this can be done by identifying analogous URLs, not necessarily HTML URLs, 2599 02:21:47,640 --> 02:21:51,340 that link to these required API call parameters. 2600 02:21:52,620 --> 02:21:54,540 And then as a side note also, 2601 02:21:54,540 --> 02:21:59,320 some parameters aren't necessarily like lettered number combination product IDs, 2602 02:21:59,480 --> 02:22:02,840 but they're just like zip codes or, like I showed you before, the incremented IDs. 2603 02:22:03,080 --> 02:22:04,440 And those are a pretty trivial case. 2604 02:22:05,280 --> 02:22:08,360 Although recognizing as a zip code and saying, oh, here's a list of zip codes. 2605 02:22:08,520 --> 02:22:10,020 I don't know how far I want to take it. 2606 02:22:13,200 --> 02:22:13,880 All right. 2607 02:22:14,940 --> 02:22:16,420 So here's a more concrete example. 2608 02:22:17,400 --> 02:22:23,560 Let's say you have a website, a web page in HTML, 2609 02:22:23,560 --> 02:22:25,960 a piece of HTML that you are searching. 2610 02:22:27,480 --> 02:22:29,580 Products prod name blarg123. 2611 02:22:29,640 --> 02:22:31,660 Note that that is not indicative of anything. 2612 02:22:32,360 --> 02:22:34,620 And you're searching for the string, the product name. 2613 02:22:34,720 --> 02:22:37,140 You want to collect a list of product names from this website, right? 2614 02:22:38,500 --> 02:22:41,440 So you go and you do the Selenium thing on this page. 2615 02:22:41,760 --> 02:22:47,480 And you find that, oh, hey, there's this cool API that returns the product name. 2616 02:22:47,900 --> 02:22:48,300 OK. 2617 02:22:48,380 --> 02:22:49,580 So that's probably the one that I want. 2618 02:22:49,660 --> 02:22:51,720 That is the target, not target the store. 2619 02:22:51,900 --> 02:22:52,900 Oh, god, this is confusing. 2620 02:22:53,560 --> 02:22:58,160 Not target the store, but target the goal API call that contains the information we want. 2621 02:22:59,320 --> 02:23:02,440 So the path is that, and the parameters are that, right? 2622 02:23:02,840 --> 02:23:09,540 And then you find that there are several different API calls of this exact same format 2623 02:23:10,580 --> 02:23:13,160 in this second API call. 2624 02:23:13,300 --> 02:23:17,740 This related products type equals some market segment not related to anything else. 2625 02:23:18,020 --> 02:23:18,540 Great. 2626 02:23:18,680 --> 02:23:19,240 Awesome. 2627 02:23:19,500 --> 02:23:21,140 So now you have a second API. 2628 02:23:21,500 --> 02:23:23,420 And you're building this thing sort of recursively. 2629 02:23:23,560 --> 02:23:23,800 Dumb. 2630 02:23:24,320 --> 02:23:28,640 And the market segment, that parameter, we can use that as a search string. 2631 02:23:29,220 --> 02:23:35,100 And we can see, has anything we've seen so far in this path had that parameter in it? 2632 02:23:35,720 --> 02:23:36,240 OK. 2633 02:23:36,600 --> 02:23:39,560 And then we say, oh, that page does. 2634 02:23:40,300 --> 02:23:45,080 In practice, maybe this little recursive thing could go down for a really, really long time, right? 2635 02:23:45,340 --> 02:23:51,260 So then you have this product info page that you use to get the ID, 2636 02:23:51,260 --> 02:23:56,380 the string search term market segment that you then use to get a list of related products. 2637 02:23:56,680 --> 02:23:57,120 OK. 2638 02:23:57,360 --> 02:24:00,220 Now you go to all those related products, product infos page. 2639 02:24:00,560 --> 02:24:03,420 And then you get another market segment, right? 2640 02:24:03,660 --> 02:24:06,500 And then you go to all their related product pages. 2641 02:24:06,640 --> 02:24:08,000 And then you get the product info pages for them. 2642 02:24:08,300 --> 02:24:13,520 And all of a sudden, you've built this sort of crawler that's not crawling through the HTML website. 2643 02:24:14,280 --> 02:24:19,160 It's literally crawling through the APIs by doing like a one-time analysis 2644 02:24:19,160 --> 02:24:22,280 of the network traffic for a single page load. 2645 02:24:23,940 --> 02:24:28,380 And there's, actually, this is more confusing now than when I wrote it. 2646 02:24:30,140 --> 02:24:33,800 This kind of goes like this until eventually you can loop it back up around. 2647 02:24:34,240 --> 02:24:35,300 So that would be cool. 2648 02:24:38,540 --> 02:24:39,140 All right. 2649 02:24:39,180 --> 02:24:40,740 This seems really complicated, Ryan. 2650 02:24:40,980 --> 02:24:41,820 What are you doing? 2651 02:24:42,740 --> 02:24:44,280 Yeah, it might be complicated. 2652 02:24:44,440 --> 02:24:46,400 But so are a lot of modern web scraping tools. 2653 02:24:46,620 --> 02:24:49,140 And I find that a little bit of complexity on the back end, 2654 02:24:49,160 --> 02:24:51,280 can save people a lot of headache. 2655 02:24:51,440 --> 02:24:54,740 And maybe help them discover things that they might not have seen otherwise. 2656 02:24:55,260 --> 02:24:58,640 And discover useful tricks and even some vulnerabilities. 2657 02:24:59,020 --> 02:24:59,560 Who knows? 2658 02:25:00,420 --> 02:25:05,600 We also need to stop thinking of web scraping as just scraping front-end pages containing data. 2659 02:25:05,940 --> 02:25:06,380 Right? 2660 02:25:06,480 --> 02:25:10,060 And it's really tempting because we see that data in our browser and we're like, 2661 02:25:10,120 --> 02:25:11,220 oh, I want that one. 2662 02:25:11,560 --> 02:25:12,080 Right? 2663 02:25:12,180 --> 02:25:14,420 And then we write the script and we're like, get me that one. 2664 02:25:14,800 --> 02:25:18,500 But really, we need to be thinking about it as a collection of calls. 2665 02:25:18,500 --> 02:25:21,280 And increasingly so with all the JavaScript we're seeing now. 2666 02:25:22,140 --> 02:25:25,400 And we also need to stop thinking about web crawling as traversing anchor tags. 2667 02:25:25,620 --> 02:25:31,980 We need to start thinking about it as finding addresses for things and finding parameters 2668 02:25:31,980 --> 02:25:35,120 and figuring out where the information is actually contained 2669 02:25:35,120 --> 02:25:37,220 and how it links to other pieces of information. 2670 02:25:38,460 --> 02:25:42,200 And I really think that applying traffic monitoring techniques, string parsing, 2671 02:25:42,200 --> 02:25:46,200 and a little common sense to get data better, stronger, and faster is a good thing. 2672 02:25:47,120 --> 02:25:47,820 All right. 2673 02:25:47,900 --> 02:25:48,480 Any questions? 2674 02:25:50,940 --> 02:25:52,000 I'm six feet tall. 2675 02:25:52,360 --> 02:25:53,060 All right. 2676 02:25:54,200 --> 02:25:55,180 Yes, you there. 2677 02:25:55,980 --> 02:26:02,240 So have you tried running it through a proxy to see the actual web service calls? 2678 02:26:03,380 --> 02:26:06,700 And then just try to figure out what the actual... 2679 02:26:06,700 --> 02:26:09,960 So running it through a proxy to see the actual web service calls? 2680 02:26:10,260 --> 02:26:12,160 Yes, that's what I'm doing with Selenium. 2681 02:26:12,260 --> 02:26:17,860 So you fire up the Selenium as a browser automation tool, and then I just record all of the web 2682 02:26:17,860 --> 02:26:18,480 service calls. 2683 02:26:18,500 --> 02:26:22,800 But the cool thing is you only need to do that for a couple of pages to sort of get 2684 02:26:22,800 --> 02:26:26,720 the sense of how the website's put together and then create more generalized approach. 2685 02:26:27,760 --> 02:26:28,160 Yeah? 2686 02:26:30,940 --> 02:26:37,460 I'm not sure how good of a question this is, but what do you do when you start 2687 02:26:37,460 --> 02:26:41,700 getting throttled by certain web services that after you do all these API calls just 2688 02:26:41,700 --> 02:26:42,440 kind of cut you off? 2689 02:26:42,620 --> 02:26:43,480 Is there a way to handle that? 2690 02:26:45,460 --> 02:26:46,260 Slow down. 2691 02:26:46,260 --> 02:26:46,500 Slow down. 2692 02:26:47,100 --> 02:26:49,180 No, and there's actually a really good reason for this. 2693 02:26:49,220 --> 02:26:50,220 It's not just being nice. 2694 02:26:51,020 --> 02:26:57,000 So when you start to get throttled and things like, so, okay, terms of service and things 2695 02:26:57,000 --> 02:27:04,480 like that, you browser wrap and click through and, oh, no, I have, like, a thing stuck in 2696 02:27:04,480 --> 02:27:05,780 my Thunderport. 2697 02:27:06,220 --> 02:27:07,080 It won't quit. 2698 02:27:07,280 --> 02:27:07,860 Oh, it's okay. 2699 02:27:09,140 --> 02:27:11,220 Yeah, so you agree to the thing. 2700 02:27:11,420 --> 02:27:15,740 It doesn't actually mean anything until they start sending you cease and desist letters 2701 02:27:15,740 --> 02:27:16,240 and throttling. 2702 02:27:16,240 --> 02:27:17,240 They're just throttling you and blocking you. 2703 02:27:17,980 --> 02:27:22,000 Now, if you say, ha, screw them, I don't need to listen to them. 2704 02:27:22,520 --> 02:27:27,020 I'm just going to, you know, use a different IP address and then go somewhere else and 2705 02:27:27,020 --> 02:27:29,920 go into a Starbucks and open my laptop, ha, they'll never know it's me. 2706 02:27:30,820 --> 02:27:33,640 That's where it actually becomes illegal and you can get sued. 2707 02:27:34,980 --> 02:27:36,120 So don't do that. 2708 02:27:42,600 --> 02:27:43,000 Thanks. 2709 02:27:45,820 --> 02:27:46,220 Thanks. 2710 02:27:46,240 --> 02:27:53,880 What do you do if the entry points are moved all to, what do you do if all the APIs are 2711 02:27:53,880 --> 02:27:57,420 moved into a single entry point and the parameters are encoded? 2712 02:27:58,840 --> 02:28:00,300 Well, besides cursing. 2713 02:28:05,200 --> 02:28:09,600 So if the APIs are moved into a single entry point, like, all the data you want is in that 2714 02:28:09,600 --> 02:28:10,400 single entry point? 2715 02:28:11,000 --> 02:28:13,560 That's what the old-fashioned web used to be, right? 2716 02:28:13,680 --> 02:28:16,040 So we would make this API callback. 2717 02:28:16,040 --> 02:28:16,640 Right? 2718 02:28:16,880 --> 02:28:21,100 And we would get back this, like, HTML file that would contain, like, all the data. 2719 02:28:21,220 --> 02:28:21,400 Right? 2720 02:28:22,500 --> 02:28:22,900 Okay. 2721 02:28:22,980 --> 02:28:23,560 Maybe I'm misunderstanding. 2722 02:28:34,100 --> 02:28:34,900 Well, yeah. 2723 02:28:35,200 --> 02:28:35,600 Okay. 2724 02:28:35,880 --> 02:28:37,600 Let's stay with encoded parameters. 2725 02:28:39,160 --> 02:28:39,560 Okay. 2726 02:28:39,560 --> 02:28:41,180 I don't think she can hear the first part of the entry point. 2727 02:28:41,440 --> 02:28:41,940 Do you? 2728 02:28:42,280 --> 02:28:42,680 Okay. 2729 02:28:43,160 --> 02:28:44,540 Forget the entry points. 2730 02:28:44,620 --> 02:28:46,020 But encoded parameters. 2731 02:28:46,040 --> 02:28:48,860 If they're encoded for security reasons? 2732 02:28:53,440 --> 02:28:54,840 So, yeah, encoded parameters. 2733 02:28:56,420 --> 02:28:57,920 Basically, all of them are encoded. 2734 02:28:58,000 --> 02:28:59,080 So you have, like, a product ID. 2735 02:28:59,320 --> 02:29:01,400 I can't tell what that means, right? 2736 02:29:01,500 --> 02:29:03,200 It's just, like, a random string of things. 2737 02:29:03,320 --> 02:29:07,460 But the thing is you can find that random string of things somewhere else in the vast 2738 02:29:07,460 --> 02:29:10,060 collection of other information. 2739 02:29:10,120 --> 02:29:12,720 And at some point, it kind of has to reference it. 2740 02:29:12,820 --> 02:29:16,020 So you might find that random string somewhere else in the vast collection of other information. 2741 02:29:16,020 --> 02:29:18,360 And it makes an API call and gets information about the product. 2742 02:29:18,460 --> 02:29:21,300 Now you know that that product or that piece of information 2743 02:29:21,300 --> 02:29:24,060 and that random string are related, right? 2744 02:29:24,220 --> 02:29:26,660 And so you might have to load some things to see what they are. 2745 02:29:27,000 --> 02:29:31,380 But, you know, the problem with encoding API responses 2746 02:29:31,380 --> 02:29:35,560 is that at some point they have to be decoded, right? 2747 02:29:35,680 --> 02:29:40,320 And we're pretty used to dealing with IDs and random strings and things like that. 2748 02:29:40,460 --> 02:29:43,780 But at some point, humans have to be able to read it. 2749 02:29:43,780 --> 02:29:46,960 And there may be a very long sort of daisy chain of things 2750 02:29:46,960 --> 02:29:50,520 until you can attach the encoded thing to the meaning. 2751 02:29:50,680 --> 02:29:52,780 But at some point it does have a meaning that can be deduced. 2752 02:29:53,520 --> 02:29:56,500 So I know that's a little hand-wavy, but I hope it answers. 2753 02:29:57,900 --> 02:29:59,120 Any one question? 2754 02:30:10,840 --> 02:30:13,380 So you had mentioned the issues. 2755 02:30:13,380 --> 02:30:22,620 You were running into detecting if a path was a parameter or an input. 2756 02:30:22,780 --> 02:30:26,480 I was wondering, as you're supplying it, especially with search boxes, 2757 02:30:26,540 --> 02:30:29,100 if there is something that you automate as part of Selenium 2758 02:30:29,100 --> 02:30:33,220 to fill in those search boxes and then look back at your paths 2759 02:30:33,220 --> 02:30:37,480 or other previous API calls to do the looks to see if that path ends up becoming, 2760 02:30:38,080 --> 02:30:42,120 well, coming from either previous API or your previous provided inputs. 2761 02:30:52,360 --> 02:30:54,140 All right, so that's a really good question. 2762 02:30:54,300 --> 02:30:55,560 And a couple things about that. 2763 02:30:55,700 --> 02:30:58,260 So I am not filling out search boxes or doing anything. 2764 02:30:58,600 --> 02:31:01,120 So actually, I am moving down the page. 2765 02:31:01,220 --> 02:31:04,680 I do use the scroll bar to make sure the page sits around there for a little while 2766 02:31:04,680 --> 02:31:06,240 and everything has a chance to do its thing. 2767 02:31:06,480 --> 02:31:10,440 And also, there's a lot of new stuff where certain scripts won't be activated 2768 02:31:10,440 --> 02:31:12,660 until you actually view them in the browser window. 2769 02:31:13,620 --> 02:31:17,600 But it doesn't automatically click through anything or mess with things 2770 02:31:17,600 --> 02:31:18,680 or enter information. 2771 02:31:19,020 --> 02:31:20,460 You can certainly make it do that. 2772 02:31:20,520 --> 02:31:21,680 That wouldn't be difficult at all. 2773 02:31:22,040 --> 02:31:23,180 But I haven't done that. 2774 02:31:25,620 --> 02:31:27,180 And that's a really interesting question. 2775 02:31:27,360 --> 02:31:30,200 So providing a new path and seeing if the information, 2776 02:31:30,440 --> 02:31:32,840 if the structure of the information remains the same. 2777 02:31:32,940 --> 02:31:34,300 And that would be a really good way of doing that. 2778 02:31:34,380 --> 02:31:35,720 That's certainly something I've thought about. 2779 02:31:38,360 --> 02:31:40,260 Yeah, I could certainly work that in. 2780 02:31:40,400 --> 02:31:43,300 The trick is figuring out, like, where are these different parameters? 2781 02:31:43,860 --> 02:31:44,260 Right? 2782 02:31:44,460 --> 02:31:46,020 So you have this API call. 2783 02:31:46,180 --> 02:31:48,080 You have a different ending at the end. 2784 02:31:48,820 --> 02:31:51,400 It would be helpful to see a lot of different examples of that. 2785 02:31:51,460 --> 02:31:53,200 So you could sort of compare the different structures. 2786 02:31:54,120 --> 02:31:56,200 But sometimes you get that and sometimes you don't. 2787 02:31:56,340 --> 02:31:59,200 So it's a really good idea, though. 2788 02:32:01,540 --> 02:32:03,300 When are you making a burp plug-in? 2789 02:32:11,300 --> 02:32:12,740 What is a burp? 2790 02:32:13,380 --> 02:32:14,480 It's a man-in-the-middle proxy. 2791 02:32:14,660 --> 02:32:15,140 What? 2792 02:32:15,420 --> 02:32:18,360 It's a man-in-the-middle proxy for application security testing. 2793 02:32:18,560 --> 02:32:21,000 It allows for automated buzzing and . 2794 02:32:21,000 --> 02:32:21,980 Okay. 2795 02:32:23,400 --> 02:32:26,720 So I'm crawling the web and then there's a man in the middle. 2796 02:32:26,880 --> 02:32:30,320 And then all of a sudden I'm getting back bad web data? 2797 02:32:30,680 --> 02:32:32,000 What would I do with this? 2798 02:32:32,320 --> 02:32:40,780 So burp allows for automated reg expression-based completion 2799 02:32:40,780 --> 02:32:43,300 and changing of different web requests, 2800 02:32:43,640 --> 02:32:45,740 as well as keeping the history of the requests 2801 02:32:45,740 --> 02:32:48,240 so that you can, like, wrap it up into a nice report. 2802 02:32:49,040 --> 02:32:51,640 And also allows for automated fuzzing of parameters 2803 02:32:51,640 --> 02:32:55,480 to determine if, for example, SQL injection or other such problems. 2804 02:32:55,880 --> 02:32:58,940 So with your API calls, it would be really easy to integrate it into something 2805 02:32:58,940 --> 02:33:00,680 that's like, hey, these are the things you want to fuzz. 2806 02:33:01,960 --> 02:33:04,140 So that might be useful. 2807 02:33:04,440 --> 02:33:05,320 A couple thoughts. 2808 02:33:05,540 --> 02:33:07,920 First, I'm not really trying to attack the servers. 2809 02:33:08,100 --> 02:33:08,900 I like the servers. 2810 02:33:09,040 --> 02:33:09,880 They give me useful data. 2811 02:33:09,880 --> 02:33:11,640 I don't want to inject things into them. 2812 02:33:12,260 --> 02:33:15,120 And the other thing is generally with web scraping you say, 2813 02:33:15,300 --> 02:33:19,460 okay, I need this list of 10,000 specific things. 2814 02:33:19,620 --> 02:33:21,060 I want all of these articles. 2815 02:33:21,340 --> 02:33:22,680 I want all of these different products. 2816 02:33:22,840 --> 02:33:25,420 I want all of these SEC filings. 2817 02:33:26,480 --> 02:33:27,800 It's a very concrete list. 2818 02:33:27,980 --> 02:33:31,500 So it's not like throw something random at it and see what comes back, 2819 02:33:31,600 --> 02:33:32,340 for the most part. 2820 02:33:32,480 --> 02:33:35,240 It's like I want this concrete set of data. 2821 02:33:35,460 --> 02:33:38,660 So that might have some really useful tools. 2822 02:33:38,720 --> 02:33:39,460 That sounds really cool. 2823 02:33:39,880 --> 02:33:40,340 I hadn't heard of it. 2824 02:33:40,880 --> 02:33:45,580 But I think the application might be slightly, slightly different. 2825 02:33:45,780 --> 02:33:46,500 But I'll have to check it out. 2826 02:33:54,340 --> 02:33:56,160 You kind of mentioned cookies but didn't. 2827 02:33:56,820 --> 02:34:01,200 But I guess the APIs that you're touching right now, like the target API, 2828 02:34:01,420 --> 02:34:02,700 doesn't really rely too much on that. 2829 02:34:02,860 --> 02:34:06,760 But have you run into situations where you have to bootstrap the call with, 2830 02:34:06,860 --> 02:34:08,660 let's say, a cookie value, 2831 02:34:08,660 --> 02:34:10,820 so that you can make all your subsequent calls? 2832 02:34:11,000 --> 02:34:13,880 And are you kind of thinking of building that into your script? 2833 02:34:17,040 --> 02:34:19,680 So that was actually exactly what I said on my suggested 2834 02:34:19,680 --> 02:34:21,640 or like future development slide. 2835 02:34:21,760 --> 02:34:25,060 So right now I haven't actually had a problem with cookies and API calls. 2836 02:34:26,040 --> 02:34:28,040 I've been testing this across a bunch of different sites. 2837 02:34:28,220 --> 02:34:30,540 And I've used it for a couple practical applications. 2838 02:34:30,960 --> 02:34:31,980 Haven't run into the cookie problem. 2839 02:34:32,120 --> 02:34:35,040 But it's absolutely a parameter that is important in the web in general 2840 02:34:35,040 --> 02:34:38,180 and something that would be good to build in in the future. 2841 02:34:38,180 --> 02:34:39,380 And it's easy enough to do. 2842 02:34:54,840 --> 02:34:59,200 Is there any plan for adding this in your book, like a chapter or something? 2843 02:35:07,040 --> 02:35:12,440 O'Reilly said maybe in 2017 we can start talking about like a second edition. 2844 02:35:13,300 --> 02:35:14,900 So I got plans. 2845 02:35:15,320 --> 02:35:16,000 I got plans. 2846 02:35:16,120 --> 02:35:16,460 We'll see. 2847 02:35:18,760 --> 02:35:19,600 Yeah, a question. 2848 02:35:19,700 --> 02:35:24,840 Have you used your scraper on anything that's required authentication or OAuth 2849 02:35:24,840 --> 02:35:25,660 or anything like that? 2850 02:35:25,740 --> 02:35:28,640 Or have you thought about putting in another module for authentication? 2851 02:35:32,100 --> 02:35:36,940 So one of the things you can do pretty easily is log in with Selenium 2852 02:35:36,940 --> 02:35:39,980 because obviously there's a lot of like crazy stuff going on. 2853 02:35:40,880 --> 02:35:42,700 And then you can just copy the cookies. 2854 02:35:43,400 --> 02:35:44,780 I haven't had to. 2855 02:35:44,880 --> 02:35:46,120 But it's definitely possible. 2856 02:35:48,020 --> 02:35:50,200 So yeah, it's definitely possible. 2857 02:35:50,420 --> 02:35:51,120 I haven't done it yet. 2858 02:35:51,260 --> 02:35:52,880 But it might be something that's necessary. 2859 02:35:56,140 --> 02:35:58,480 So with Selenium you can detect. 2860 02:35:58,480 --> 02:36:04,780 You can detect Selenium from JavaScript because it mutates the API. 2861 02:36:05,480 --> 02:36:09,180 Have you dealt with anyone who does not want. 2862 02:36:09,540 --> 02:36:10,320 What do you mean it mutates the API? 2863 02:36:10,780 --> 02:36:13,720 Well, for example, with Firefox driver. 2864 02:36:14,100 --> 02:36:20,420 They add a web driver property to the navigator element in the DOM. 2865 02:36:21,880 --> 02:36:26,440 Have you gotten into this cat and mouse game at all 2866 02:36:26,440 --> 02:36:27,080 with the. 2867 02:36:28,700 --> 02:36:29,520 I'm not a bot. 2868 02:36:29,720 --> 02:36:30,880 But I'm going to try and look like a bot. 2869 02:36:31,880 --> 02:36:32,720 That type of thing. 2870 02:36:33,640 --> 02:36:37,980 You know, I keep hearing about this Selenium you can always detect it thing. 2871 02:36:38,120 --> 02:36:39,980 But I never knew exactly why. 2872 02:36:40,220 --> 02:36:41,640 And honestly, like I've searched for it. 2873 02:36:41,720 --> 02:36:42,860 I've never been able to find it. 2874 02:36:42,920 --> 02:36:45,100 And I've never found a website that blocked me because of it. 2875 02:36:45,580 --> 02:36:46,740 And that's part. 2876 02:36:46,900 --> 02:36:49,860 You know, to what I said earlier about like security takes some thought. 2877 02:36:49,940 --> 02:36:53,580 Especially on the API layer rather than like the HTML front end DOM layer. 2878 02:36:54,160 --> 02:36:55,980 And I've just never seen anyone do it. 2879 02:36:56,160 --> 02:36:56,520 . 2880 02:36:57,900 --> 02:36:58,340 Okay. 2881 02:36:58,620 --> 02:36:59,480 I'll check it out. 2882 02:37:00,360 --> 02:37:01,160 That makes sense. 2883 02:37:02,560 --> 02:37:03,000 . 2884 02:37:04,920 --> 02:37:05,360 Sorry. 2885 02:37:05,500 --> 02:37:07,900 I guess you can use it to fuzz things. 2886 02:37:08,000 --> 02:37:08,220 Right? 2887 02:37:08,540 --> 02:37:13,080 So sort of you identify all the API calls and then identify the data structures that 2888 02:37:13,080 --> 02:37:13,460 you're using. 2889 02:37:13,580 --> 02:37:19,560 And then sort of send them some weird values and see how they react and get that stuff 2890 02:37:19,560 --> 02:37:19,880 back. 2891 02:37:21,620 --> 02:37:22,740 Would you thinking. 2892 02:37:22,980 --> 02:37:23,840 So I got two questions. 2893 02:37:24,600 --> 02:37:25,400 Sort of that. 2894 02:37:25,540 --> 02:37:25,820 And then. 2895 02:37:25,960 --> 02:37:26,500 I agree. 2896 02:37:26,500 --> 02:37:27,440 Are you coming to the DEF CON party? 2897 02:37:28,840 --> 02:37:29,280 . 2898 02:37:32,920 --> 02:37:33,360 Yes. 2899 02:37:33,520 --> 02:37:34,880 So sending them weird values. 2900 02:37:35,000 --> 02:37:36,360 You mean like weird hacking values? 2901 02:37:37,220 --> 02:37:40,040 Or like weird I want this different set of data values? 2902 02:37:40,620 --> 02:37:41,600 Because you could do both. 2903 02:37:41,800 --> 02:37:43,660 I mean there's nothing stopping you from doing both. 2904 02:37:44,120 --> 02:37:45,520 But I think one of the things. 2905 02:37:45,600 --> 02:37:51,760 And maybe this is like the thing that differentiates like hacking from web scraping is what you 2906 02:37:51,760 --> 02:37:52,600 send at the server. 2907 02:37:52,820 --> 02:37:56,040 So with web scraping, you generally want to send really great information. 2908 02:37:56,040 --> 02:37:56,480 Like, you know. 2909 02:37:56,480 --> 02:38:00,520 Like requests to the server that are perfectly valid and will get you valid useful data back. 2910 02:38:01,340 --> 02:38:05,260 With hacking, you want to send like totally weird off the wall stuff that you think is 2911 02:38:05,260 --> 02:38:06,900 going to mess things up or get you into something. 2912 02:38:07,900 --> 02:38:09,700 And you can absolutely do both. 2913 02:38:09,840 --> 02:38:10,420 It's up to you. 2914 02:38:10,480 --> 02:38:14,980 But one of the challenges I'm dealing with is finding those good values to send to the 2915 02:38:14,980 --> 02:38:15,260 server. 2916 02:38:16,620 --> 02:38:17,460 Any other questions? 2917 02:38:18,020 --> 02:38:19,020 Well, I'm going to be around. 2918 02:38:19,120 --> 02:38:19,860 I'm going to get a drink. 2919 02:38:21,700 --> 02:38:22,280 All right. 2920 02:38:22,320 --> 02:38:23,100 Thank you very much.