1 00:00:00,000 --> 00:00:06,340 So hey guys, thanks for joining us. I just wanted to kind of give you a little background inspiration in my talk 2 00:00:07,620 --> 00:00:10,480 Before I begin so last year they had a really good presentation 3 00:00:12,160 --> 00:00:17,260 hunting for big game big game hunting for APT at black hat and DEF CON and 4 00:00:18,260 --> 00:00:21,500 One of their particular slides they kind of you'll see it in my presentation 5 00:00:21,500 --> 00:00:24,800 They had a bunch of listings on what do you look for with APT? 6 00:00:24,800 --> 00:00:30,520 and I was like oh wait that whole listing you can do with Yara literally minus like three things and 7 00:00:31,340 --> 00:00:34,560 so my original title for this presentation was 8 00:00:35,300 --> 00:00:38,080 hunt like a dentist in Zimbabwe so 9 00:00:39,540 --> 00:00:44,320 Yeah, yeah, hey you think too soon some people think too late. I don't know yeah 10 00:00:44,320 --> 00:00:49,240 So uh so a big game hunting like a dentist get it and I had a picture of Cecil Lyon 11 00:00:49,240 --> 00:00:53,060 But we didn't want to offend anybody so good thing. We're not on camera right now 12 00:00:53,060 --> 00:00:53,820 So I 13 00:00:53,820 --> 00:00:54,700 didn't 14 00:00:54,700 --> 00:00:59,940 Want to get like death threats from PETA or anything so so me and Ming kind of discussed it 15 00:00:59,940 --> 00:01:04,480 We changed it and all that luckily I had this alternate title because I gave this talk 16 00:01:04,480 --> 00:01:09,260 It's a sans threat hunting instant response conference about three months ago 17 00:01:09,260 --> 00:01:12,520 So it was easy and quick and easy, so I'll let that get back to me 18 00:01:13,160 --> 00:01:19,500 Okay, in fact. It's actually good timing because uh you know we were thinking actually now it is 1010 so 19 00:01:19,500 --> 00:01:23,340 You know it's now my pleasure to introduce 20 00:01:23,340 --> 00:01:28,920 J.D. Martino from fidelis you from fidelis, right? Yeah from fidelis 21 00:01:29,500 --> 00:01:30,020 I 22 00:01:31,120 --> 00:01:33,000 Actually don't remember any of this stuff 23 00:01:33,000 --> 00:01:37,540 So as you can you probably have told you probably have you probably have seen so far that 24 00:01:38,080 --> 00:01:44,660 With the exception like sponsors and the schedule like everything else. I have to just you know I just think of it on the fly, but 25 00:01:46,540 --> 00:01:53,100 He does just one thing I can tell you about Jay is he likes to be man you like to be mysterious 26 00:01:53,560 --> 00:01:56,380 So without much ado to talk about how to catch a predator 27 00:01:56,380 --> 00:02:02,160 I mean how to catch a yeti how to catch a or how to catch an apt J.D. Martino 28 00:02:03,320 --> 00:02:05,700 Thank you, thank you, thank you 29 00:02:11,460 --> 00:02:12,780 Thank you guys ah 30 00:02:12,780 --> 00:02:18,900 So yeah, my name is J.D. Martino. I'm a senior cyber threat researcher at fidelis cyber security 31 00:02:19,480 --> 00:02:22,160 Today we're gonna talk to you to catch an apt 32 00:02:22,880 --> 00:02:23,840 We're using Yara. 33 00:02:24,020 --> 00:02:25,180 That's the title of my talk. 34 00:02:27,580 --> 00:02:27,980 Yeah. 35 00:02:28,380 --> 00:02:29,080 Oh, closer? 36 00:02:29,280 --> 00:02:29,560 Okay. 37 00:02:29,680 --> 00:02:30,140 Is that better? 38 00:02:30,240 --> 00:02:30,340 Yeah. 39 00:02:30,440 --> 00:02:30,800 Thank you. 40 00:02:30,880 --> 00:02:31,220 Oh, sorry. 41 00:02:32,920 --> 00:02:34,100 To catch an APT. 42 00:02:34,340 --> 00:02:34,740 Yara. 43 00:02:34,860 --> 00:02:35,080 Sorry. 44 00:02:37,040 --> 00:02:39,700 Let me give you a little rundown, what to expect. 45 00:02:40,740 --> 00:02:44,260 We're going to define the threat intel problem as we see it. 46 00:02:44,680 --> 00:02:48,160 We're going to go over a brief summary of some reverse engineering tools. 47 00:02:48,160 --> 00:02:53,100 I talked to you a little bit about Yara, how to use it, and then we're going to dive into 48 00:02:53,100 --> 00:02:53,680 some malware. 49 00:02:53,920 --> 00:02:58,160 We're actually going to look at some PlugX malware that was running rampant back in 2015 50 00:02:59,020 --> 00:03:01,920 that I had the opportunity to look at for my company. 51 00:03:02,600 --> 00:03:05,220 We're going to write some rules today, some Yara rules. 52 00:03:06,820 --> 00:03:11,540 For those of you who have never written a Yara rule, we will write a rule for the very 53 00:03:11,540 --> 00:03:12,060 first time. 54 00:03:12,120 --> 00:03:12,960 I will help you. 55 00:03:14,200 --> 00:03:17,220 We'll write some string rules, and we'll go through tuning string rules. 56 00:03:17,220 --> 00:03:18,940 We'll also write a byte sequence rule. 57 00:03:19,980 --> 00:03:27,380 We're going to go from easy to medium to hard in the span of about 50 minutes during this 58 00:03:27,380 --> 00:03:27,660 talk. 59 00:03:30,060 --> 00:03:34,400 I have these little indicators there, easy, medium, and hard. 60 00:03:34,940 --> 00:03:38,520 If it's beyond your scope and you see the hard, and if you want to go to sleep, you're 61 00:03:38,520 --> 00:03:38,960 more than welcome. 62 00:03:39,280 --> 00:03:46,140 But wake up towards the end, I have some results of after maybe about a year or so of tracking 63 00:03:46,140 --> 00:03:47,080 this PlugX malware. 64 00:03:47,220 --> 00:03:50,740 It's just some things that kind of bubbled up, some themes that I'd like to share with 65 00:03:50,740 --> 00:03:56,180 you guys to help you, like I said, bring it home and help you to catch APT. 66 00:03:56,340 --> 00:04:00,740 Not any one particular actor, but just some things that you can maybe tie to a particular 67 00:04:00,740 --> 00:04:02,900 campaign or find the campaign and whatnot. 68 00:04:05,100 --> 00:04:10,840 The threat and intelligence problem as it stands, as incident responders or malware 69 00:04:10,840 --> 00:04:15,840 analysts and whatnot, we encounter, or even network defenders, we encounter suspect files. 70 00:04:16,080 --> 00:04:16,300 Right? 71 00:04:17,220 --> 00:04:17,660 All the time. 72 00:04:17,960 --> 00:04:23,380 Really, to be honest, we encounter a lot of suspect files, varying different degrees of 73 00:04:23,380 --> 00:04:30,060 file types, different content, different program software, and whatnot. 74 00:04:30,280 --> 00:04:35,440 How do we filter through all that white noise with all these different files, right? 75 00:04:37,340 --> 00:04:42,700 The next thing about the threat intelligence problem is that the threat landscape is always 76 00:04:42,700 --> 00:04:43,260 changing. 77 00:04:45,500 --> 00:04:47,200 If you look, these are two ways of looking at it. 78 00:04:47,200 --> 00:04:54,340 Two blog posts from 2015, one dated April 24th, about a merger between Raytheon and 79 00:04:54,340 --> 00:04:54,800 WebSense. 80 00:04:55,120 --> 00:05:00,620 Raytheon acquired WebSense, and then that acquisition went public, and then an APT 81 00:05:00,620 --> 00:05:06,960 group started targeting WebSense and Raytheon employees about the acquisition using some 82 00:05:06,960 --> 00:05:07,840 malware called PlugX. 83 00:05:08,200 --> 00:05:16,480 Then, a week later, May 1st, 2015, you see another APT, Palo Alto, their blog saying 84 00:05:16,480 --> 00:05:17,180 that PlugX is a threat. 85 00:05:17,180 --> 00:05:23,980 PlugX was using legitimate Samsung software, signed Samsung software, to install PlugX 86 00:05:23,980 --> 00:05:25,120 as well. 87 00:05:25,440 --> 00:05:32,820 In the first case, the WebSense spear phishing attempt, they were using a signed binary as 88 00:05:32,820 --> 00:05:32,920 well. 89 00:05:33,000 --> 00:05:35,880 They were using Kaspersky antivirus signed binary. 90 00:05:36,320 --> 00:05:40,460 In the second case, one week later, they were using Samsung. 91 00:05:40,880 --> 00:05:45,840 The threat intel problem is that it's constantly changing, and how do we keep up with that? 92 00:05:47,540 --> 00:05:52,040 Next, I'm going to talk to you about reverse engineering and malicious code analysis. 93 00:05:52,600 --> 00:05:54,520 It's like peeling back layers of the onion. 94 00:05:55,300 --> 00:05:59,660 Sometimes you do want to cry because it becomes very difficult to reverse some of this malware 95 00:05:59,660 --> 00:06:01,100 that's been obfuscated and whatnot. 96 00:06:01,880 --> 00:06:05,260 I take it to that approach and just do one layer at a time. 97 00:06:05,340 --> 00:06:06,700 I wish I had a knife to just cut through it. 98 00:06:06,980 --> 00:06:11,440 You get a kid with a volatility, go right to the memory and you run it, but sometimes 99 00:06:11,440 --> 00:06:14,320 you get anti-sandboxing and different things, so you don't have that knife. 100 00:06:15,300 --> 00:06:15,820 Just a quick note. 101 00:06:15,820 --> 00:06:18,560 Just take it one layer at a time is the best way to do it and move forward. 102 00:06:19,720 --> 00:06:23,940 Definitely one of the easiest tools for reverse engineering is strings. 103 00:06:24,320 --> 00:06:29,500 It runs through all the readable text in a binary that people can actually read. 104 00:06:29,860 --> 00:06:33,080 If you're not a reverse engineer, you can just download strings, run strings against 105 00:06:33,080 --> 00:06:36,680 a file, and you can become a reverse engineer because we use it all the time. 106 00:06:37,780 --> 00:06:39,040 They can be hidden. 107 00:06:40,100 --> 00:06:41,800 Next is a hex editor. 108 00:06:42,600 --> 00:06:45,800 You're looking at the raw bytes that the computer is going to execute. 109 00:06:48,360 --> 00:06:52,100 The hexadecimal characters, not characters, but bytes, yeah, sorry. 110 00:06:54,440 --> 00:06:59,280 It's good to just look at things in a hex editor to find patterns, to find nested structures, 111 00:06:59,480 --> 00:07:01,560 or you're going to enumerate those structures and different things. 112 00:07:03,260 --> 00:07:06,800 We're actually going to take a look into a hex editor today, so if you've never done 113 00:07:06,800 --> 00:07:07,720 it, stick around. 114 00:07:08,240 --> 00:07:10,580 I'll show you how they're very useful in reverse engineering. 115 00:07:11,880 --> 00:07:14,320 Then a disassembler or a debugger. 116 00:07:14,480 --> 00:07:15,240 I use IDA. 117 00:07:15,240 --> 00:07:16,200 Man, I love IDA. 118 00:07:16,220 --> 00:07:16,820 Don't you guys? 119 00:07:16,960 --> 00:07:19,000 For those who else, who do you use it? 120 00:07:20,920 --> 00:07:25,600 It's just a great tool, the developers, and it gives you the instructions. 121 00:07:26,040 --> 00:07:32,780 Like I said, the bytes are what the machine chews on and eats to execute the program, 122 00:07:32,940 --> 00:07:38,660 and then the disassembler will give you readable assembly language so humans can read and find 123 00:07:38,660 --> 00:07:41,500 out what the program is about to execute. 124 00:07:42,800 --> 00:07:45,120 I'd say the fourth tool, and the very best tool. 125 00:07:45,120 --> 00:07:49,880 The first tool in a reverse engineer's handbook or pocket is Yara. 126 00:07:50,260 --> 00:07:53,720 I definitely have to give a shout out to the creator of Yara, Victor. 127 00:07:54,420 --> 00:07:58,660 He has created such a wonderful tool, Wes, and all the other developers. 128 00:07:58,860 --> 00:08:00,320 They're great in supporting it. 129 00:08:02,400 --> 00:08:08,960 Yara is a tool aimed, but not limited to, helping malware reversers to identify and 130 00:08:08,960 --> 00:08:10,020 classify malware samples. 131 00:08:10,920 --> 00:08:14,220 Then with Yara, you can create descriptions of malware families. 132 00:08:14,580 --> 00:08:15,100 Or, if you have a bunch of malware, you can create descriptions of malware families or 133 00:08:15,120 --> 00:08:21,420 really whatever you want, based on textual or binary patterns that you see in the files 134 00:08:21,900 --> 00:08:23,420 or any kind of data stream. 135 00:08:25,240 --> 00:08:28,880 Real quick, why Yara and not IOCs? 136 00:08:29,720 --> 00:08:34,280 Look at them, indicators of compromise, IP addresses, MD5s, file locations, URLs domains. 137 00:08:34,620 --> 00:08:35,780 They can be changed. 138 00:08:35,980 --> 00:08:38,480 You just can't do hunting with IOCs. 139 00:08:38,520 --> 00:08:39,960 They can easily be changed. 140 00:08:44,220 --> 00:08:46,100 Next, what does Yara do? 141 00:08:46,860 --> 00:08:48,920 It scans, at its core, it scans streams. 142 00:08:49,520 --> 00:08:56,360 It scans file streams, network streams, memory streams, any stream of data, any string of 143 00:08:56,360 --> 00:08:58,440 bytes or strings. 144 00:08:59,200 --> 00:09:00,900 You can use it to scan. 145 00:09:02,640 --> 00:09:04,300 That's what it does at its core. 146 00:09:04,520 --> 00:09:05,300 It scans data streams. 147 00:09:06,060 --> 00:09:08,020 What are some tools that incorporate Yara? 148 00:09:09,220 --> 00:09:09,940 Obviously, Yara. 149 00:09:09,940 --> 00:09:12,520 I'm going to give a plug to my company, Fidelis. 150 00:09:12,740 --> 00:09:16,060 I love my company, but they've really embraced the Yara tool. 151 00:09:16,580 --> 00:09:18,840 They use it in three of their different products. 152 00:09:19,120 --> 00:09:24,140 We have two pay products, the Fidelis Network product that scans network streams, and then 153 00:09:24,140 --> 00:09:33,240 also our Fidelis Endpoint product that scans files and even memory using volatility Yara, 154 00:09:34,400 --> 00:09:35,440 fall Yara. 155 00:09:36,740 --> 00:09:39,520 Between the two of those, they hit all the different streams. 156 00:09:39,940 --> 00:09:46,860 Also, we have a free tool called Threat Scanner, and it does open IOC and Yara scanning as 157 00:09:46,860 --> 00:09:47,400 well, too. 158 00:09:48,100 --> 00:09:52,240 There are also some other tools, Cuckoo Sandbox, I'm sure a lot of people in the audience 159 00:09:52,240 --> 00:09:57,040 have probably used, VirusTotal Intelligence, if you play with VirusTotal, throw your rules 160 00:09:57,040 --> 00:10:03,040 up and get viruses back that people submit, and Volatility, the memory forensics tool. 161 00:10:04,380 --> 00:10:07,180 All those have really embraced Yara as well. 162 00:10:08,700 --> 00:10:09,920 Enough talk about Yara. 163 00:10:09,940 --> 00:10:14,240 Let's talk about who uses it and what does it look like. 164 00:10:16,880 --> 00:10:17,800 It's really simple. 165 00:10:18,060 --> 00:10:20,540 It's a command line tool. 166 00:10:21,560 --> 00:10:28,940 The input is basically Yara, a couple of options, and then you could either choose the stream 167 00:10:28,940 --> 00:10:32,380 that you want it to run against, or you give the rules file, sorry, you have to define 168 00:10:32,380 --> 00:10:35,160 the rules file, and then a stream that you want to run against. 169 00:10:35,640 --> 00:10:39,500 That stream could either be a file, it could be a directory, you could even tell it to 170 00:10:39,500 --> 00:10:46,100 do a recursive directory scan, you can do it with a process ID, and then if you want 171 00:10:46,100 --> 00:10:50,760 to do, you can run it against a PCAP for network traffic, but basically you would kind of want 172 00:10:50,760 --> 00:10:55,760 to sessionize that data and run it against a TCP session, and then you can run Yara against 173 00:10:55,760 --> 00:10:55,940 it. 174 00:10:56,160 --> 00:10:57,480 The output's really simple. 175 00:10:57,680 --> 00:11:04,280 You supplied the rules file, where you've defined all your rules, and it tells you which 176 00:11:04,280 --> 00:11:09,480 rule has fired on which data stream, or which file, or which data stream. 177 00:11:09,480 --> 00:11:13,420 Which directory, or file in the directory, and so forth, or process ID. 178 00:11:13,940 --> 00:11:18,640 You can kind of see here, some of them, unknown, plug X, Trojan loader, payload names. 179 00:11:18,880 --> 00:11:22,000 We're going to actually go through these three right here. 180 00:11:22,140 --> 00:11:23,200 We're going to actually write these three. 181 00:11:24,120 --> 00:11:25,900 We're not going to cover this one, the XV header. 182 00:11:26,060 --> 00:11:30,320 It's a little crazy, but we're going to go through them. 183 00:11:30,340 --> 00:11:32,060 We're going to write these three rules today. 184 00:11:32,500 --> 00:11:39,240 You can see that based on this hash, this file, these three rules hit on. 185 00:11:39,480 --> 00:11:42,820 Then these three files right here, so I just kind of blanked out the source directory. 186 00:11:43,040 --> 00:11:49,460 The extracted file, msi.dll, and then the main one, x2015.exe, so that was the plug 187 00:11:49,460 --> 00:11:49,960 X, right? 188 00:11:52,040 --> 00:11:54,600 Let's write our first Yara rule. 189 00:11:56,440 --> 00:11:58,600 Really, really easy, just to begin. 190 00:11:59,220 --> 00:12:00,620 You do it in text editor. 191 00:12:02,000 --> 00:12:08,360 You write the rule tag, so just rule, space, and then the rule name, and then just as if 192 00:12:08,360 --> 00:12:09,440 you were defining a function. 193 00:12:09,480 --> 00:12:12,800 An open and closed bracket you would add as well. 194 00:12:13,300 --> 00:12:16,540 Now we're going to get to the detection logic of the rule. 195 00:12:17,380 --> 00:12:18,900 First we're going to start off with the condition. 196 00:12:19,060 --> 00:12:24,360 I'm kind of going to build from the bottom up, just because it makes a little bit more 197 00:12:24,360 --> 00:12:27,180 sense for you to understand it. 198 00:12:29,140 --> 00:12:32,920 The condition is a Boolean condition logic for the detection. 199 00:12:33,500 --> 00:12:39,100 You're going to see there in this one we have it returns true if we have a hit on my text 200 00:12:39,100 --> 00:12:42,600 string, or my hex string, or my regex. 201 00:12:43,580 --> 00:12:48,120 Then next, moving up, we're going to go to the string section, and we're going to actually 202 00:12:48,120 --> 00:12:53,680 define my text string, my hex string, and my regex. 203 00:12:53,960 --> 00:13:00,780 In this case, my text string is ASCII text, and the hex string is a hexadecimal byte sequence, 204 00:13:01,140 --> 00:13:04,260 and then my regex is a regular expression. 205 00:13:04,600 --> 00:13:06,800 I think it uses like PCRE or something like that. 206 00:13:08,560 --> 00:13:09,080 I'm going to go ahead and do that. 207 00:13:11,560 --> 00:13:14,180 Then this one's an important kind of thing. 208 00:13:14,620 --> 00:13:19,300 First I would say that the conditional section always needs to be present for a rule. 209 00:13:19,520 --> 00:13:21,540 You cannot write a rule without a conditional. 210 00:13:22,780 --> 00:13:26,980 You can write a really simple conditional if you want, but you have to have a conditional. 211 00:13:27,340 --> 00:13:31,940 The string section, like I said, is the actual detection. 212 00:13:32,140 --> 00:13:37,780 You actually can write a rule without using strings, and just based on a condition. 213 00:13:38,560 --> 00:13:39,080 You can write a rule without using strings, and just based on a condition. 214 00:13:39,080 --> 00:13:44,580 But for the most part, 95 to 99 percent of your rules are going to have a string section 215 00:13:44,580 --> 00:13:45,700 written in them. 216 00:13:45,960 --> 00:13:51,380 Then when you share rules, the good thing about Yara is that if you want to, you can 217 00:13:51,380 --> 00:13:52,740 share your detections. 218 00:13:53,640 --> 00:13:58,680 When you share things, it's definitely good to fill out the meta section when sharing 219 00:13:58,680 --> 00:13:58,900 rules. 220 00:13:59,100 --> 00:14:01,500 It just helps to reduce analysis time. 221 00:14:02,000 --> 00:14:03,660 Say a friend of yours gave you a rule. 222 00:14:03,820 --> 00:14:06,580 You have no idea what he wrote this rule against. 223 00:14:06,940 --> 00:14:08,620 You may not have the malware. 224 00:14:09,080 --> 00:14:10,940 But he used to write the rule. 225 00:14:11,280 --> 00:14:22,100 In the meta section, you would put particularly what Intel document was the source, if somebody 226 00:14:22,100 --> 00:14:28,920 else wrote it, or perhaps the MD5 for the source binary that you wrote it against. 227 00:14:29,220 --> 00:14:37,400 Even the description of the rule would definitely be helpful in the meta section as well. 228 00:14:37,580 --> 00:14:38,620 When sharing your rules. 229 00:14:39,080 --> 00:14:40,480 You don't only use the meta section. 230 00:14:42,280 --> 00:14:46,760 We talked about the actual syntax of it. 231 00:14:46,880 --> 00:14:48,980 What can you actually signature in the malware? 232 00:14:49,820 --> 00:14:56,740 You can either go with pretty much text strings or byte sequences. 233 00:14:57,520 --> 00:14:59,800 The byte sequence or regular expressions. 234 00:15:00,120 --> 00:15:02,620 On the left, you'll see the text strings. 235 00:15:02,880 --> 00:15:05,600 You see a short list of what you can actually signature. 236 00:15:06,160 --> 00:15:07,460 On the right-hand side. 237 00:15:07,520 --> 00:15:08,840 On the black line. 238 00:15:08,840 --> 00:15:11,860 On the white line, though, you'll see implementation traits and custom features. 239 00:15:12,300 --> 00:15:18,960 Those are things that you can actually use your byte sequence rules or your regular expressions 240 00:15:18,960 --> 00:15:20,980 to signature against. 241 00:15:21,660 --> 00:15:29,780 If you look on the right, that's a much bigger listing to catch than on the left with strings. 242 00:15:30,100 --> 00:15:34,420 If you're using text strings, you're shooting yourself in the foot. 243 00:15:34,540 --> 00:15:36,220 You're missing a lot of opportunities for detection. 244 00:15:37,740 --> 00:15:45,820 Then, also, with the byte sequences, you really want to get the unique characteristics 245 00:15:45,820 --> 00:15:48,540 of the malware and so forth. 246 00:15:49,060 --> 00:15:52,080 That's the next thing I want to talk about. 247 00:15:52,360 --> 00:15:55,200 Basically with string rules, they can easily be erased. 248 00:15:55,580 --> 00:16:02,600 Strings can easily be patched or modified or erased within a binary, but with byte sequence 249 00:16:02,600 --> 00:16:05,220 rules, you really can help. 250 00:16:05,980 --> 00:16:06,200 It helps. 251 00:16:06,220 --> 00:16:07,720 It can help you find the broader campaign. 252 00:16:08,500 --> 00:16:12,100 It helps you get the DNA or the family tree of the malware. 253 00:16:12,840 --> 00:16:18,900 Therefore, I just think byte sequence rules are ultimately better, but definitely the 254 00:16:18,900 --> 00:16:20,840 string-based rules definitely have their place. 255 00:16:23,080 --> 00:16:31,680 How do you use Yara effectively in your organization or the tool in general, even for amongst yourselves? 256 00:16:32,360 --> 00:16:35,740 One of the big things that I always stress is rules. 257 00:16:35,740 --> 00:16:36,000 Rules. 258 00:16:36,060 --> 00:16:36,560 Rules. 259 00:16:36,840 --> 00:16:37,180 Rules. 260 00:16:37,520 --> 00:16:39,200 You can never have enough rules. 261 00:16:39,620 --> 00:16:42,500 Always try to write more than one rule per sample you look at. 262 00:16:43,300 --> 00:16:46,680 At least one strings-based rule and one bytes rule. 263 00:16:47,280 --> 00:16:48,660 Have descriptive names. 264 00:16:48,980 --> 00:16:50,500 Have descriptive names on your rules. 265 00:16:50,800 --> 00:16:55,900 If you write it and a year later it fires, it finally fires, you can look back and, oh, 266 00:16:55,980 --> 00:17:03,420 that was the investigation that I did and, oh, we're seeing that guy again or that malware 267 00:17:03,420 --> 00:17:05,060 again or that file type again. 268 00:17:05,120 --> 00:17:05,720 This is coming back. 269 00:17:05,740 --> 00:17:06,060 This is coming up again. 270 00:17:06,200 --> 00:17:09,160 Have descriptive names in your rule names. 271 00:17:09,900 --> 00:17:14,020 When you're writing your rules and testing, you want to have at least three data sources. 272 00:17:15,220 --> 00:17:19,340 The first data source, obviously, is the malware you're trying to signature. 273 00:17:19,700 --> 00:17:23,360 You can't write a signature without a binary. 274 00:17:25,620 --> 00:17:30,560 I've definitely seen instances where people will say, oh, can you write detections for 275 00:17:30,560 --> 00:17:30,780 this? 276 00:17:30,900 --> 00:17:33,560 It's like, well, I can't write it until you give me the files. 277 00:17:33,560 --> 00:17:35,820 I need the files. 278 00:17:35,980 --> 00:17:38,200 As a reverse engineer, I need those binaries. 279 00:17:38,700 --> 00:17:41,980 The second thing is a known data source. 280 00:17:42,760 --> 00:17:44,180 It can be known good. 281 00:17:44,260 --> 00:17:45,060 It can be known bad. 282 00:17:45,640 --> 00:17:49,020 It just has to be known, or it could be a mixture of both, known good and known bad. 283 00:17:49,140 --> 00:17:55,200 It has to be known to you as the analyst because you're going to use that known data source 284 00:17:55,200 --> 00:18:01,520 to test your false positives because you know, okay, this rule is hitting on this file. 285 00:18:01,700 --> 00:18:03,240 It shouldn't be hitting that way. 286 00:18:03,560 --> 00:18:06,280 It shouldn't be hitting that way because you know that data source. 287 00:18:06,640 --> 00:18:11,320 The third data source is your new intelligence streams, so any new intelligence that's coming 288 00:18:11,320 --> 00:18:15,800 into your networks or any new intelligence from VirusTotal Intelligence or Virusshare.org, 289 00:18:15,860 --> 00:18:20,040 any one where you can download malware from or something like that when doing your research. 290 00:18:21,040 --> 00:18:24,700 Last but not least, I stressed this earlier, share with the meta section. 291 00:18:24,820 --> 00:18:28,420 If you're going to share your rules amongst with others, share with meta. 292 00:18:30,240 --> 00:18:30,720 Yeah. 293 00:18:32,240 --> 00:18:32,800 All right. 294 00:18:32,840 --> 00:18:33,340 I explained that one. 295 00:18:33,560 --> 00:18:37,460 So next, let's get into, let's talk about PlugX, right? 296 00:18:38,020 --> 00:18:40,300 PlugX is, it's some APT malware. 297 00:18:40,820 --> 00:18:47,740 It's existed in some form since 2008, and it's evolved over time to offer new capabilities 298 00:18:47,740 --> 00:18:49,100 and control mechanisms. 299 00:18:49,500 --> 00:18:51,520 It's supported by an active development program. 300 00:18:51,880 --> 00:18:58,120 It's used by multiple APT actors suspected to be China or probably, let's just say it's 301 00:18:58,120 --> 00:18:58,380 China. 302 00:18:59,400 --> 00:19:03,480 And it provides an attacker with a range. 303 00:19:03,480 --> 00:19:07,560 It provides a range of functionality, including the ability to log keystrokes, modify and 304 00:19:07,560 --> 00:19:12,040 copy files, capture screenshots of video and user activity, and perform administrative 305 00:19:12,040 --> 00:19:17,760 tasks such as terminating processes, logging of users and rebooting victim machines, right? 306 00:19:19,480 --> 00:19:26,280 So PlugX, what did PlugX look like in 2015, right? 307 00:19:26,600 --> 00:19:32,240 The outer layer, like I said, when doing malware analysis, it's layers of an onion, right? 308 00:19:32,240 --> 00:19:38,540 So the outer layer of PlugX, to me, and when I saw it was in 2015, was a self-extracting 309 00:19:38,540 --> 00:19:39,180 RAR archive. 310 00:19:40,120 --> 00:19:41,360 These are benign. 311 00:19:42,060 --> 00:19:46,200 They're commonly used for your program installers. 312 00:19:47,180 --> 00:19:49,340 So how do you go about and signature that? 313 00:19:49,540 --> 00:19:54,180 It looks like an installer that's coming into your network, and it's a RAR archive. 314 00:19:54,260 --> 00:19:57,680 Everybody's used ZIP and RAR, 7-ZIP, these compression formats. 315 00:19:57,980 --> 00:19:59,500 Well, these are self-extracting archives. 316 00:19:59,580 --> 00:20:01,960 So they're actually executable by nature. 317 00:20:02,900 --> 00:20:03,300 Right? 318 00:20:03,880 --> 00:20:05,520 But they're not malicious, really, per se. 319 00:20:06,340 --> 00:20:11,380 They are, and they're executable, but it's the contents that really make up what the 320 00:20:11,380 --> 00:20:12,220 maliciousness is. 321 00:20:12,440 --> 00:20:15,500 Because, like I said, you see them in all your software installers and whatnot. 322 00:20:16,280 --> 00:20:20,880 So let's get into the contents of PlugX in these self-extracting RARs. 323 00:20:21,560 --> 00:20:26,700 They would also throw in a digitally signed executable, you know? 324 00:20:27,040 --> 00:20:31,320 And so, I mean, digitally signed executables, they're reputation-based. 325 00:20:31,320 --> 00:20:31,840 They're signed. 326 00:20:32,900 --> 00:20:34,000 They throw that. 327 00:20:34,120 --> 00:20:40,760 We saw that in the threat intel problem that we saw them abusing Samsung app, signed Samsung 328 00:20:40,760 --> 00:20:46,140 applications, and then the signed Kaspersky applications in the WebSense attack, our 329 00:20:46,140 --> 00:20:47,140 campaign, email campaign. 330 00:20:48,280 --> 00:20:51,220 Next, there was a small DLL loader. 331 00:20:52,220 --> 00:20:54,180 It used a side-loading technique. 332 00:20:54,360 --> 00:20:56,780 I'll get into it in just a brief, kind of explain that a little later. 333 00:20:57,000 --> 00:21:01,240 But it's a small DLL that would then load the compressed PlugX payload. 334 00:21:01,240 --> 00:21:04,260 The compressed payload was actually where the malware was. 335 00:21:05,080 --> 00:21:08,740 The compression or the assembly was always randomized. 336 00:21:09,240 --> 00:21:10,280 It was obfuscated. 337 00:21:10,420 --> 00:21:11,160 It was different. 338 00:21:11,480 --> 00:21:20,280 So how do you take something that's relatively not or hard to signature, relatively not signatureable, 339 00:21:20,340 --> 00:21:21,560 and let's signature that? 340 00:21:21,780 --> 00:21:23,040 So I'm going to show you. 341 00:21:23,200 --> 00:21:24,900 So we'll start with the first layer. 342 00:21:26,320 --> 00:21:28,660 Let's just signature, and I'm going to give you this one. 343 00:21:28,740 --> 00:21:31,060 I ran strings across the self-extracting RAR. 344 00:21:31,240 --> 00:21:31,940 And I came up with these. 345 00:21:32,000 --> 00:21:33,280 These look like really good strings. 346 00:21:33,580 --> 00:21:37,720 So I'm going to give you this rule right off the bat, and then we're going to get into 347 00:21:37,720 --> 00:21:38,380 the juicier stuff. 348 00:21:39,200 --> 00:21:46,320 But it's good to signature this because, as an analyst, all I have to do, the self-extracting 349 00:21:46,320 --> 00:21:48,040 archive has a .exe extension. 350 00:21:48,500 --> 00:21:54,900 All I have to do is right-click, rename that file in Windows to .rar, and then I can use 351 00:21:54,900 --> 00:22:01,040 the WinRAR program or any kind of RAR extraction program to then extract the content. 352 00:22:01,040 --> 00:22:02,340 Easy win. 353 00:22:02,580 --> 00:22:06,860 I've just eliminated one layer of the section, one layer down. 354 00:22:07,980 --> 00:22:11,120 And so those are like shooting fish in a barrel. 355 00:22:11,360 --> 00:22:12,080 It's great. 356 00:22:12,440 --> 00:22:14,840 Just write this rule to help augment your analysis. 357 00:22:15,120 --> 00:22:19,220 Pick this out in your data set, and you'll be like, okay, I have a really easy place 358 00:22:19,220 --> 00:22:22,300 to start with to finding out information. 359 00:22:23,740 --> 00:22:25,300 Next, let's look at the next file. 360 00:22:25,880 --> 00:22:27,780 Let's signature that signed executable. 361 00:22:28,060 --> 00:22:29,700 You're going to be like, Jay, you're crazy. 362 00:22:29,920 --> 00:22:30,940 Why would you want to do that? 363 00:22:31,040 --> 00:22:31,460 Really. 364 00:22:31,800 --> 00:22:34,060 Why would you want to signature a signed executable? 365 00:22:34,480 --> 00:22:35,760 They're reputation-based. 366 00:22:35,800 --> 00:22:36,860 They're supposed to be good, right? 367 00:22:37,040 --> 00:22:38,000 I'm supposed to trust them. 368 00:22:38,320 --> 00:22:38,940 Am I right? 369 00:22:39,140 --> 00:22:40,640 Do you trust signed executables? 370 00:22:41,200 --> 00:22:41,640 No. 371 00:22:41,800 --> 00:22:42,780 Well, you're right. 372 00:22:42,960 --> 00:22:43,380 You're right. 373 00:22:43,660 --> 00:22:46,600 So in this case, I am crazy if I want to sign it. 374 00:22:46,940 --> 00:22:53,620 But we have already known that we saw that the landscape changes very quickly. 375 00:22:54,000 --> 00:22:58,900 So within one week, we had assigned Kaspersky binary and assigned Samsung binary from legitimate 376 00:22:58,900 --> 00:22:59,360 applications. 377 00:23:01,040 --> 00:23:05,000 So we're going to have to track signed executables within your own organization with a private 378 00:23:05,000 --> 00:23:05,420 certificate. 379 00:23:05,720 --> 00:23:06,740 That's one thing. 380 00:23:07,240 --> 00:23:11,180 That's definitely a reason you would want to sign a signed – to signature a signed 381 00:23:11,180 --> 00:23:11,700 executable. 382 00:23:11,980 --> 00:23:16,760 Also, if the binary has been signed with a stolen certificate, you definitely want 383 00:23:16,760 --> 00:23:17,740 to signature that as well. 384 00:23:17,980 --> 00:23:22,700 But in this case, why would we want to signature Kaspersky or Samsung software? 385 00:23:23,280 --> 00:23:26,180 So I'm crazy in this point. 386 00:23:26,440 --> 00:23:27,520 You're right. 387 00:23:27,620 --> 00:23:28,020 You're right. 388 00:23:28,200 --> 00:23:30,160 It's like playing whack-a-mole, right? 389 00:23:30,340 --> 00:23:31,020 Especially with the binary. 390 00:23:31,040 --> 00:23:33,440 Especially with the intelligence that we have, it's changed within a week. 391 00:23:34,580 --> 00:23:39,660 So for – up next, I'm going to take a little detour for a second and get off of 392 00:23:39,660 --> 00:23:44,720 PlugX and just kind of teach you some things about some string rules, right? 393 00:23:46,000 --> 00:23:49,740 When writing your string rules, you love Unicode. 394 00:23:50,620 --> 00:23:51,980 Can everybody say it with me? 395 00:23:52,380 --> 00:23:53,760 I love Unicode. 396 00:23:53,940 --> 00:23:54,780 I love Unicode. 397 00:23:55,140 --> 00:23:55,620 Boom. 398 00:23:55,900 --> 00:23:56,120 Boom. 399 00:23:56,220 --> 00:23:56,420 Okay. 400 00:23:56,500 --> 00:23:57,280 You all love Unicode. 401 00:23:57,280 --> 00:23:57,460 Why? 402 00:23:57,880 --> 00:23:59,060 Look at this chart. 403 00:23:59,280 --> 00:23:59,920 Look at the chart. 404 00:24:00,120 --> 00:24:02,640 This is ASCII on the left, 8 bits, right? 405 00:24:03,020 --> 00:24:05,740 Unicode on the right, 16 bits. 406 00:24:06,140 --> 00:24:08,700 Same letter, A, at the top, 8 bits. 407 00:24:08,820 --> 00:24:11,100 Same letter, A, on the right, 16 bits. 408 00:24:11,260 --> 00:24:13,540 You get double the detection, right? 409 00:24:13,680 --> 00:24:16,920 Double the byte detection for the same character. 410 00:24:18,060 --> 00:24:19,520 That's why we love Unicode. 411 00:24:19,700 --> 00:24:20,880 That's why we love Unicode. 412 00:24:21,780 --> 00:24:24,760 Next, how do you further tune some string rules? 413 00:24:25,780 --> 00:24:27,260 Yara has these questions. 414 00:24:27,260 --> 00:24:30,020 She asked, what are the cool things called modifiers in the language? 415 00:24:30,820 --> 00:24:32,340 We talked about Unicode. 416 00:24:32,440 --> 00:24:34,340 Unicode, they have the wide modifier. 417 00:24:35,480 --> 00:24:39,160 Then there's another cool – so there's ASCII, there's wide. 418 00:24:40,300 --> 00:24:42,800 Then there's another cool modifier called the full word. 419 00:24:43,320 --> 00:24:45,580 In the first example, you see setup.msi. 420 00:24:46,020 --> 00:24:48,300 Let's say you had a file path in the front of it. 421 00:24:48,700 --> 00:24:52,000 You want to kind of ignore the file path, but in this case, you just want a signature. 422 00:24:52,160 --> 00:24:55,980 Setup.msi, you don't want there to be a file path in the front. 423 00:24:55,980 --> 00:24:59,120 You've noticed that there's never been a file path in what you're trying to signature. 424 00:24:59,300 --> 00:25:05,620 We want to take that full word, the full word, just the ASCII or the wide, setup.msi, nothing 425 00:25:05,620 --> 00:25:06,840 in the front, nothing in the back. 426 00:25:07,260 --> 00:25:08,440 There's a full word modifier. 427 00:25:08,920 --> 00:25:13,640 Then, let's say you get this camel case of kernel32.dll, you don't know how to signature 428 00:25:13,640 --> 00:25:13,880 it. 429 00:25:14,000 --> 00:25:14,260 Boom. 430 00:25:15,500 --> 00:25:16,180 Hit everything. 431 00:25:16,360 --> 00:25:17,100 You can hit it with wide. 432 00:25:17,160 --> 00:25:17,820 You can hit it with ASCII. 433 00:25:17,920 --> 00:25:19,280 Then there's the no case modifier. 434 00:25:19,980 --> 00:25:25,000 That camel case of kernel32, the uppercase, lowercase, uppercase, lowercase that you see 435 00:25:25,000 --> 00:25:29,600 alternating on the screen, you can just say kernel32.dll, all in lowercase, and then throw 436 00:25:29,600 --> 00:25:31,140 the no case modifier at the end, and it'll hit. 437 00:25:32,400 --> 00:25:36,260 Next there's, if there are any Linux or Unix programmers, the uname. 438 00:25:36,700 --> 00:25:40,500 You want to look for whitespace characters, right? 439 00:25:40,700 --> 00:25:44,780 I found this in another APT binary, some Derisby Linux binary. 440 00:25:46,020 --> 00:25:53,460 The uname command was surrounded by three whitespace line feed indicators, or line feed 441 00:25:53,460 --> 00:25:53,980 bytes. 442 00:25:55,000 --> 00:25:57,860 They were surrounded by the command, particularly the two at the end. 443 00:25:57,960 --> 00:25:59,260 I was like, hey, let's signature that. 444 00:25:59,500 --> 00:26:04,360 Why is there two whitespace bytes after the uname command and whatnot? 445 00:26:04,560 --> 00:26:11,780 Definitely look for whitespace when signaturing and writing your string rules. 446 00:26:11,960 --> 00:26:13,180 Those help really well. 447 00:26:14,480 --> 00:26:16,080 This is the last stop on the detour. 448 00:26:17,140 --> 00:26:20,540 These are just some good examples of some string rules, when to use them and whatnot. 449 00:26:20,820 --> 00:26:22,920 First one is the Metasploit UAC bypass. 450 00:26:23,960 --> 00:26:24,900 You can hit it. 451 00:26:25,000 --> 00:26:26,940 I picked a really good string for this one. 452 00:26:27,020 --> 00:26:28,820 It said, error access denied. 453 00:26:28,860 --> 00:26:35,000 We probably try to inject into an elevated process, which isn't allowed unless we're 454 00:26:35,000 --> 00:26:35,700 also elevated. 455 00:26:36,000 --> 00:26:37,860 Pick an unelevated process. 456 00:26:38,260 --> 00:26:40,040 How unique is that, right? 457 00:26:40,760 --> 00:26:46,340 Quick Google search ended up yielding, hey, that's the Metasploit UAC bypass. 458 00:26:46,680 --> 00:26:51,800 It's when it's trying to open a process and it fails for Windows 7. 459 00:26:52,480 --> 00:26:53,520 So that was a quick... 460 00:26:53,520 --> 00:26:54,120 We wrote a rule. 461 00:26:55,000 --> 00:26:58,960 We wrote a rule on it, and then when you're scanning your data set, oh, okay, it's doing 462 00:26:58,960 --> 00:26:59,180 this. 463 00:26:59,360 --> 00:27:01,180 There's a Metasploit code in there. 464 00:27:01,300 --> 00:27:04,840 It helps augment your analysis when you're writing something like this. 465 00:27:05,240 --> 00:27:08,480 Also notice there's some whitespace characters tucked in that signature as well. 466 00:27:08,720 --> 00:27:10,000 Next a ComSpec variable. 467 00:27:10,300 --> 00:27:14,160 ComSpec variables are very unique variable for Windows in a sense that it's the only 468 00:27:14,160 --> 00:27:19,160 environment variable that points to a command for an executable process. 469 00:27:19,340 --> 00:27:22,260 That executable process is the command.exe, cmd.exe. 470 00:27:22,260 --> 00:27:29,560 So if I saw ComSpec in a binary, I can say, boom, that malware right there, he can execute 471 00:27:29,560 --> 00:27:34,180 a command shell just by the presence of that one little word, right? 472 00:27:35,040 --> 00:27:36,840 He has the ability to execute a command shell. 473 00:27:36,960 --> 00:27:39,900 I don't know what he executes further, but he can execute a command shell. 474 00:27:41,020 --> 00:27:43,680 So string rules can help definitely augment your analysis. 475 00:27:44,440 --> 00:27:49,480 And then last but not least, on the stop on the detour, we have an attribution-based 476 00:27:49,480 --> 00:27:49,780 rule. 477 00:27:49,780 --> 00:27:53,760 So this is one from Dark Soul, the Teardrop 2 campaign or whatever. 478 00:27:53,900 --> 00:27:58,800 This is a custom base 64 alphabet that they used in some malware that somebody reported 479 00:27:58,800 --> 00:27:59,120 on. 480 00:27:59,340 --> 00:28:01,000 I grabbed it and made a signature out of it. 481 00:28:01,140 --> 00:28:07,080 So you definitely want to look for unique strings that will help you in attribution 482 00:28:07,080 --> 00:28:07,680 later on. 483 00:28:07,860 --> 00:28:12,240 So if you can't attribute it now, maybe with a string rule like this, you can attribute 484 00:28:12,240 --> 00:28:13,300 it in two years from now. 485 00:28:13,420 --> 00:28:17,960 Luckily, somebody else started the analysis, we picked up on this, and we were able to 486 00:28:17,960 --> 00:28:18,960 make a string rule out of it. 487 00:28:18,960 --> 00:28:21,700 So that kind of concludes our detour for a second. 488 00:28:21,860 --> 00:28:23,300 Let's get back to PlugX. 489 00:28:25,240 --> 00:28:30,720 The next layer in our package was the DLL Trojan Loader. 490 00:28:31,720 --> 00:28:33,900 I mentioned earlier it uses a sideloading technique. 491 00:28:34,360 --> 00:28:35,080 Sideloading is a... 492 00:28:35,080 --> 00:28:37,260 I don't know why they started calling this... 493 00:28:37,260 --> 00:28:39,000 Really it's called load order hijacking. 494 00:28:41,320 --> 00:28:42,360 That's what it's always been. 495 00:28:42,540 --> 00:28:45,520 Up until about two or three years ago, some people started throwing out sideloading. 496 00:28:45,760 --> 00:28:48,940 I guess it has to do with the fact that it's getting loaded into the database. 497 00:28:48,940 --> 00:28:52,700 It's getting into assigned binaries, executable process space, maybe. 498 00:28:52,880 --> 00:28:57,240 That's why they call it sideloading, but essentially this core is load order hijacking. 499 00:28:58,260 --> 00:29:02,460 The next thing you want to pay attention to, look at file attributes as well. 500 00:29:03,080 --> 00:29:04,400 File attributes are important. 501 00:29:04,540 --> 00:29:05,500 They're kind of the signature on. 502 00:29:05,740 --> 00:29:11,900 So this Trojan Loader had a very small size, and it had very little executable code, as 503 00:29:11,900 --> 00:29:12,500 we can see here. 504 00:29:13,060 --> 00:29:14,560 So I just kind of ran it through some tools. 505 00:29:14,760 --> 00:29:17,180 You'll see the strings tool, like I said, from reverse engineering. 506 00:29:17,180 --> 00:29:20,740 We've got the strings tool output, and then we also have a little bit of a chunk of output 507 00:29:20,740 --> 00:29:22,360 from IDA, the disassembler. 508 00:29:22,600 --> 00:29:26,800 You can see that from IDA, there's only four subroutines and a DLL entry point. 509 00:29:27,040 --> 00:29:28,920 So maybe five routines in the whole binary. 510 00:29:29,740 --> 00:29:34,060 Even the size from the strings output, it's only like 3.5K. 511 00:29:34,400 --> 00:29:35,340 I mean, that's really small. 512 00:29:35,980 --> 00:29:40,400 And then it's got a few readable strings in there. 513 00:29:40,560 --> 00:29:42,860 What's one thing that kind of jumps out to people? 514 00:29:43,180 --> 00:29:43,900 What do we remember? 515 00:29:43,960 --> 00:29:44,460 What do we love? 516 00:29:46,720 --> 00:29:47,160 Unicode. 517 00:29:47,180 --> 00:29:47,420 Unicode. 518 00:29:47,520 --> 00:29:48,240 Right, right, right. 519 00:29:48,380 --> 00:29:50,460 So do we see any Unicode here? 520 00:29:50,840 --> 00:29:50,900 Hmm. 521 00:29:51,440 --> 00:29:51,880 Hmm. 522 00:29:51,940 --> 00:29:52,300 We do. 523 00:29:52,500 --> 00:29:55,320 We do the msi.dll.eng. 524 00:29:55,780 --> 00:29:56,220 Hmm. 525 00:29:56,420 --> 00:29:58,400 And that's a really weird file name, too. 526 00:29:58,500 --> 00:29:59,720 It's got a double file extension. 527 00:30:00,440 --> 00:30:01,740 So it's Unicode. 528 00:30:01,780 --> 00:30:02,220 Hmm. 529 00:30:02,920 --> 00:30:04,700 That sounds like a good signature. 530 00:30:05,260 --> 00:30:06,260 So let's write that. 531 00:30:07,000 --> 00:30:07,440 Boom. 532 00:30:07,480 --> 00:30:08,160 This is how you write it. 533 00:30:08,220 --> 00:30:08,720 So rule. 534 00:30:08,960 --> 00:30:11,120 And we're going to name this rule PlugXTrojanLoader. 535 00:30:11,240 --> 00:30:11,980 Payload names. 536 00:30:12,680 --> 00:30:13,340 Payload names. 537 00:30:13,900 --> 00:30:14,980 The string detection. 538 00:30:15,540 --> 00:30:16,380 It's going to be... 539 00:30:17,180 --> 00:30:21,400 So for string one, msi.dll.eng, we're going to throw in the wide modifier, because remember, 540 00:30:21,540 --> 00:30:22,160 it was Unicode. 541 00:30:22,340 --> 00:30:26,360 And we're going to say full word, because we don't have any evidence that it's got maybe 542 00:30:26,360 --> 00:30:28,960 a file extension or other things before or after it, right? 543 00:30:29,100 --> 00:30:30,300 So we're going to say full word in this. 544 00:30:30,540 --> 00:30:32,820 And the condition is going to be any of them. 545 00:30:32,900 --> 00:30:35,920 So any of them means any of the strings present in the binary. 546 00:30:36,000 --> 00:30:36,860 If they're present... 547 00:30:36,860 --> 00:30:41,400 If any of these strings are present in a binary, then alert. 548 00:30:41,700 --> 00:30:46,160 So it's a real simple way to say all the signatures and strings. 549 00:30:46,800 --> 00:30:47,960 For any of them. 550 00:30:49,780 --> 00:30:54,880 So let's say we ran that rule, and for whatever reason, we got a lot of false positives back. 551 00:30:55,180 --> 00:30:57,300 I don't know why, but we did. 552 00:30:57,580 --> 00:31:05,040 We thought msi.dll.eng was pretty unique, even being Unicode and the full word. 553 00:31:05,480 --> 00:31:07,480 So how do we then bring it down? 554 00:31:07,880 --> 00:31:11,360 It really wasn't the case, but I just need to throw this out there to kind of help you 555 00:31:11,360 --> 00:31:11,500 guys. 556 00:31:11,600 --> 00:31:14,400 Just teach you more on how do you incorporate them. 557 00:31:14,480 --> 00:31:16,100 But it's pretty unique. 558 00:31:16,100 --> 00:31:16,460 It's pretty unique, actually. 559 00:31:17,080 --> 00:31:20,560 But in the case that you do get something back where you get a lot of false positives, 560 00:31:21,680 --> 00:31:25,360 you can look at the magic file number in an executable. 561 00:31:25,640 --> 00:31:31,460 So for those of you who run Linux or Unix, you have the file command, and it reads the 562 00:31:31,460 --> 00:31:33,160 magic number for the file type. 563 00:31:33,660 --> 00:31:34,680 Windows, they use extensions. 564 00:31:35,020 --> 00:31:37,040 But in this case, you have the 4D5A. 565 00:31:38,440 --> 00:31:42,820 We're going to look at that magic number, and we're going to use that to filter so 566 00:31:42,820 --> 00:31:44,500 our rule only runs against... 567 00:31:45,180 --> 00:31:46,080 Only runs against... 568 00:31:46,100 --> 00:31:50,100 Against Windows executables with the 4D5A signature at the beginning. 569 00:31:50,780 --> 00:31:53,000 So remember that that was at offset zero. 570 00:31:53,300 --> 00:31:54,620 It's at the very beginning of the file. 571 00:31:54,940 --> 00:31:59,240 And then this is what, in red, this is basically, I'm going to just give it out there to you. 572 00:31:59,420 --> 00:32:03,080 I'm not going to explain it, but you can go back and research it, how to write it. 573 00:32:03,180 --> 00:32:08,400 But you're checking for the MZ magic header at offset zero, the UN16 at offset zero, and 574 00:32:08,400 --> 00:32:11,160 you're looking for that byte value. 575 00:32:11,380 --> 00:32:15,180 It shows up as 5A4D because it's switched around, the ND in this. 576 00:32:15,200 --> 00:32:15,880 I figure which one. 577 00:32:16,100 --> 00:32:19,120 I mean, little in your binning affidavit, but either way. 578 00:32:19,460 --> 00:32:22,560 So that's how you would reduce some false positives there. 579 00:32:23,060 --> 00:32:26,540 Let's say you still get more false positives, right? 580 00:32:26,660 --> 00:32:27,740 Even after doing this. 581 00:32:29,480 --> 00:32:30,420 What can you do? 582 00:32:30,660 --> 00:32:32,980 I mentioned about file attributes, right? 583 00:32:33,060 --> 00:32:33,480 File attributes. 584 00:32:33,620 --> 00:32:35,900 So how about we say, let's reduce it down. 585 00:32:35,980 --> 00:32:38,320 The file size is less than 11K. 586 00:32:38,760 --> 00:32:44,980 So we can add that in there to then further reduce our false positives. 587 00:32:45,280 --> 00:32:45,760 Okay. 588 00:32:46,100 --> 00:32:50,140 So this rule is not really a hard rule, but we're combining a lot of conditions. 589 00:32:50,520 --> 00:32:53,580 For those of you out there, and maybe your first time, I'd say this is a medium-type 590 00:32:53,580 --> 00:32:55,060 rule and whatnot. 591 00:32:55,320 --> 00:32:57,200 But let's get into some hard stuff, right? 592 00:32:57,900 --> 00:33:00,820 This is the time where if you want to fall asleep, you can fall asleep. 593 00:33:01,440 --> 00:33:03,440 But if you want to be awake, you can be awake. 594 00:33:04,040 --> 00:33:10,020 So yeah, the PlugX Trojan Loader, and we're going to do rule two, because we wrote one 595 00:33:10,020 --> 00:33:11,020 on the payload names, right? 596 00:33:11,480 --> 00:33:13,060 Now we're going to do byte sequence rules. 597 00:33:13,500 --> 00:33:14,800 This one's going to be really hard. 598 00:33:14,800 --> 00:33:19,080 So in here, I'm just giving you the disassembly. 599 00:33:19,540 --> 00:33:20,020 Disassembly. 600 00:33:20,020 --> 00:33:24,820 If you've never heard that term, you have the opcodes on the left, and you have the 601 00:33:24,820 --> 00:33:26,060 assembly instructions on the right. 602 00:33:26,260 --> 00:33:31,480 Well, let's just do a disassembly on the brief, on the very, very brief, right? 603 00:33:31,540 --> 00:33:33,540 Because I don't have all day, and neither do you. 604 00:33:34,240 --> 00:33:36,620 So like I said, opcodes on the left. 605 00:33:36,700 --> 00:33:41,320 The 80 opcode is the opcode for the XOR mnemonic. 606 00:33:41,400 --> 00:33:44,780 The mnemonic is what you guys read for disassembly. 607 00:33:44,800 --> 00:33:45,040 Right? 608 00:33:45,240 --> 00:33:47,580 And the 80 is what the machine reads. 609 00:33:47,960 --> 00:33:49,800 So 80 means XOR. 610 00:33:50,760 --> 00:33:53,900 And then there's some operands that go with this instruction. 611 00:33:54,160 --> 00:33:56,160 And these operands, the CL register. 612 00:33:56,460 --> 00:34:02,900 So you're moving 3F into the CL register, and then you're just performing the XOR operation. 613 00:34:03,100 --> 00:34:06,340 But those opcodes correspond to those operands. 614 00:34:06,400 --> 00:34:10,160 The F1 3F corresponds to the CL 3F operand. 615 00:34:10,240 --> 00:34:14,420 And notice that the opcode, the last opcode, the 3F, is the same as our constant. 616 00:34:14,880 --> 00:34:17,260 It's our byte constant on the right-hand side. 617 00:34:17,420 --> 00:34:18,060 So pay attention to that. 618 00:34:18,160 --> 00:34:19,920 That's going to come into play in the future. 619 00:34:20,120 --> 00:34:24,280 If you get lost, if you get lost with opcodes, definitely check the... 620 00:34:24,280 --> 00:34:30,000 There's a really cool x86 assembler opcode reference page on the internet that you can 621 00:34:30,000 --> 00:34:30,460 check out. 622 00:34:30,720 --> 00:34:32,000 I use it all the time. 623 00:34:32,140 --> 00:34:36,320 It's like my right-hand page of information for opcodes, yeah. 624 00:34:37,820 --> 00:34:40,240 And then, so let's go into the byte sequence rules. 625 00:34:40,400 --> 00:34:43,120 I'm just going to give you some brief steps, and then we'll go into writing it. 626 00:34:43,120 --> 00:34:48,120 First, you want to wildcard the operands, and I'll show you exactly what that means 627 00:34:48,120 --> 00:34:48,600 with YARA. 628 00:34:48,740 --> 00:34:51,320 Next, you want to consolidate the wildcards with some jumps. 629 00:34:51,560 --> 00:34:54,060 You want to pad jumps for larger constants. 630 00:34:54,140 --> 00:34:59,260 So that 3F constant that we saw, that 3F byte constant, there's a possibility it could 631 00:34:59,260 --> 00:35:01,100 be a larger constant in that position. 632 00:35:01,320 --> 00:35:04,140 So we want to pad for those larger constants if they ever show up. 633 00:35:04,320 --> 00:35:07,460 And then also, we want to do constant enrichment and tuning. 634 00:35:07,560 --> 00:35:12,080 We want to hunt our malware repositories, our new intelligent data streams for other 635 00:35:12,080 --> 00:35:12,700 samples. 636 00:35:13,120 --> 00:35:13,160 Right? 637 00:35:14,440 --> 00:35:17,060 So how do we do the first step, wildcarding operands? 638 00:35:17,360 --> 00:35:21,360 We find all the opcodes for the operations. 639 00:35:23,160 --> 00:35:24,100 We ignore those. 640 00:35:24,320 --> 00:35:27,740 And then all the operands are going to be in red that you're going to see up on the 641 00:35:27,740 --> 00:35:27,960 screen. 642 00:35:28,280 --> 00:35:30,100 So we're going to wildcard that. 643 00:35:30,180 --> 00:35:30,980 How do we wildcard that? 644 00:35:31,220 --> 00:35:34,560 Boom, just with question marks, double question marks. 645 00:35:34,820 --> 00:35:40,360 So we just, on the right-hand side, we've wildcarded all of our operands. 646 00:35:40,560 --> 00:35:41,420 So real quick. 647 00:35:41,560 --> 00:35:42,780 I mean, there's some. 648 00:35:42,780 --> 00:35:43,840 We're getting some heavy stuff. 649 00:35:46,420 --> 00:35:49,800 Next, you want to consolidate the wildcards with jumps, just to make it look prettier. 650 00:35:49,880 --> 00:35:52,720 You don't really have to do this, but if you want to type out all those question marks, 651 00:35:52,900 --> 00:35:53,260 you can. 652 00:35:53,520 --> 00:35:54,240 That's up to you. 653 00:35:54,460 --> 00:35:56,800 But I like to consolidate them with some jumps. 654 00:35:57,120 --> 00:36:01,320 And basically, the two sets of question marks, so you've got four question marks on the left 655 00:36:01,320 --> 00:36:04,060 at the very top, can be reduced down to a two. 656 00:36:04,200 --> 00:36:05,300 So that means skip two bytes. 657 00:36:05,560 --> 00:36:06,100 It's a jump. 658 00:36:06,220 --> 00:36:06,760 It's called a jump. 659 00:36:08,500 --> 00:36:10,980 Next, you want to pad for larger constants. 660 00:36:11,340 --> 00:36:11,880 Remember that? 661 00:36:11,880 --> 00:36:13,500 That 3F constant that we talked about. 662 00:36:13,920 --> 00:36:16,460 In this case, we've got two of them in this byte sequence. 663 00:36:16,820 --> 00:36:20,340 We have the 3F, and then two instructions later, we have the push zero. 664 00:36:20,740 --> 00:36:24,100 So the XOR, CL with the 3F, and then the push zero. 665 00:36:25,200 --> 00:36:27,760 Push zero actually happens to be some junk code. 666 00:36:28,020 --> 00:36:35,100 I don't cover that, but yeah, that's something you'll have to take into account. 667 00:36:35,380 --> 00:36:39,200 I will show you at the end with the finalized rule, but I'm not going to exactly explain 668 00:36:39,200 --> 00:36:40,080 the math on it. 669 00:36:40,140 --> 00:36:40,820 There's a little bit of math. 670 00:36:40,820 --> 00:36:41,560 It's really easy, though. 671 00:36:41,620 --> 00:36:44,220 It's addition and subtraction, depending on what you've got to do. 672 00:36:45,540 --> 00:36:47,340 So how do you pad for larger constants? 673 00:36:47,520 --> 00:36:49,220 Remember that we already have one byte present. 674 00:36:49,860 --> 00:36:50,700 One byte present. 675 00:36:50,780 --> 00:36:53,700 This is 32-bit architecture, x86, right? 676 00:36:53,800 --> 00:36:56,960 So we can have up to four bytes for a constant. 677 00:36:58,740 --> 00:37:01,960 So we already have one present, so three more. 678 00:37:02,220 --> 00:37:02,600 Three more. 679 00:37:02,660 --> 00:37:03,480 What if three more are present? 680 00:37:03,580 --> 00:37:07,100 So we have a jump of between two to five bytes, right? 681 00:37:07,280 --> 00:37:08,500 Jump between two to five bytes. 682 00:37:08,620 --> 00:37:09,740 And then we have the push zero. 683 00:37:09,740 --> 00:37:14,840 We already have one present, and in this case – oh, so we have the two. 684 00:37:14,900 --> 00:37:16,800 The reason why we have the two is because of that CL. 685 00:37:17,080 --> 00:37:21,980 Remember we had two opcodes for the operand, so we have two operands. 686 00:37:22,040 --> 00:37:27,500 It doesn't always do that way, but we had two, and then so therefore we start off with 687 00:37:27,500 --> 00:37:30,720 two and then add three more that we wildcarded. 688 00:37:30,760 --> 00:37:34,360 And now with the push zero, we have one for the operand. 689 00:37:35,540 --> 00:37:38,860 So we have one and add three more, so you get a jump of one to four. 690 00:37:39,740 --> 00:37:40,380 Add three more to two. 691 00:37:40,500 --> 00:37:41,300 You get two to five. 692 00:37:41,640 --> 00:37:42,640 I don't know if you're seeing it there. 693 00:37:43,020 --> 00:37:44,820 You can go back and look, but yeah. 694 00:37:45,580 --> 00:37:48,660 Next they have what's called in YAR they have called alternates. 695 00:37:49,140 --> 00:37:49,940 Alternates are really good. 696 00:37:50,060 --> 00:37:51,360 So in the left you have sample one. 697 00:37:52,360 --> 00:37:57,400 Sample one, the first byte in this sequence that we're trying to write – oh, and I forgot 698 00:37:57,400 --> 00:38:00,780 to mention earlier that I did the reverse engineering for you. 699 00:38:00,940 --> 00:38:08,300 We're reversing a – or we're signaturing a string decode routine that was present – remember 700 00:38:08,300 --> 00:38:09,560 we only had five routines. 701 00:38:12,160 --> 00:38:17,400 One of those five is a string obfuscation, deobfuscation routine, so that's what we're 702 00:38:17,740 --> 00:38:18,160 signaturing on. 703 00:38:18,800 --> 00:38:21,800 That's what we ended up picking to write our rule signature. 704 00:38:22,000 --> 00:38:22,880 I should have mentioned that in the beginning. 705 00:38:23,020 --> 00:38:24,600 I'm sorry, but yeah. 706 00:38:25,860 --> 00:38:29,280 So sample one on the left, you have an 8B instruction. 707 00:38:30,020 --> 00:38:33,800 Sample two, hmm, from doing some hunting, we found a different one. 708 00:38:34,200 --> 00:38:39,120 Opcode is a little bit different, but it starts with an 8A instruction as well. 709 00:38:40,360 --> 00:38:42,920 And so they have what's called alternates. 710 00:38:44,360 --> 00:38:49,080 So we kind of go back to the opcode table, consult the opcode table, and notice that 711 00:38:49,080 --> 00:38:53,760 for the move instruction we have the 8-8, 8-9, 8-A, 8-B, and 8-C. 712 00:38:53,920 --> 00:38:55,120 Hmm, those are all moves. 713 00:38:55,320 --> 00:38:56,880 So let's do an alternate. 714 00:38:57,220 --> 00:39:00,080 So we have 8B, and we want to insert 8A, right? 715 00:39:00,260 --> 00:39:04,900 So they have this little open bracket or with the logical or. 716 00:39:05,820 --> 00:39:08,080 And then so you have 8A or 8B. 717 00:39:08,160 --> 00:39:09,480 And then you follow by a jump. 718 00:39:09,480 --> 00:39:11,340 So we're in that sequence. 719 00:39:11,880 --> 00:39:17,360 So now we're writing our byte sequence rule, and we're running against YARA or Virus Total 720 00:39:17,360 --> 00:39:20,780 Intelligence, and it comes back at us and it says, hey, you're too optimized. 721 00:39:21,700 --> 00:39:23,820 You are just too optimized. 722 00:39:24,020 --> 00:39:25,760 Well, I cannot, I can't keep up. 723 00:39:25,920 --> 00:39:27,440 It's slowing down the scanner. 724 00:39:28,280 --> 00:39:30,460 You need to pull back on this rule, right? 725 00:39:30,760 --> 00:39:32,340 Happens a lot in byte sequence rules. 726 00:39:32,460 --> 00:39:33,260 So how do you pull back? 727 00:39:33,340 --> 00:39:38,300 One of the great things that I kind of pull back on is similar addresses, similar address 728 00:39:38,300 --> 00:39:38,800 locations. 729 00:39:39,520 --> 00:39:43,140 So the initial address locations are one of the things that I kind of pull back on. 730 00:39:43,280 --> 00:39:52,160 They can change, but if you look at this one, I've kind of highlighted the 00300010 byte, 731 00:39:52,260 --> 00:39:54,840 and then another one further down you can even see I use an alternate. 732 00:39:55,240 --> 00:40:00,280 And so they do change between these two rules, this Trojan loader 8 and Trojan loader 9 rule 733 00:40:00,280 --> 00:40:00,780 that I have. 734 00:40:00,880 --> 00:40:04,640 I wrote like 12 different rules on this one from all these different payloads that I was 735 00:40:04,640 --> 00:40:06,640 finding, like literally. 736 00:40:06,780 --> 00:40:08,860 So I'm going to show you those results in a little bit. 737 00:40:09,060 --> 00:40:09,460 All right. 738 00:40:09,480 --> 00:40:11,360 some of the cool results that writing the byte 739 00:40:11,360 --> 00:40:13,200 sequence rules, like I said, you can find the 740 00:40:13,200 --> 00:40:14,800 families and find the variants 741 00:40:14,800 --> 00:40:17,320 how it actually impacted and helped 742 00:40:17,320 --> 00:40:18,820 us to improve our string-based rules 743 00:40:18,820 --> 00:40:21,260 later on. So after this, after we write 744 00:40:21,260 --> 00:40:23,280 this byte sequence rule, I'm going to show you that. So stick around. 745 00:40:23,420 --> 00:40:25,240 Don't leave yet. I know this is the hard stuff, but yeah. 746 00:40:26,580 --> 00:40:27,380 So look 747 00:40:27,380 --> 00:40:28,660 for these similar address locations 748 00:40:29,840 --> 00:40:31,340 and maybe you want to insert 749 00:40:31,340 --> 00:40:33,200 them back in. Okay. So we 750 00:40:33,200 --> 00:40:35,420 took out the wildcards and we inserted these bytes 751 00:40:35,420 --> 00:40:37,580 back in. This is the finalized 752 00:40:37,580 --> 00:40:37,920 rule. 753 00:40:39,480 --> 00:40:40,640 I have a couple things 754 00:40:40,640 --> 00:40:42,760 that I didn't cover in here. At the very, very bottom, I have 755 00:40:42,760 --> 00:40:44,720 a lower noble wildcard. I really love 756 00:40:44,720 --> 00:40:46,640 those. Oh man, I wish I had it all day 757 00:40:46,640 --> 00:40:48,100 to explain and I'd tell you all about them. 758 00:40:48,640 --> 00:40:50,720 We also had some junk code. 759 00:40:50,840 --> 00:40:52,420 If you look at the picture at the bottom right-hand corner, 760 00:40:52,660 --> 00:40:54,680 that's the disassembly, and that was like 761 00:40:54,680 --> 00:40:56,640 the one with like a whole, it's got four junk code 762 00:40:56,640 --> 00:40:58,700 instructions, right? So how do you handle those junk codes? 763 00:40:58,820 --> 00:41:00,120 So we basically pad our 764 00:41:00,120 --> 00:41:02,760 jumps a little bit more, and we even have a jump 765 00:41:02,760 --> 00:41:04,620 there from zero to five. So that's 766 00:41:04,620 --> 00:41:06,340 zero jump. That's because of the junk code. 767 00:41:06,500 --> 00:41:08,740 And we had to remove the, we had to de-optimize 768 00:41:08,740 --> 00:41:09,240 with that 769 00:41:09,480 --> 00:41:10,660 virtual address, right? So 770 00:41:10,660 --> 00:41:12,760 yeah, so that's the finalized rule. 771 00:41:13,820 --> 00:41:14,840 So just a quick 772 00:41:14,840 --> 00:41:16,680 review. Byte sequence rule steps. 773 00:41:17,900 --> 00:41:18,780 Wildcard your 774 00:41:18,780 --> 00:41:20,580 rules. Wildcard your 775 00:41:20,580 --> 00:41:21,360 operands, sorry. 776 00:41:24,320 --> 00:41:24,900 Consolidate 777 00:41:24,900 --> 00:41:26,260 your wildcards with jumps. 778 00:41:26,820 --> 00:41:28,780 And then pad 779 00:41:28,780 --> 00:41:30,680 your jumps for larger constants. And 780 00:41:30,680 --> 00:41:32,300 remember that when you 781 00:41:32,300 --> 00:41:34,720 write these byte sequence rules, you're 782 00:41:34,720 --> 00:41:36,640 constantly doing tuning, even with the 783 00:41:37,110 --> 00:41:38,860 string-based rules, constantly doing tuning. 784 00:41:38,860 --> 00:41:40,300 And hunting your other malware 785 00:41:40,300 --> 00:41:42,320 repositories for new samples, your new 786 00:41:42,320 --> 00:41:44,120 intelligence stream, like I said earlier 787 00:41:44,120 --> 00:41:46,100 on. So let's start to 788 00:41:46,100 --> 00:41:48,240 look at some of the repeated 789 00:41:48,240 --> 00:41:50,240 things. So in this case, I kind of 790 00:41:50,240 --> 00:41:52,360 highlighted the, these are all the same 791 00:41:52,360 --> 00:41:53,780 MD5, and 792 00:41:54,540 --> 00:41:56,160 all these rules from 793 00:41:56,160 --> 00:41:58,200 virus total intelligence, that's where I do my hunting. 794 00:41:58,380 --> 00:41:59,340 Sorry guys, but 795 00:42:00,060 --> 00:42:02,180 I'm very fortunate to do it. I love it in there. 796 00:42:03,100 --> 00:42:03,980 But the, 797 00:42:04,680 --> 00:42:06,120 so they hit on 798 00:42:06,120 --> 00:42:08,200 all these plug X rules, and you 799 00:42:08,200 --> 00:42:12,000 can notice if you notice I have TBHK campaign plug 800 00:42:12,000 --> 00:42:14,480 X Trojan loader 10 at the very top, then the next 801 00:42:14,480 --> 00:42:18,760 one is Trojan loader 06. Hmm, what happened to 7, 8, and 9? 802 00:42:20,120 --> 00:42:23,600 Trojan loader 5, Trojan loader 4, what happened to 2 and 3? 803 00:42:23,800 --> 00:42:25,620 Because now we have Trojan loader 1, and then we have 804 00:42:25,620 --> 00:42:28,580 a another string to code, which actually is the same string to 805 00:42:28,580 --> 00:42:30,840 code thing. So I actually had like 12, but that one I just 806 00:42:30,840 --> 00:42:36,340 didn't number it. But notice here, I wrote like 10 different rules for 807 00:42:36,340 --> 00:42:38,040 in the same function signature. 808 00:42:38,200 --> 00:42:43,920 Right? So if you don't get a hit on, if you write this rule, this one rule to rule 809 00:42:43,920 --> 00:42:48,440 them all, like a Lord of the Rings effect, I guess, kind of say, if you write this one 810 00:42:48,440 --> 00:42:53,320 rule to rule them all, and you get a variant that doesn't hit on it, and you only have 811 00:42:53,320 --> 00:42:57,940 one rule, you have no coverage on that. So I write like, I wrote like 12 rules on this 812 00:42:57,940 --> 00:43:06,020 guy, and you notice I got 1, 2, 3, 4, 5, 6 rules out of the 12 hit. So, you know, I 813 00:43:06,020 --> 00:43:08,040 think that's pretty good coverage. And then I look at it, 814 00:43:08,040 --> 00:43:11,900 like the ones that don't hit, and see why, and maybe tune some of those rules and whatnot. 815 00:43:12,160 --> 00:43:15,220 So constant enrichment and tuning on multiple rules. 816 00:43:16,000 --> 00:43:23,160 And then, last but not least, let me go over some more, some more results. Our byte sequence 817 00:43:23,160 --> 00:43:29,000 rule then fueled back results. What we didn't get, what we got hit on the byte sequence 818 00:43:29,000 --> 00:43:34,400 rules, what we didn't get hit on with the payload names, the string ones that we wrote 819 00:43:34,400 --> 00:43:37,720 earlier, these are some new names that we got. 820 00:43:38,040 --> 00:43:43,100 Using our generic byte sequence rules, right? So now we have more payload names, and we 821 00:43:43,100 --> 00:43:47,740 can include that into that rule as well. And then looking at some of these names, does 822 00:43:47,740 --> 00:43:51,800 anybody see any patterns? Does anybody see any patterns that emerged? We talked about 823 00:43:51,800 --> 00:43:55,680 one. We talked about one earlier. Anybody? Anybody? 824 00:43:57,960 --> 00:44:02,460 The double extension, double file extension. Good, good. I think there's one person paying 825 00:44:02,460 --> 00:44:06,160 attention. Nice. So yeah, the double file extension. That's, 826 00:44:06,200 --> 00:44:08,020 that's definitely one pattern that started emerging. 827 00:44:08,040 --> 00:44:11,720 merge. Could all these binaries be related to the same 828 00:44:11,720 --> 00:44:15,860 actor, the same APT actor, or the same malware APT author 829 00:44:15,860 --> 00:44:19,700 since we know that PlugX is being used for six, eight, a million different 830 00:44:19,700 --> 00:44:23,860 APT campaigns in China. Can this all be 831 00:44:23,860 --> 00:44:27,960 the same actor? Are there any other themes that you may see in this 832 00:44:27,960 --> 00:44:31,420 data? Another interesting one that popped out was 833 00:44:31,420 --> 00:44:35,080 a McAfee theme, the MC, MCF, 834 00:44:37,420 --> 00:44:39,440 MCUtil, MCF, MC, McAfee. 835 00:44:39,520 --> 00:44:43,700 Are they trying to hide amongst McAfee products and whatnot with some of these names? 836 00:44:44,560 --> 00:44:47,380 There was even a real easy one, Microsoft 837 00:44:47,380 --> 00:44:52,440 Installer theme, msi.dll.eng, msi.dll.cab. 838 00:44:52,720 --> 00:44:56,580 Oh, there's an AV name, another AV name in there. Uh-oh. But double file 839 00:44:56,580 --> 00:45:00,160 extension, they're trying to do Microsoft. 840 00:45:00,540 --> 00:45:04,840 Look at all these themes we're extracting out based on a couple of rules that we wrote 841 00:45:04,840 --> 00:45:08,520 on this malware, which was kind of pretty hard to signature, right? 842 00:45:08,660 --> 00:45:12,300 I mean, it used the self-extracting archive, which is like, 843 00:45:12,380 --> 00:45:16,460 you see that all the time, a really, really small DLL loader, assigned 844 00:45:16,460 --> 00:45:20,540 executable, and then we didn't even get into the payload, right? We didn't even get into the 845 00:45:20,540 --> 00:45:23,380 payload. And look at all these themes that we're picking up. 846 00:45:24,140 --> 00:45:27,720 And last but not least, the last theme that I want to definitely point out to you, 847 00:45:28,300 --> 00:45:32,460 look at this news media theme, right? BBC, British Broadcasting Company, 848 00:45:33,000 --> 00:45:33,440 Sky. 849 00:45:34,960 --> 00:45:37,780 My team lead pointed this out to me. I didn't know that Sky was like the 850 00:45:38,980 --> 00:45:41,740 British version of Fox News, right? 851 00:45:41,880 --> 00:45:46,740 So .bbc.sky. And then they forgot the dot, but 852 00:45:46,740 --> 00:45:50,480 you see a Fox, maybe that's Fox News in there too as well. So are they targeting 853 00:45:51,220 --> 00:45:55,000 these news organizations? Or maybe not. Are they trying to 854 00:45:55,000 --> 00:45:58,780 mix in? Or maybe they're targeting the news partners with news organizations or something like that? 855 00:45:58,900 --> 00:46:01,720 Who knows? But I mean, these are some patterns that started to emerge 856 00:46:01,720 --> 00:46:08,840 when we started tying multiple rules and our bi-signature rules with our string rules, right? 857 00:46:09,720 --> 00:46:14,040 So let's do some housekeeping. Let's kind of wrap it up. Like I said, when writing your 858 00:46:14,040 --> 00:46:18,980 rules, rules, rules, rules. Can't go wrong with enough rules, right? Have a really good 859 00:46:18,980 --> 00:46:23,280 naming scheme also. So a year later, if these rules fire, especially your attribution-based 860 00:46:23,280 --> 00:46:27,260 rules, if they fire two years later, you can remember, oh yeah, that was when I did that 861 00:46:27,260 --> 00:46:31,060 investigation. Signature all the layers. It's like the onion, man. 862 00:46:31,060 --> 00:46:36,580 Sometimes I do really want to cry. And then, you know, constant tuning. Look at your data 863 00:46:36,580 --> 00:46:42,640 sources, you know, the known source, your malware itself, new intelligence streams. Share with 864 00:46:42,640 --> 00:46:48,260 meta. Share with meta, like I said. How about some review for some string rules? Remember, 865 00:46:48,360 --> 00:46:54,980 we love what? Unicode. Nice. All right. All right. And reduce some false positives 866 00:46:54,980 --> 00:46:58,480 of string rules. You want to use those modifiers. Look for those white space characters and 867 00:46:58,480 --> 00:47:00,360 maybe some file attributes and stuff like that. 868 00:47:01,060 --> 00:47:07,320 And remember that strings can be changed or obfuscated. And then, last but not least, 869 00:47:07,440 --> 00:47:11,800 we really went heavy. Didn't we go really heavy into some hard stuff with the byte 870 00:47:11,800 --> 00:47:16,760 sequence rules? I wish I had more time to, because I didn't even show you more. But, 871 00:47:16,840 --> 00:47:21,000 you know, we used the byte sequence rules to kind of find a broader campaign when tying 872 00:47:21,000 --> 00:47:26,740 that with the string rules. And we had more opportunities to signature or create different 873 00:47:26,740 --> 00:47:30,300 signatures with the malware as well. We looked at some of those implementation 874 00:47:31,060 --> 00:47:35,940 gates, the custom features, maybe. So, also remember, consult your opcode table. This 875 00:47:35,940 --> 00:47:40,880 is the point where I'm just kind of reading from the slides. I'm sorry, guys. But there's 876 00:47:40,880 --> 00:47:44,240 so much I want to tell you. There's so much I want from you to walk away from this talk 877 00:47:44,240 --> 00:47:50,200 that I just, yeah. Consult the opcode table. Identify your junk code. I didn't really show 878 00:47:50,200 --> 00:47:53,700 you that, but just keep an eye out on it. And then look for some of the opportunities 879 00:47:53,700 --> 00:47:58,120 to use alternates, lower nibble wildcards. Make use of structures. That's another thing 880 00:47:58,120 --> 00:48:00,880 we didn't get a chance to talk about. The lower nibble wildcards, we didn't get a chance 881 00:48:00,880 --> 00:48:01,040 to talk about. The lower nibble wildcards, we didn't get a chance to talk about. So, 882 00:48:01,060 --> 00:48:07,000 also, I figure there's ways to signature actually bits. Not just bytes, but bits in 883 00:48:07,000 --> 00:48:10,980 Yara. You can actually go down to the bit level, which is really cool, using the bitwise 884 00:48:10,980 --> 00:48:16,020 operators and whatnot. So, if you wanted to check bits, just bit flags. That is awesome 885 00:48:16,020 --> 00:48:24,080 using Yara. Some resources. These are the two MD5s that I used for the PlugX in this. 886 00:48:24,300 --> 00:48:30,040 And then check out our GitHub, Fidelis Cyber. There's some links to some of the things from 887 00:48:30,500 --> 00:48:30,980 my talk. 888 00:48:31,060 --> 00:48:35,160 And that's pretty much it. It's the end. Does anybody have any questions? We've got 889 00:48:35,160 --> 00:48:36,120 about four and a half minutes. 890 00:48:37,000 --> 00:48:39,880 Does Yara actually quarantine, or is it just alerting? 891 00:48:40,020 --> 00:48:45,060 It just alerts. No, it does not quarantine. And you have to scan. You're scanning on 892 00:48:45,060 --> 00:48:50,380 demand. Unless you're using a tool that's integrated on it, then it would alert. But 893 00:48:50,380 --> 00:48:55,020 no, it does not quarantine. It's just an alert, a detection alert. We're running out 894 00:48:55,020 --> 00:48:55,520 of time, Ming. 895 00:48:55,660 --> 00:48:56,840 Let me get the next question. 896 00:48:57,040 --> 00:48:58,500 Oh, I'm sorry. Yeah. 897 00:48:58,680 --> 00:48:59,080 Question? 898 00:48:59,640 --> 00:48:59,940 Question? 899 00:48:59,940 --> 00:49:02,720 Go back one slide real quick, because I wanted to copy. 900 00:49:02,800 --> 00:49:03,320 Oh, sorry. 901 00:49:03,520 --> 00:49:03,720 The resources slide? 902 00:49:04,520 --> 00:49:04,920 Okay. 903 00:49:04,960 --> 00:49:05,460 We changed it. 904 00:49:05,820 --> 00:49:06,220 Okay. 905 00:49:07,360 --> 00:49:10,340 Are you going to make these slides available on one of those links? 906 00:49:10,880 --> 00:49:11,280 Yeah. 907 00:49:11,440 --> 00:49:14,280 Ming, are we making these slides available? 908 00:49:14,440 --> 00:49:14,620 Yeah. 909 00:49:14,960 --> 00:49:15,480 Come on. 910 00:49:16,240 --> 00:49:17,120 How did you know? 911 00:49:17,120 --> 00:49:17,760 No, come on. Come on. 912 00:49:17,860 --> 00:49:22,120 In the sample five bytes, how did you know that one was... 913 00:49:22,120 --> 00:49:25,820 How did you know it was a deobfuscation routine in that file? 914 00:49:27,620 --> 00:49:29,560 I know. I mean, in general. 915 00:49:29,940 --> 00:49:31,340 I had to do it in the actual release. 916 00:49:31,980 --> 00:49:33,580 Also, the most interesting thing in the article. 917 00:49:33,580 --> 00:49:33,600 Yeah. 918 00:49:34,780 --> 00:49:35,940 I did the hard work for it. 919 00:49:36,560 --> 00:49:37,440 I did it, yeah. 920 00:49:38,240 --> 00:49:39,660 I'm here in the public office. 921 00:49:39,840 --> 00:49:42,240 If I have time to talk about reverse engineering, I did that too. 922 00:49:46,380 --> 00:49:49,920 How do you collect the malware and its variants? 923 00:49:50,900 --> 00:49:53,040 How do you collect the sample and the variants? 924 00:49:53,420 --> 00:49:54,380 How do I collect the samples? 925 00:49:54,400 --> 00:49:54,640 Yes. 926 00:49:54,860 --> 00:49:55,920 I get intelligence. 927 00:49:57,300 --> 00:49:59,920 I get intelligence tippers from the blogs and the reports. 928 00:49:59,940 --> 00:50:05,200 reports that i read online right and they generally those companies give out uh indicators 929 00:50:05,200 --> 00:50:10,440 like like hashes and whatnot i collect them through virus total uh there's also other free 930 00:50:10,440 --> 00:50:15,180 places like virus share that you can get uh for free you know malware for free and whatnot so you 931 00:50:15,180 --> 00:50:19,720 just got to find a good malware repository uh that's constantly getting updated and whatnot 932 00:50:19,720 --> 00:50:26,180 i use virus total it's a pay for if you join yara exchange group it's a google group you can get 933 00:50:26,180 --> 00:50:31,860 some limited queries from them for free from virus total uh and and whatnot if for some free stuff 934 00:50:31,860 --> 00:50:38,060 any other questions any other questions you got about a minute and a half no we got some we got 935 00:50:38,060 --> 00:50:45,680 some time uh we got some time um i know people are walking in and out um y'all hated me that much 936 00:50:49,420 --> 00:50:53,020 yeah does anyone have any questions anyone have any questions for jay 937 00:50:55,440 --> 00:50:55,920 yeah 938 00:50:57,500 --> 00:51:04,660 oh okay so while i'm here um why don't i make yes and the answer the short answer is yes 939 00:51:05,660 --> 00:51:10,240 how do you deal with the randomized you know when they randomize 940 00:51:10,240 --> 00:51:15,720 like say dot dll dot eng or that kind of thing their code randomizes their names 941 00:51:15,720 --> 00:51:22,840 in the string rule you might for randomized strings or randomized bytes 942 00:51:25,520 --> 00:51:26,160 let's 943 00:51:27,680 --> 00:51:29,520 create a different name 944 00:51:29,520 --> 00:51:36,000 so you may want to create you want to turn that that string from a string 945 00:51:36,000 --> 00:51:42,240 based rule to a byte sequence rule in a hex editor and then wildcard out those 946 00:51:42,240 --> 00:51:48,880 characters or you can do a regular expression or actually yara gives you the ability to define 947 00:51:48,880 --> 00:51:49,800 uh 948 00:51:49,800 --> 00:51:50,700 uh 949 00:51:50,700 --> 00:51:50,960 uh 950 00:51:50,960 --> 00:51:51,920 non-ascii bites 951 00:51:51,920 --> 00:51:53,260 in the ASCII text. 952 00:51:54,020 --> 00:51:56,500 Now that doesn't wildcard like you were asking, 953 00:51:56,620 --> 00:51:58,760 but it gives the ability to find non-ASCII bytes 954 00:51:58,760 --> 00:52:01,000 mixed in with the ASCII text as well. 955 00:52:01,260 --> 00:52:02,500 So you can convert that. 956 00:52:02,560 --> 00:52:03,780 There's three different options. 957 00:52:04,600 --> 00:52:07,060 Regex, convert that string rule to a byte sequence rule, 958 00:52:07,220 --> 00:52:09,260 and then also insert bytes if needed, 959 00:52:09,320 --> 00:52:11,400 like non-ASCII bytes, to further tune it. 960 00:52:11,680 --> 00:52:13,940 Do you see that happening a lot in the online app 961 00:52:13,940 --> 00:52:15,380 where you get your randomization? 962 00:52:15,440 --> 00:52:17,220 Do I see a lot of randomization? 963 00:52:17,600 --> 00:52:19,320 Yeah, with the file names. 964 00:52:19,320 --> 00:52:21,140 I mean, yeah, it happens a lot. 965 00:52:21,220 --> 00:52:22,500 They're so easy to change. 966 00:52:22,740 --> 00:52:24,640 You don't even need a disassembler. 967 00:52:24,680 --> 00:52:25,780 You just change them in a hex editor 968 00:52:25,780 --> 00:52:27,380 to re-change file names or whatnot, 969 00:52:27,620 --> 00:52:28,840 or they get changed on the fly. 970 00:52:29,220 --> 00:52:31,000 I mean, yeah, file names are definitely changed. 971 00:52:31,160 --> 00:52:34,660 We had very little to go with on this PlugX Trojan Loader, 972 00:52:34,740 --> 00:52:37,940 hence why I decided to signature on a file name. 973 00:52:38,140 --> 00:52:41,460 So that file name is actually the file name of the payload. 974 00:52:42,480 --> 00:52:45,860 So it's a string present in the DLL loader. 975 00:52:45,900 --> 00:52:47,460 I should have explained this. I'm sorry, guys. 976 00:52:47,560 --> 00:52:49,300 It's a string present in the DLL loader 977 00:52:49,780 --> 00:52:51,740 that's the name of the payload. 978 00:52:52,840 --> 00:52:55,600 So the loader needs to decrypt, 979 00:52:55,640 --> 00:52:57,260 or it needs to execute the payload. 980 00:52:57,480 --> 00:52:59,440 So it needs to look for that file on disk. 981 00:52:59,620 --> 00:53:02,320 That's why we were writing that file name 982 00:53:02,840 --> 00:53:04,260 string signature-based rule. 983 00:53:04,360 --> 00:53:05,500 Sorry, I should have explained that. 984 00:53:06,040 --> 00:53:06,480 Yeah. 985 00:53:07,520 --> 00:53:09,060 So any other questions? 986 00:53:09,520 --> 00:53:10,420 Any other questions? 987 00:53:13,760 --> 00:53:14,720 I can't see. 988 00:53:15,160 --> 00:53:16,220 Doesn't look like... 989 00:53:16,760 --> 00:53:18,060 Good, good, good. 990 00:53:18,060 --> 00:53:21,040 One question I will throw out there. 991 00:53:21,160 --> 00:53:23,040 I do get a lot of questions about UTF-8. 992 00:53:24,040 --> 00:53:27,060 In that case, if you're trying to signature UTF-8, 993 00:53:27,180 --> 00:53:28,120 just write a byte sequence rule. 994 00:53:28,220 --> 00:53:29,040 Look at it in a hex editor. 995 00:53:29,240 --> 00:53:30,020 Write a byte sequence rule. 996 00:53:30,140 --> 00:53:31,500 I haven't gotten that question a lot, too. 997 00:53:31,700 --> 00:53:32,120 So, yeah. 998 00:53:32,560 --> 00:53:33,260 Thank you, Ming. 999 00:53:33,440 --> 00:53:34,260 Thank you, guys. 1000 00:53:34,400 --> 00:53:35,100 Appreciate it. 1001 00:53:35,300 --> 00:53:36,760 Jay, thank you so much. 1002 00:53:36,920 --> 00:53:37,400 Thank you. 1003 00:53:38,960 --> 00:53:41,960 Believe me, I can tell this talk went well. 1004 00:53:42,320 --> 00:53:45,080 One thing while you're here, while we're all here, 1005 00:53:45,080 --> 00:53:50,200 and I will say, as I mentioned a few times yesterday, 1006 00:53:52,000 --> 00:53:54,420 within the next two or three weeks, 1007 00:53:54,560 --> 00:53:56,920 every speaker workshop slide, 1008 00:53:57,240 --> 00:54:00,400 all the slides will be published on the Wallace Sheep website, 1009 00:54:00,660 --> 00:54:01,740 wallacesheep.com. 1010 00:54:02,840 --> 00:54:06,240 Also, and then within the next, I don't know when, 1011 00:54:06,500 --> 00:54:09,420 within the next, usually before Christmas time, 1012 00:54:09,580 --> 00:54:11,580 somewhere between now and Christmas time, 1013 00:54:11,720 --> 00:54:13,440 the videos. 1014 00:54:13,440 --> 00:54:19,500 All the talks, including your, all the speaker workshop talks, 1015 00:54:19,700 --> 00:54:23,760 will be posted on not only the Wallace Sheep website, 1016 00:54:24,020 --> 00:54:26,040 but also by DEF CON, the conference. 1017 00:54:26,540 --> 00:54:29,740 So, slides will be made available within the next two weeks 1018 00:54:29,740 --> 00:54:30,840 on wallacesheep.com, 1019 00:54:31,080 --> 00:54:34,560 and all the video streams of the talks will be available 1020 00:54:34,560 --> 00:54:37,020 sometime between now and Christmas time, 1021 00:54:37,220 --> 00:54:38,140 usually in the fall. 1022 00:54:39,000 --> 00:54:41,100 So, again, thank you so much, Jay. 1023 00:54:41,260 --> 00:54:41,960 That's good news. 1024 00:54:42,040 --> 00:54:42,420 Thank you. 1025 00:54:43,440 --> 00:54:43,660 Thank you so much. 1026 00:54:43,660 --> 00:54:44,020 Appreciate it. 1027 00:54:45,520 --> 00:54:46,300 Thank you, guys. 1028 00:54:46,520 --> 00:54:47,060 Thank you. 1029 00:54:47,260 --> 00:54:47,760 Thank you. 1030 00:54:47,900 --> 00:54:50,060 And so, Jay, feel free if, 1031 00:54:50,060 --> 00:54:51,940 I'm sure if some people have a question, 1032 00:54:52,360 --> 00:54:54,720 I mean, we can use this area for Q&A. 1033 00:54:55,080 --> 00:54:55,640 Yeah, absolutely. 1034 00:54:55,780 --> 00:54:57,080 And I work for Fidelis, 1035 00:54:57,080 --> 00:54:58,620 so, I mean, since we're the sponsor, 1036 00:54:59,420 --> 00:55:03,020 I'll probably be over there looking for creds, too. 1037 00:55:03,140 --> 00:55:04,640 So, I'll definitely stick around and hang around. 1038 00:55:04,900 --> 00:55:08,980 Yeah, Jay will be here certainly in the area. 1039 00:55:09,060 --> 00:55:10,300 So, you know, what do you think? 1040 00:55:10,340 --> 00:55:10,720 In the back? 1041 00:55:10,760 --> 00:55:11,460 Is that, I think in the, 1042 00:55:11,460 --> 00:55:12,400 the wall of sheep here. 1043 00:55:12,540 --> 00:55:13,540 Right in the center in the wall of sheep here. 1044 00:55:13,660 --> 00:55:14,260 Yeah, so. 1045 00:55:14,460 --> 00:55:15,600 I'll make myself available right here. 1046 00:55:15,800 --> 00:55:16,200 Cool. 1047 00:55:17,580 --> 00:55:19,500 So, again, thank you so much, Jay. 1048 00:55:19,680 --> 00:55:20,020 Absolutely. 1049 00:55:20,120 --> 00:55:21,440 And the next talk, 1050 00:55:22,460 --> 00:55:26,560 we have a very, very good talk coming up next, 1051 00:55:26,760 --> 00:55:28,280 which is Larry Cashtaller. 1052 00:55:29,740 --> 00:55:31,100 Larry from Akamai. 1053 00:55:31,120 --> 00:55:33,040 He'll be talking about cross-site scripting 1054 00:55:33,040 --> 00:55:36,860 or how he found them in WordPress plug-ins. 1055 00:55:37,040 --> 00:55:39,380 So, Larry, you're on the stage. 1056 00:55:39,460 --> 00:55:40,380 You're on the dock, man. 1057 00:55:40,380 --> 00:55:41,820 Yeah, yeah, yeah. 1058 00:55:42,220 --> 00:55:43,040 You're on the clock. 1059 00:55:43,420 --> 00:55:43,700 All right. 1060 00:55:44,160 --> 00:55:45,600 Are we starting now or starting? 1061 00:56:06,920 --> 00:56:08,300 One thing, quick, guys, 1062 00:56:08,300 --> 00:56:10,500 a real, a plug to Gita, 1063 00:56:11,560 --> 00:56:12,680 my, one of my teammates, 1064 00:56:12,880 --> 00:56:14,280 and she's giving a talk later on today 1065 00:56:14,280 --> 00:56:17,280 about mining VirusTotal and whatnot. 1066 00:56:17,420 --> 00:56:18,140 So, maybe that kind of. 1067 00:56:18,240 --> 00:56:18,620 She is. 1068 00:56:18,620 --> 00:56:19,120 Yeah, yeah. 1069 00:56:19,240 --> 00:56:20,600 She is your colleague. 1070 00:56:20,820 --> 00:56:21,500 I didn't know that. 1071 00:56:21,660 --> 00:56:21,920 Yes, yes. 1072 00:56:21,920 --> 00:56:23,020 We work together on the same team. 1073 00:56:23,080 --> 00:56:23,220 Yep. 1074 00:56:23,300 --> 00:56:24,060 Oh, that's awesome. 1075 00:56:24,140 --> 00:56:25,060 So, Gita's coming at what? 1076 00:56:25,100 --> 00:56:26,780 Five o'clock, I think 510, 510? 1077 00:56:26,980 --> 00:56:27,500 Something like that. 1078 00:56:27,500 --> 00:56:29,320 On, I was mentioning the VirusTotal 1079 00:56:29,320 --> 00:56:30,740 because a lot of people use VirusTotal 1080 00:56:30,740 --> 00:56:31,940 for like submitting stuff 1081 00:56:31,940 --> 00:56:34,340 but not for information gathering. 1082 00:56:34,560 --> 00:56:37,560 So, yeah, Gita Ziabari will be speaking at, 1083 00:56:37,560 --> 00:56:38,560 at 510. 1084 00:56:40,680 --> 00:56:41,240 Yeah, definitely. 1085 00:56:41,320 --> 00:56:43,060 So, that, that could be a good supplement too. 1086 00:57:08,720 --> 00:57:08,760 Okay. 1087 00:57:26,880 --> 00:57:27,520 Thank you all for your good work. 1088 00:57:27,540 --> 00:57:27,580 Thank you. 1089 00:57:27,580 --> 00:57:37,040 Yeah, thanks. 1090 00:57:37,560 --> 00:57:37,720 you 1091 00:58:07,560 --> 00:58:07,620 you 1092 00:58:37,560 --> 00:58:37,620 you 1093 00:59:07,560 --> 00:59:07,640 you 1094 00:59:37,560 --> 00:59:37,680 you 1095 01:00:07,560 --> 01:00:07,700 you 1096 01:01:04,440 --> 01:01:07,240 all right 1097 01:01:07,240 --> 01:01:07,500 so 1098 01:01:07,500 --> 01:01:07,540 all right 1099 01:01:07,560 --> 01:01:07,620 so 1100 01:01:08,340 --> 01:01:08,740 yeah 1101 01:01:08,740 --> 01:01:09,400 so 1102 01:01:09,400 --> 01:01:10,520 we're going to get started 1103 01:01:10,520 --> 01:01:11,180 in one minute 1104 01:01:12,280 --> 01:01:12,680 before 1105 01:01:13,160 --> 01:01:14,180 Larry gives a talk 1106 01:01:14,180 --> 01:01:15,020 I just want to give 1107 01:01:16,200 --> 01:01:16,600 say 1108 01:01:17,180 --> 01:01:17,900 thank you for 1109 01:01:17,900 --> 01:01:18,980 thank you so much 1110 01:01:18,980 --> 01:01:19,900 everyone for being here 1111 01:01:19,900 --> 01:01:20,500 in the morning 1112 01:01:20,500 --> 01:01:20,880 I mean 1113 01:01:21,720 --> 01:01:22,440 yeah I mean 1114 01:01:22,440 --> 01:01:23,000 I was just saying 1115 01:01:23,000 --> 01:01:23,720 to a bunch of people 1116 01:01:23,720 --> 01:01:24,360 outside that 1117 01:01:24,360 --> 01:01:25,080 the whole idea 1118 01:01:25,080 --> 01:01:25,860 of people showing up 1119 01:01:25,860 --> 01:01:26,680 at 9, 9, 20 1120 01:01:26,680 --> 01:01:27,280 in the morning 1121 01:01:27,280 --> 01:01:28,260 like to sit down 1122 01:01:28,260 --> 01:01:28,660 for talk 1123 01:01:28,660 --> 01:01:29,220 it was just like 1124 01:01:29,220 --> 01:01:29,460 wow 1125 01:01:29,460 --> 01:01:30,080 this is just 1126 01:01:30,080 --> 01:01:30,580 absolutely 1127 01:01:31,160 --> 01:01:31,960 absolutely phenomenal 1128 01:01:31,960 --> 01:01:33,560 and thank you so much 1129 01:01:33,560 --> 01:01:34,380 for all your help 1130 01:01:34,380 --> 01:01:34,760 and support 1131 01:01:35,320 --> 01:01:36,180 not only for 1132 01:01:36,180 --> 01:01:37,220 this DEF CON 1133 01:01:37,220 --> 01:01:37,540 but for 1134 01:01:37,540 --> 01:01:38,360 but also for 1135 01:01:38,360 --> 01:01:39,920 also for the 1136 01:01:39,920 --> 01:01:40,880 last many years 1137 01:01:40,880 --> 01:01:42,180 so now 1138 01:01:42,180 --> 01:01:42,900 I would like to 1139 01:01:42,900 --> 01:01:44,500 give an introduction 1140 01:01:44,500 --> 01:01:45,300 before I give 1141 01:01:45,300 --> 01:01:46,300 before I give an introduction 1142 01:01:46,300 --> 01:01:46,720 to 1143 01:01:46,720 --> 01:01:48,460 to our next speaker 1144 01:01:48,460 --> 01:01:49,420 I want to give a 1145 01:01:49,420 --> 01:01:50,980 want to give a shout out 1146 01:01:50,980 --> 01:01:51,960 wherever he is 1147 01:01:52,640 --> 01:01:53,200 I 1148 01:01:53,200 --> 01:01:55,440 want to give a shout out 1149 01:01:55,440 --> 01:01:56,000 to Attrition 1150 01:01:56,000 --> 01:01:57,120 to 1151 01:01:57,120 --> 01:01:58,160 to Brian Martin 1152 01:01:58,160 --> 01:01:59,320 wherever he is 1153 01:02:00,100 --> 01:02:01,280 certainly has done a lot 1154 01:02:01,280 --> 01:02:01,500 for 1155 01:02:01,500 --> 01:02:02,240 for 1156 01:02:02,240 --> 01:02:03,400 certainly for DEF CON 1157 01:02:03,400 --> 01:02:04,740 but also for 1158 01:02:04,740 --> 01:02:05,740 our next speaker 1159 01:02:05,740 --> 01:02:06,760 that we have on stage 1160 01:02:06,760 --> 01:02:07,520 and 1161 01:02:08,380 --> 01:02:09,400 was this 1162 01:02:09,400 --> 01:02:10,200 was this recorded 1163 01:02:10,200 --> 01:02:10,880 by the way 1164 01:02:10,880 --> 01:02:12,360 was this recorded 1165 01:02:12,360 --> 01:02:13,180 that last bit 1166 01:02:13,180 --> 01:02:13,920 alright so 1167 01:02:13,920 --> 01:02:14,640 yeah hopefully 1168 01:02:14,640 --> 01:02:15,600 he heard 1169 01:02:15,600 --> 01:02:16,700 yeah we'll give him 1170 01:02:16,700 --> 01:02:17,360 a shout out later 1171 01:02:17,360 --> 01:02:18,140 on social media 1172 01:02:18,140 --> 01:02:20,320 but I want to look 1173 01:02:20,320 --> 01:02:21,180 it's my pleasure 1174 01:02:21,180 --> 01:02:21,960 to introduce you 1175 01:02:21,960 --> 01:02:22,960 our next speaker 1176 01:02:22,960 --> 01:02:24,380 our next speaker 1177 01:02:24,380 --> 01:02:26,060 is Larry Cashdaller 1178 01:02:26,060 --> 01:02:27,260 and just a note 1179 01:02:27,260 --> 01:02:28,520 that is legitimately 1180 01:02:28,520 --> 01:02:30,060 his real last name 1181 01:02:30,060 --> 01:02:30,920 Cashdaller 1182 01:02:30,920 --> 01:02:32,280 and you're based 1183 01:02:32,280 --> 01:02:33,080 out of Akamai 1184 01:02:33,080 --> 01:02:33,560 and 1185 01:02:33,560 --> 01:02:35,520 good friend 1186 01:02:35,520 --> 01:02:36,420 of everyone 1187 01:02:36,420 --> 01:02:37,500 to see you 1188 01:02:37,520 --> 01:02:37,780 in the state information 1189 01:02:37,780 --> 01:02:38,660 security community 1190 01:02:38,660 --> 01:02:39,680 for a very long time 1191 01:02:39,680 --> 01:02:40,720 without much ado 1192 01:02:40,720 --> 01:02:41,100 everyone 1193 01:02:41,100 --> 01:02:42,100 ladies and gentlemen 1194 01:02:42,100 --> 01:02:43,120 Larry Cashdaller 1195 01:02:44,220 --> 01:02:44,660 hi 1196 01:02:46,900 --> 01:02:48,360 you guys having a good DEF CON 1197 01:02:49,560 --> 01:02:50,440 yeah good 1198 01:02:50,980 --> 01:02:51,820 I'll try and 1199 01:02:52,240 --> 01:02:52,740 you know 1200 01:02:52,740 --> 01:02:52,980 I know 1201 01:02:52,980 --> 01:02:53,420 you know 1202 01:02:53,420 --> 01:02:53,820 last night 1203 01:02:53,820 --> 01:02:54,680 was like a party night 1204 01:02:54,680 --> 01:02:55,360 so I'll try and 1205 01:02:55,360 --> 01:02:57,020 put some comedy into this 1206 01:02:57,020 --> 01:02:57,340 and 1207 01:02:57,340 --> 01:02:58,760 keep you guys awake 1208 01:03:00,260 --> 01:03:01,500 and I'll be awake 1209 01:03:01,500 --> 01:03:01,720 because 1210 01:03:01,720 --> 01:03:02,240 I'm 1211 01:03:02,240 --> 01:03:03,780 got a spotlight in my eyes 1212 01:03:03,780 --> 01:03:04,200 but 1213 01:03:04,200 --> 01:03:06,860 I think Ming's trying to interrogate me up here 1214 01:03:06,860 --> 01:03:07,420 he's like you know 1215 01:03:07,420 --> 01:03:08,040 where were you on 1216 01:03:08,040 --> 01:03:09,220 the night of August 5th 1217 01:03:09,740 --> 01:03:09,980 uh 1218 01:03:09,980 --> 01:03:11,160 but um 1219 01:03:11,660 --> 01:03:12,120 so anyway 1220 01:03:12,120 --> 01:03:12,860 um 1221 01:03:12,860 --> 01:03:13,380 so 1222 01:03:13,380 --> 01:03:14,400 a little bit about me 1223 01:03:14,400 --> 01:03:15,220 um 1224 01:03:16,080 --> 01:03:17,660 I've been doing security research 1225 01:03:17,660 --> 01:03:18,240 for 1226 01:03:18,700 --> 01:03:18,940 oh 1227 01:03:18,940 --> 01:03:19,520 maybe since 1228 01:03:19,520 --> 01:03:20,200 1997 1229 01:03:21,580 --> 01:03:22,060 um 1230 01:03:22,880 --> 01:03:23,980 I've got over 100 1231 01:03:23,980 --> 01:03:24,360 uh 1232 01:03:24,360 --> 01:03:25,500 CVEs to my name 1233 01:03:25,500 --> 01:03:26,020 I 1234 01:03:26,020 --> 01:03:27,380 don't really count them anymore 1235 01:03:27,380 --> 01:03:27,800 because 1236 01:03:27,800 --> 01:03:28,140 they're 1237 01:03:28,140 --> 01:03:30,280 the first couple were like children 1238 01:03:30,280 --> 01:03:31,460 these are just sort of like 1239 01:03:31,460 --> 01:03:31,880 uh 1240 01:03:32,380 --> 01:03:33,060 I don't know 1241 01:03:33,060 --> 01:03:34,460 abandoned children I guess 1242 01:03:34,460 --> 01:03:34,960 um 1243 01:03:34,960 --> 01:03:36,960 I was a Unix administrator for 1244 01:03:37,680 --> 01:03:38,580 16 years 1245 01:03:38,580 --> 01:03:39,400 um 1246 01:03:39,400 --> 01:03:40,860 I used to do penetration testing 1247 01:03:40,860 --> 01:03:41,720 in the 90s 1248 01:03:41,720 --> 01:03:42,260 uh 1249 01:03:42,260 --> 01:03:43,300 that was back before 1250 01:03:43,300 --> 01:03:44,640 uh machines were 1251 01:03:44,640 --> 01:03:46,560 really connected to the internet 1252 01:03:46,560 --> 01:03:47,460 a lot of them were 1253 01:03:47,460 --> 01:03:48,240 you didn't have 1254 01:03:48,240 --> 01:03:49,460 you didn't have websites 1255 01:03:49,460 --> 01:03:50,440 that were dynamic 1256 01:03:50,440 --> 01:03:51,460 they were all static content 1257 01:03:51,460 --> 01:03:52,660 so it was mostly uh 1258 01:03:52,660 --> 01:03:53,980 penetration testing against 1259 01:03:53,980 --> 01:03:54,740 um 1260 01:03:54,740 --> 01:03:55,340 servers 1261 01:03:55,340 --> 01:03:56,380 so you were always trying to get 1262 01:03:56,380 --> 01:03:56,720 you know 1263 01:03:56,720 --> 01:03:57,660 a login on the server 1264 01:03:57,660 --> 01:03:58,300 root on the server 1265 01:03:58,300 --> 01:03:59,340 there was no SQL injection 1266 01:03:59,340 --> 01:04:00,700 there was no uh 1267 01:04:00,700 --> 01:04:02,720 PHP bugs or LFI bugs 1268 01:04:02,720 --> 01:04:03,600 or anything like that 1269 01:04:03,600 --> 01:04:04,140 um 1270 01:04:04,140 --> 01:04:06,120 I like writing code 1271 01:04:06,120 --> 01:04:07,260 I like coding in C 1272 01:04:07,260 --> 01:04:07,760 PHP 1273 01:04:07,760 --> 01:04:08,560 um 1274 01:04:08,560 --> 01:04:09,180 Perl 1275 01:04:09,180 --> 01:04:09,940 um 1276 01:04:10,400 --> 01:04:10,680 I'm 1277 01:04:10,680 --> 01:04:11,460 as Ming mentioned 1278 01:04:11,460 --> 01:04:12,340 I work for Akamai 1279 01:04:12,340 --> 01:04:13,940 I've been at Akamai for 16 years 1280 01:04:14,500 --> 01:04:14,780 um 1281 01:04:14,780 --> 01:04:15,740 I'm a member of their 1282 01:04:15,740 --> 01:04:15,920 uh 1283 01:04:15,920 --> 01:04:16,940 incident response team 1284 01:04:16,940 --> 01:04:17,840 um 1285 01:04:18,960 --> 01:04:19,520 so 1286 01:04:19,520 --> 01:04:20,480 assumptions 1287 01:04:20,480 --> 01:04:22,280 I'm gonna assume that you guys know 1288 01:04:22,280 --> 01:04:23,200 what WordPress is 1289 01:04:23,200 --> 01:04:24,040 I mean I 1290 01:04:24,540 --> 01:04:24,820 um 1291 01:04:25,580 --> 01:04:26,880 assume that everybody here is 1292 01:04:26,880 --> 01:04:28,100 pretty familiar with WordPress 1293 01:04:28,100 --> 01:04:28,480 and 1294 01:04:28,480 --> 01:04:29,960 how they've got a 1295 01:04:29,960 --> 01:04:30,140 uh 1296 01:04:30,140 --> 01:04:30,620 security 1297 01:04:30,620 --> 01:04:31,440 issue 1298 01:04:31,440 --> 01:04:32,480 pretty much every week 1299 01:04:33,600 --> 01:04:35,280 I'm assuming you guys know what 1300 01:04:35,280 --> 01:04:35,780 plugins are 1301 01:04:35,780 --> 01:04:36,820 cross-site scripting 1302 01:04:36,820 --> 01:04:37,540 um 1303 01:04:37,540 --> 01:04:39,640 I'm also assuming that 1304 01:04:39,640 --> 01:04:40,020 you know 1305 01:04:40,020 --> 01:04:41,120 you're not gonna beat me up 1306 01:04:41,120 --> 01:04:42,020 when you realize that 1307 01:04:42,020 --> 01:04:43,440 I didn't actually succeed in this 1308 01:04:43,440 --> 01:04:43,880 this is 1309 01:04:43,880 --> 01:04:44,320 this is a 1310 01:04:44,320 --> 01:04:45,580 a journey of 1311 01:04:45,580 --> 01:04:46,600 success 1312 01:04:46,600 --> 01:04:47,600 and failure 1313 01:04:48,180 --> 01:04:48,940 and uh 1314 01:04:48,940 --> 01:04:50,200 and then just um 1315 01:04:50,200 --> 01:04:51,300 realizing that 1316 01:04:51,300 --> 01:04:52,980 the methodology is there 1317 01:04:52,980 --> 01:04:53,380 but 1318 01:04:53,380 --> 01:04:54,120 you know 1319 01:04:54,120 --> 01:04:55,940 the whole thing didn't quite work out 1320 01:04:55,940 --> 01:04:56,700 the way I thought 1321 01:04:56,700 --> 01:04:57,600 um 1322 01:04:57,600 --> 01:04:58,400 so anyway 1323 01:04:59,500 --> 01:05:00,060 uh 1324 01:05:00,060 --> 01:05:01,320 why cross-site scripting 1325 01:05:01,320 --> 01:05:01,600 um 1326 01:05:02,220 --> 01:05:02,780 so 1327 01:05:02,780 --> 01:05:03,940 the story is 1328 01:05:04,580 --> 01:05:04,940 uh 1329 01:05:04,940 --> 01:05:06,640 I was looking at WordPress plugins 1330 01:05:06,640 --> 01:05:07,360 about a year ago 1331 01:05:07,360 --> 01:05:07,780 uh 1332 01:05:07,780 --> 01:05:08,380 Akamai 1333 01:05:08,760 --> 01:05:09,400 asked me 1334 01:05:09,400 --> 01:05:09,840 well 1335 01:05:09,840 --> 01:05:12,120 I told them that I was playing with WordPress plugins 1336 01:05:12,120 --> 01:05:13,220 during one of our 1337 01:05:13,220 --> 01:05:13,380 uh 1338 01:05:13,380 --> 01:05:13,980 team meetings 1339 01:05:13,980 --> 01:05:14,420 uh 1340 01:05:14,420 --> 01:05:15,140 finding uh 1341 01:05:15,140 --> 01:05:16,400 security vulnerabilities in them 1342 01:05:16,920 --> 01:05:18,560 and they thought that it would be a good idea 1343 01:05:18,560 --> 01:05:20,200 if I did that as part of my day job 1344 01:05:20,200 --> 01:05:20,460 they're like 1345 01:05:20,460 --> 01:05:20,820 why don't you 1346 01:05:20,820 --> 01:05:22,260 why don't you do this stuff during the day 1347 01:05:22,260 --> 01:05:23,380 you don't have to hide it at night 1348 01:05:23,380 --> 01:05:23,740 you know 1349 01:05:23,740 --> 01:05:25,660 you don't have to be ashamed of your research at night 1350 01:05:25,660 --> 01:05:26,540 and I said 1351 01:05:26,540 --> 01:05:27,280 well I didn't want to use 1352 01:05:27,280 --> 01:05:28,100 Akamai resources 1353 01:05:28,100 --> 01:05:29,260 to do my own stuff 1354 01:05:29,260 --> 01:05:29,600 and they're like 1355 01:05:29,600 --> 01:05:30,320 no no no 1356 01:05:30,320 --> 01:05:31,500 you do this stuff 1357 01:05:31,500 --> 01:05:32,520 we're sanctioning it 1358 01:05:32,520 --> 01:05:33,480 and we'll pay you for it 1359 01:05:33,480 --> 01:05:33,680 so 1360 01:05:33,680 --> 01:05:35,540 do this during the regular work hour 1361 01:05:35,540 --> 01:05:36,520 this is cool stuff 1362 01:05:36,520 --> 01:05:37,580 we want you to write about it 1363 01:05:37,580 --> 01:05:37,700 and 1364 01:05:37,700 --> 01:05:39,400 post it in the state of the internet report 1365 01:05:39,400 --> 01:05:40,080 and uh 1366 01:05:40,080 --> 01:05:41,040 write blogs and stuff 1367 01:05:41,040 --> 01:05:41,480 so I'm like ok 1368 01:05:42,060 --> 01:05:42,540 so 1369 01:05:42,540 --> 01:05:44,560 I was focused on finding 1370 01:05:44,560 --> 01:05:46,040 local file inclusion 1371 01:05:46,040 --> 01:05:47,280 remote file inclusion 1372 01:05:47,280 --> 01:05:47,940 um 1373 01:05:47,940 --> 01:05:48,760 SQL injection 1374 01:05:48,760 --> 01:05:51,300 I didn't care about cross-site scripting 1375 01:05:51,300 --> 01:05:51,580 because 1376 01:05:51,580 --> 01:05:52,060 I 1377 01:05:52,060 --> 01:05:53,060 I'm a shell guy 1378 01:05:53,060 --> 01:05:53,460 I like 1379 01:05:53,460 --> 01:05:54,440 I like popping shells 1380 01:05:54,440 --> 01:05:55,820 I like getting a web shell 1381 01:05:55,820 --> 01:05:56,820 or a root shell 1382 01:05:56,820 --> 01:05:58,940 or just a command shell in general 1383 01:05:58,940 --> 01:05:59,580 I didn't care about cross-site scripting 1384 01:05:59,600 --> 01:06:02,080 I don't like the social engineering part of things 1385 01:06:02,080 --> 01:06:04,020 I don't like to have to get someone to click a link 1386 01:06:04,020 --> 01:06:04,960 in order to 1387 01:06:06,060 --> 01:06:06,720 exploit them 1388 01:06:06,720 --> 01:06:08,600 I want to just exploit them without them knowing 1389 01:06:08,600 --> 01:06:09,220 or 1390 01:06:09,220 --> 01:06:10,460 I guess you don't 1391 01:06:10,960 --> 01:06:11,360 you 1392 01:06:11,360 --> 01:06:11,620 you 1393 01:06:11,620 --> 01:06:12,440 if they click a link 1394 01:06:12,440 --> 01:06:13,460 they're not going to get exploited anyway 1395 01:06:13,460 --> 01:06:13,780 but I 1396 01:06:13,780 --> 01:06:15,020 I don't want to rely on someone 1397 01:06:15,020 --> 01:06:15,880 to click something for me 1398 01:06:15,880 --> 01:06:16,600 to get something done 1399 01:06:16,600 --> 01:06:17,540 I want to do it all on my own 1400 01:06:17,540 --> 01:06:18,440 so I always want a shell 1401 01:06:19,040 --> 01:06:20,460 and I kept seeing these 1402 01:06:20,460 --> 01:06:20,740 um 1403 01:06:20,740 --> 01:06:21,620 these get requests 1404 01:06:21,620 --> 01:06:22,540 these post requests 1405 01:06:22,540 --> 01:06:23,880 blatantly echoing 1406 01:06:23,880 --> 01:06:24,380 um 1407 01:06:24,380 --> 01:06:26,440 variables back to the browser window 1408 01:06:26,900 --> 01:06:28,240 and I just would skip them 1409 01:06:28,240 --> 01:06:28,640 I'm like 1410 01:06:29,600 --> 01:06:29,800 whatever that is 1411 01:06:29,800 --> 01:06:30,780 it's just cross-site scripting 1412 01:06:30,780 --> 01:06:31,180 I don't care 1413 01:06:31,180 --> 01:06:31,760 you know 1414 01:06:31,760 --> 01:06:33,300 it's not going to get me a shell 1415 01:06:33,300 --> 01:06:34,080 who cares 1416 01:06:34,080 --> 01:06:34,840 um 1417 01:06:34,840 --> 01:06:35,360 it's not 1418 01:06:35,360 --> 01:06:36,120 SQL injection 1419 01:06:36,120 --> 01:06:37,080 it's not 1420 01:06:37,080 --> 01:06:38,640 not fun enough to document 1421 01:06:39,460 --> 01:06:40,160 and uh 1422 01:06:40,800 --> 01:06:41,620 after a while 1423 01:06:41,620 --> 01:06:42,240 I 1424 01:06:42,240 --> 01:06:43,920 I got so sick of seeing them everywhere 1425 01:06:43,920 --> 01:06:44,200 I'm like 1426 01:06:44,200 --> 01:06:44,620 that's it 1427 01:06:44,620 --> 01:06:45,000 I'm like 1428 01:06:45,000 --> 01:06:46,700 I'm going to start documenting these things 1429 01:06:46,700 --> 01:06:47,840 and uh 1430 01:06:47,840 --> 01:06:49,660 I want to see if I can 1431 01:06:50,180 --> 01:06:50,660 automate 1432 01:06:51,220 --> 01:06:52,260 documenting these vulnerabilities 1433 01:06:52,260 --> 01:06:53,340 and documenting 1434 01:06:53,340 --> 01:06:55,560 generating the proof of concepts on the fly 1435 01:06:55,560 --> 01:06:57,200 and I thought 1436 01:06:57,200 --> 01:06:59,060 I thought that these were a sure thing 1437 01:06:59,060 --> 01:06:59,580 I figured out 1438 01:06:59,600 --> 01:06:59,680 I figured 1439 01:06:59,680 --> 01:07:00,700 if you're echoing 1440 01:07:00,700 --> 01:07:01,160 you know 1441 01:07:01,160 --> 01:07:01,940 dollar sign get 1442 01:07:01,940 --> 01:07:03,120 out in PHP 1443 01:07:03,600 --> 01:07:04,380 it's going to be 1444 01:07:04,380 --> 01:07:05,660 cross-site scripting 1445 01:07:06,160 --> 01:07:06,640 um 1446 01:07:06,640 --> 01:07:07,600 we'll get to that later 1447 01:07:08,780 --> 01:07:09,480 so I 1448 01:07:09,480 --> 01:07:10,440 I thought to myself 1449 01:07:10,440 --> 01:07:11,240 I 1450 01:07:11,240 --> 01:07:12,300 I want to do this 1451 01:07:12,300 --> 01:07:12,840 automated 1452 01:07:12,840 --> 01:07:13,500 I want to 1453 01:07:13,500 --> 01:07:14,860 I just want to download all the plugins 1454 01:07:14,860 --> 01:07:15,420 I 1455 01:07:15,420 --> 01:07:16,060 I want to 1456 01:07:17,160 --> 01:07:17,640 uh 1457 01:07:17,640 --> 01:07:19,380 download every single plugin they have 1458 01:07:19,380 --> 01:07:20,380 and uh 1459 01:07:20,380 --> 01:07:21,320 I'll just 1460 01:07:21,320 --> 01:07:21,680 you know 1461 01:07:21,680 --> 01:07:23,000 bang on the 1462 01:07:23,540 --> 01:07:24,300 plugin site for 1463 01:07:24,300 --> 01:07:25,000 WordPress 1464 01:07:25,000 --> 01:07:25,680 and you know 1465 01:07:25,680 --> 01:07:26,700 just suck everything off the 1466 01:07:26,700 --> 01:07:27,200 uh 1467 01:07:27,200 --> 01:07:27,220 uh 1468 01:07:27,220 --> 01:07:28,400 repository for their 1469 01:07:28,400 --> 01:07:28,620 uh 1470 01:07:28,620 --> 01:07:29,180 plugin code 1471 01:07:29,980 --> 01:07:31,700 well after about four days 1472 01:07:31,700 --> 01:07:31,940 uh 1473 01:07:31,940 --> 01:07:33,000 WordPress got pissed off 1474 01:07:33,000 --> 01:07:33,560 uh 1475 01:07:33,560 --> 01:07:34,900 they blocked my IP address 1476 01:07:34,900 --> 01:07:35,520 um 1477 01:07:35,520 --> 01:07:36,380 for about eight months 1478 01:07:36,380 --> 01:07:37,800 I kept checking like 1479 01:07:37,800 --> 01:07:38,580 every day 1480 01:07:38,580 --> 01:07:39,400 for about a week 1481 01:07:39,400 --> 01:07:40,760 and then I checked like every week 1482 01:07:40,760 --> 01:07:42,280 for about a month 1483 01:07:42,280 --> 01:07:43,700 and then I stopped checking for months 1484 01:07:43,700 --> 01:07:44,120 and then I 1485 01:07:44,120 --> 01:07:45,500 I happened to check after 1486 01:07:46,060 --> 01:07:46,760 I think it was 1487 01:07:46,760 --> 01:07:47,520 I don't know 1488 01:07:47,520 --> 01:07:48,260 six months 1489 01:07:48,260 --> 01:07:48,860 still blocked 1490 01:07:48,860 --> 01:07:49,940 two months later 1491 01:07:49,940 --> 01:07:50,640 unblocked 1492 01:07:50,640 --> 01:07:50,900 so 1493 01:07:50,900 --> 01:07:51,880 about eight months 1494 01:07:51,880 --> 01:07:52,560 um 1495 01:07:53,540 --> 01:07:55,060 the problem with this methodology 1496 01:07:55,060 --> 01:07:55,620 that I 1497 01:07:55,620 --> 01:07:55,760 I 1498 01:07:55,760 --> 01:07:56,240 I had 1499 01:07:56,240 --> 01:07:56,780 was 1500 01:07:56,780 --> 01:07:57,400 the 1501 01:07:57,400 --> 01:07:58,040 this 1502 01:07:58,040 --> 01:07:59,520 repository had 1503 01:07:59,520 --> 01:08:00,680 all of the 1504 01:08:00,680 --> 01:08:01,380 trunks 1505 01:08:01,380 --> 01:08:01,640 the 1506 01:08:01,640 --> 01:08:02,420 the tags 1507 01:08:02,420 --> 01:08:02,900 the 1508 01:08:02,900 --> 01:08:04,580 the cruft 1509 01:08:04,580 --> 01:08:05,760 old versions 1510 01:08:05,760 --> 01:08:06,280 uh 1511 01:08:06,280 --> 01:08:07,240 versions I didn't want 1512 01:08:07,240 --> 01:08:08,020 um 1513 01:08:08,600 --> 01:08:09,160 I 1514 01:08:09,160 --> 01:08:09,460 it 1515 01:08:09,460 --> 01:08:11,760 I only wanted the latest plugin 1516 01:08:11,760 --> 01:08:12,980 I didn't want to find a vulnerability 1517 01:08:12,980 --> 01:08:13,840 in a plugin 1518 01:08:13,840 --> 01:08:15,140 that was already patched 1519 01:08:15,140 --> 01:08:16,160 because I had the older version 1520 01:08:16,160 --> 01:08:16,760 on my system 1521 01:08:16,760 --> 01:08:17,620 um 1522 01:08:17,620 --> 01:08:19,080 and I also wanted to collect the metadata 1523 01:08:19,080 --> 01:08:19,920 I wanted 1524 01:08:19,920 --> 01:08:20,780 you know 1525 01:08:20,780 --> 01:08:21,980 stuff that would be of use 1526 01:08:21,980 --> 01:08:22,540 like uh 1527 01:08:22,540 --> 01:08:23,620 number of downloads 1528 01:08:23,620 --> 01:08:24,580 or um 1529 01:08:24,580 --> 01:08:25,340 uh 1530 01:08:25,340 --> 01:08:26,780 the author of the plugin 1531 01:08:26,780 --> 01:08:27,000 so 1532 01:08:27,000 --> 01:08:27,540 you know 1533 01:08:27,540 --> 01:08:28,940 my eventual thought was to automate 1534 01:08:28,940 --> 01:08:30,060 notifying these guys 1535 01:08:30,060 --> 01:08:31,060 that I had found a cross-site 1536 01:08:31,060 --> 01:08:32,860 cross-site scripting vulnerability 1537 01:08:32,860 --> 01:08:33,300 in their 1538 01:08:33,300 --> 01:08:33,820 in their code 1539 01:08:34,560 --> 01:08:35,040 um 1540 01:08:35,720 --> 01:08:36,200 so 1541 01:08:36,600 --> 01:08:37,920 I had to go about this a different way 1542 01:08:37,920 --> 01:08:38,740 so 1543 01:08:38,740 --> 01:08:39,440 instead of 1544 01:08:39,440 --> 01:08:41,060 downloading all the plugins 1545 01:08:41,060 --> 01:08:41,760 over 1546 01:08:41,760 --> 01:08:42,120 uh 1547 01:08:42,120 --> 01:08:43,160 using my IP address 1548 01:08:43,160 --> 01:08:43,540 and 1549 01:08:43,540 --> 01:08:44,360 and slamming their 1550 01:08:44,360 --> 01:08:45,280 their repository 1551 01:08:45,960 --> 01:08:46,720 I uh 1552 01:08:46,720 --> 01:08:47,840 I used the list 1553 01:08:47,840 --> 01:08:48,640 from the repository 1554 01:08:48,640 --> 01:08:49,660 as an index 1555 01:08:50,780 --> 01:08:51,380 so I took the list 1556 01:08:51,380 --> 01:08:52,120 and uh 1557 01:08:52,120 --> 01:08:53,420 I wrote a quick 1558 01:08:53,420 --> 01:08:54,800 a quick shell script 1559 01:08:54,800 --> 01:08:55,940 to just wget everything 1560 01:08:55,940 --> 01:08:57,940 and then piped it all through proxy chain 1561 01:08:57,940 --> 01:08:59,060 so they couldn't uh 1562 01:08:59,060 --> 01:09:00,220 block my IP address anymore 1563 01:09:01,000 --> 01:09:01,440 um 1564 01:09:01,440 --> 01:09:02,700 yay Tor 1565 01:09:02,700 --> 01:09:03,480 thanks Tor 1566 01:09:03,480 --> 01:09:04,300 uh 1567 01:09:04,300 --> 01:09:04,840 it was great 1568 01:09:04,840 --> 01:09:05,800 because I didn't care if uh 1569 01:09:06,240 --> 01:09:07,700 if I had anything uh 1570 01:09:07,700 --> 01:09:08,740 sensitive going over it 1571 01:09:08,740 --> 01:09:09,500 I just wanted the data 1572 01:09:09,960 --> 01:09:10,400 um 1573 01:09:10,400 --> 01:09:12,220 so I let it run for about five days 1574 01:09:12,220 --> 01:09:12,780 um 1575 01:09:13,960 --> 01:09:14,400 my 1576 01:09:14,400 --> 01:09:15,420 wife and son 1577 01:09:15,420 --> 01:09:16,720 probably wondered why the internet 1578 01:09:16,720 --> 01:09:17,980 was kind of slow for a week 1579 01:09:17,980 --> 01:09:18,540 um 1580 01:09:18,540 --> 01:09:19,700 I told them it was me 1581 01:09:19,700 --> 01:09:20,400 um 1582 01:09:21,160 --> 01:09:21,600 they 1583 01:09:22,220 --> 01:09:23,540 probably expected it 1584 01:09:23,540 --> 01:09:24,800 mom I do that stuff all the time 1585 01:09:24,800 --> 01:09:25,660 but um 1586 01:09:25,660 --> 01:09:27,940 so once I got all of these plugins downloaded 1587 01:09:28,420 --> 01:09:29,080 I uh 1588 01:09:29,080 --> 01:09:30,200 I decided to start you know 1589 01:09:30,200 --> 01:09:31,100 cross-site script mining 1590 01:09:31,760 --> 01:09:32,200 so 1591 01:09:32,200 --> 01:09:32,680 I 1592 01:09:32,680 --> 01:09:33,720 I dug up an old Perl script 1593 01:09:33,720 --> 01:09:34,740 and uh 1594 01:09:34,740 --> 01:09:35,940 I started just looking for 1595 01:09:35,940 --> 01:09:36,320 you know 1596 01:09:36,320 --> 01:09:36,980 easy patterns 1597 01:09:36,980 --> 01:09:37,620 low hanging fruit 1598 01:09:37,620 --> 01:09:37,840 um 1599 01:09:38,540 --> 01:09:39,240 get requests 1600 01:09:39,240 --> 01:09:39,820 uh 1601 01:09:39,820 --> 01:09:40,300 posts 1602 01:09:40,300 --> 01:09:40,880 um 1603 01:09:40,880 --> 01:09:41,960 regular requests 1604 01:09:42,500 --> 01:09:43,640 and I tried to just 1605 01:09:43,640 --> 01:09:45,040 find some variations in that 1606 01:09:45,040 --> 01:09:45,400 you know 1607 01:09:45,400 --> 01:09:46,100 sometimes uh 1608 01:09:46,100 --> 01:09:48,180 plugin authors would put a space in there 1609 01:09:48,180 --> 01:09:49,680 sometimes they would use a query 1610 01:09:49,700 --> 01:09:50,580 quote or a double quote 1611 01:09:50,580 --> 01:09:52,320 sometimes they would put you know 1612 01:09:52,320 --> 01:09:52,980 two spaces 1613 01:09:52,980 --> 01:09:54,760 so I was trying to just get as many as I could 1614 01:09:54,760 --> 01:09:55,260 but I 1615 01:09:55,260 --> 01:09:56,380 I wasn't too worried about 1616 01:09:56,380 --> 01:09:57,600 leaving a few behind 1617 01:09:57,600 --> 01:09:57,840 um 1618 01:09:59,880 --> 01:10:01,320 so while I was doing this 1619 01:10:01,320 --> 01:10:02,060 the same script 1620 01:10:02,060 --> 01:10:02,660 would 1621 01:10:02,660 --> 01:10:02,980 uh 1622 01:10:02,980 --> 01:10:04,360 document the line number 1623 01:10:04,360 --> 01:10:05,300 of the 1624 01:10:05,300 --> 01:10:06,320 where the code was 1625 01:10:06,320 --> 01:10:06,760 had this 1626 01:10:06,760 --> 01:10:06,980 uh 1627 01:10:06,980 --> 01:10:07,900 vulnerability in it 1628 01:10:07,900 --> 01:10:09,840 and it would automatically generate 1629 01:10:09,840 --> 01:10:11,100 based on that 1630 01:10:11,100 --> 01:10:11,460 uh 1631 01:10:11,460 --> 01:10:11,980 variable 1632 01:10:11,980 --> 01:10:13,400 in that cross-site scripting 1633 01:10:13,400 --> 01:10:13,640 or 1634 01:10:13,640 --> 01:10:13,860 uh 1635 01:10:13,860 --> 01:10:15,080 automatically generate 1636 01:10:15,080 --> 01:10:15,540 that 1637 01:10:15,540 --> 01:10:16,020 with 1638 01:10:16,020 --> 01:10:16,780 using that variable 1639 01:10:16,780 --> 01:10:17,560 in the uh 1640 01:10:19,700 --> 01:10:19,860 request 1641 01:10:19,860 --> 01:10:20,620 header 1642 01:10:20,620 --> 01:10:21,500 or not header 1643 01:10:21,500 --> 01:10:21,800 but 1644 01:10:21,800 --> 01:10:22,420 um 1645 01:10:23,040 --> 01:10:23,640 rev 1646 01:10:23,640 --> 01:10:24,520 it would 1647 01:10:24,520 --> 01:10:24,940 yeah 1648 01:10:24,940 --> 01:10:26,960 it would use the variable 1649 01:10:26,960 --> 01:10:27,660 in that 1650 01:10:27,660 --> 01:10:28,140 um 1651 01:10:28,140 --> 01:10:29,520 echo or post 1652 01:10:29,520 --> 01:10:30,500 to automatically generate 1653 01:10:30,500 --> 01:10:31,300 the proof of concept 1654 01:10:31,300 --> 01:10:32,300 that I was gonna try 1655 01:10:32,300 --> 01:10:33,180 um 1656 01:10:33,180 --> 01:10:33,860 and it would 1657 01:10:33,860 --> 01:10:35,020 it would document the 1658 01:10:35,020 --> 01:10:35,620 the title 1659 01:10:35,620 --> 01:10:36,600 which was just a 1660 01:10:36,600 --> 01:10:37,460 a generic title 1661 01:10:37,460 --> 01:10:38,180 of uh 1662 01:10:38,180 --> 01:10:39,120 you know 1663 01:10:39,120 --> 01:10:40,240 cross-site scripting vulnerability 1664 01:10:40,240 --> 01:10:41,620 in plugin xyz 1665 01:10:41,620 --> 01:10:42,860 and uh 1666 01:10:42,860 --> 01:10:43,940 it would also collect 1667 01:10:43,940 --> 01:10:44,840 the vulnerable variables 1668 01:10:44,840 --> 01:10:45,400 because there were 1669 01:10:45,400 --> 01:10:46,380 more than one 1670 01:10:49,700 --> 01:10:49,880 three 1671 01:10:49,880 --> 01:10:50,120 four 1672 01:10:50,120 --> 01:10:50,860 instances of 1673 01:10:50,860 --> 01:10:51,760 cross-site scripting 1674 01:10:51,760 --> 01:10:53,080 so I tried to collect them all 1675 01:10:53,080 --> 01:10:53,780 as best I could 1676 01:10:53,780 --> 01:10:55,560 and then generate a proof of concept 1677 01:10:55,560 --> 01:10:56,320 with just one of them 1678 01:10:56,320 --> 01:10:57,120 um 1679 01:10:58,740 --> 01:10:59,180 so 1680 01:10:59,180 --> 01:10:59,740 to auto 1681 01:10:59,740 --> 01:11:00,820 automatically generate 1682 01:11:00,820 --> 01:11:01,120 uh 1683 01:11:01,120 --> 01:11:02,240 the cross-site scripting 1684 01:11:02,240 --> 01:11:02,980 proof of concept 1685 01:11:02,980 --> 01:11:04,320 I initially just started with 1686 01:11:04,320 --> 01:11:04,780 the get 1687 01:11:04,780 --> 01:11:05,540 and uh 1688 01:11:05,540 --> 01:11:06,280 request only 1689 01:11:06,820 --> 01:11:07,260 um 1690 01:11:07,260 --> 01:11:08,680 I didn't wanna try 1691 01:11:08,680 --> 01:11:09,240 you know 1692 01:11:09,240 --> 01:11:10,340 doing posts 1693 01:11:10,340 --> 01:11:11,020 cause those would be 1694 01:11:11,020 --> 01:11:12,460 harder to exploit automatically 1695 01:11:13,020 --> 01:11:13,460 um 1696 01:11:13,460 --> 01:11:15,300 so I figured I would just try and 1697 01:11:15,300 --> 01:11:15,740 you know 1698 01:11:15,740 --> 01:11:16,400 push an alert 1699 01:11:16,400 --> 01:11:16,720 uh 1700 01:11:16,720 --> 01:11:17,540 pop-up box 1701 01:11:17,540 --> 01:11:18,100 with just a 1702 01:11:18,100 --> 01:11:19,000 a general script 1703 01:11:19,000 --> 01:11:19,740 uh 1704 01:11:19,740 --> 01:11:21,060 tag an alert 1705 01:11:21,060 --> 01:11:21,520 um 1706 01:11:21,520 --> 01:11:21,960 code 1707 01:11:21,960 --> 01:11:22,760 and then um 1708 01:11:23,600 --> 01:11:24,600 I had you know 1709 01:11:24,600 --> 01:11:25,440 the script built 1710 01:11:25,440 --> 01:11:26,660 and then I needed to know 1711 01:11:26,660 --> 01:11:27,820 where I could store all of this 1712 01:11:28,300 --> 01:11:28,740 um 1713 01:11:28,740 --> 01:11:29,820 I had 1714 01:11:29,820 --> 01:11:31,020 figured I'd just 1715 01:11:31,020 --> 01:11:31,440 you know 1716 01:11:32,080 --> 01:11:33,980 at first I had created a flat text file 1717 01:11:33,980 --> 01:11:34,980 and that just wasn't gonna work 1718 01:11:34,980 --> 01:11:35,720 um 1719 01:11:35,720 --> 01:11:36,700 I had you know 1720 01:11:36,700 --> 01:11:37,480 nine hundred vulnerabilities 1721 01:11:37,480 --> 01:11:39,620 with nine hundred untested proof of concepts 1722 01:11:39,620 --> 01:11:40,720 that I had generated on the fly 1723 01:11:41,260 --> 01:11:43,160 and I needed some way to sort these things 1724 01:11:43,160 --> 01:11:43,840 and go through them 1725 01:11:44,300 --> 01:11:44,740 so 1726 01:11:44,740 --> 01:11:46,600 I decided to build a MySQL database 1727 01:11:47,100 --> 01:11:47,580 um 1728 01:11:47,580 --> 01:11:50,960 I figured I'd just use MySQL 1729 01:11:50,960 --> 01:11:51,640 um 1730 01:11:51,640 --> 01:11:54,580 I had to determine what columns to use 1731 01:11:54,580 --> 01:11:56,340 I figured I'd just go real basic 1732 01:11:56,340 --> 01:11:57,200 um 1733 01:11:57,200 --> 01:11:58,560 I'd store the uh 1734 01:11:58,560 --> 01:11:59,120 the title 1735 01:11:59,120 --> 01:11:59,580 uh 1736 01:11:59,580 --> 01:12:00,300 the plug-in name 1737 01:12:00,300 --> 01:12:01,140 file 1738 01:12:01,580 --> 01:12:02,060 vulnerable code 1739 01:12:02,060 --> 01:12:02,900 proof of concept date 1740 01:12:02,900 --> 01:12:03,620 just the basics 1741 01:12:04,380 --> 01:12:04,860 um 1742 01:12:04,860 --> 01:12:06,680 I figured if I had the basics 1743 01:12:06,680 --> 01:12:08,160 I could collect more metadata later 1744 01:12:08,160 --> 01:12:09,600 populate more fields 1745 01:12:09,600 --> 01:12:10,240 based on 1746 01:12:10,240 --> 01:12:12,200 what information I had in the database 1747 01:12:12,200 --> 01:12:13,580 and just re-run scripts 1748 01:12:13,580 --> 01:12:14,720 and just stuff things into the database 1749 01:12:14,740 --> 01:12:15,520 as I needed 1750 01:12:15,520 --> 01:12:16,540 um 1751 01:12:17,380 --> 01:12:18,680 at this point 1752 01:12:18,680 --> 01:12:19,140 uh 1753 01:12:19,140 --> 01:12:19,900 I thought to myself 1754 01:12:19,900 --> 01:12:20,340 you know 1755 01:12:20,340 --> 01:12:22,040 I probably should start telling people 1756 01:12:22,040 --> 01:12:22,740 about what I'm doing 1757 01:12:22,740 --> 01:12:23,080 because 1758 01:12:23,740 --> 01:12:25,560 if this actually turns out to be legit 1759 01:12:25,560 --> 01:12:27,360 I can't just drop 1760 01:12:27,360 --> 01:12:29,040 a thirteen hundred and fifty-two vulnerabilities 1761 01:12:29,040 --> 01:12:30,600 on the folks at WordPress 1762 01:12:30,600 --> 01:12:32,380 they're probably gonna either 1763 01:12:32,380 --> 01:12:33,280 send 1764 01:12:33,280 --> 01:12:35,460 an assassin squad after me 1765 01:12:36,100 --> 01:12:36,620 or 1766 01:12:36,620 --> 01:12:36,960 uh 1767 01:12:36,960 --> 01:12:38,140 they're just gonna either 1768 01:12:38,140 --> 01:12:38,880 ignore me 1769 01:12:38,880 --> 01:12:39,440 or 1770 01:12:39,440 --> 01:12:40,640 I'm gonna get some hate mail 1771 01:12:40,640 --> 01:12:41,020 or 1772 01:12:41,020 --> 01:12:41,620 you know 1773 01:12:42,180 --> 01:12:42,700 um 1774 01:12:42,700 --> 01:12:44,100 a pipe bomb in the mail 1775 01:12:44,100 --> 01:12:44,440 or something 1776 01:12:44,440 --> 01:12:44,720 I don't know 1777 01:12:44,720 --> 01:12:44,820 um 1778 01:12:46,160 --> 01:12:46,600 so 1779 01:12:46,600 --> 01:12:47,800 I ended up running the scripts 1780 01:12:47,800 --> 01:12:48,860 with a post request also 1781 01:12:48,860 --> 01:12:50,440 figured I'd just generate everything I could 1782 01:12:50,940 --> 01:12:51,380 and 1783 01:12:51,380 --> 01:12:51,780 um 1784 01:12:51,780 --> 01:12:53,840 I realized I was over my head 1785 01:12:53,840 --> 01:12:54,580 uh 1786 01:12:54,580 --> 01:12:55,060 I'm like 1787 01:12:55,060 --> 01:12:55,440 I have 1788 01:12:55,440 --> 01:12:56,320 all of these vulnerabilities 1789 01:12:57,100 --> 01:12:57,540 there 1790 01:12:59,060 --> 01:12:59,500 there's 1791 01:12:59,500 --> 01:13:01,080 over a thousand of them 1792 01:13:01,080 --> 01:13:02,660 I need to start telling people 1793 01:13:03,380 --> 01:13:03,820 who 1794 01:13:03,820 --> 01:13:04,560 uh 1795 01:13:04,560 --> 01:13:06,280 normally deal with this sort of thing 1796 01:13:06,280 --> 01:13:06,480 you know 1797 01:13:06,480 --> 01:13:07,780 what kind of vulnerability researchers 1798 01:13:08,380 --> 01:13:08,820 or 1799 01:13:08,820 --> 01:13:09,440 what kind of 1800 01:13:09,440 --> 01:13:09,740 um 1801 01:13:10,300 --> 01:13:11,360 people could I contact 1802 01:13:11,360 --> 01:13:12,120 and I thought of 1803 01:13:12,120 --> 01:13:12,440 you know 1804 01:13:12,440 --> 01:13:13,100 uh 1805 01:13:14,720 --> 01:13:14,820 because 1806 01:13:14,820 --> 01:13:15,260 he's been 1807 01:13:15,260 --> 01:13:16,340 indexing vulnerabilities 1808 01:13:16,340 --> 01:13:16,840 for 1809 01:13:16,840 --> 01:13:17,860 I don't know 1810 01:13:17,860 --> 01:13:18,760 20 years or so 1811 01:13:18,760 --> 01:13:19,540 um 1812 01:13:19,540 --> 01:13:21,280 I figured I would talk to MITRE 1813 01:13:21,280 --> 01:13:22,180 just in case 1814 01:13:22,180 --> 01:13:22,960 the CVE guys 1815 01:13:22,960 --> 01:13:23,520 because 1816 01:13:23,520 --> 01:13:24,520 I know 1817 01:13:24,520 --> 01:13:25,200 I thought that 1818 01:13:25,200 --> 01:13:26,380 I should let them know that 1819 01:13:26,380 --> 01:13:27,540 I might be 1820 01:13:27,540 --> 01:13:28,540 asking for 1821 01:13:28,540 --> 01:13:29,340 1300 1822 01:13:29,340 --> 01:13:30,200 uh 1823 01:13:30,200 --> 01:13:31,020 CVE numbers 1824 01:13:31,580 --> 01:13:32,100 which 1825 01:13:32,100 --> 01:13:33,440 I figured they'd just ignore me 1826 01:13:33,440 --> 01:13:33,900 uh 1827 01:13:33,900 --> 01:13:34,500 which they did 1828 01:13:34,500 --> 01:13:35,340 um 1829 01:13:35,340 --> 01:13:36,000 or they 1830 01:13:36,000 --> 01:13:38,020 oh alright 1831 01:13:38,820 --> 01:13:39,340 alright 1832 01:13:39,340 --> 01:13:39,740 yeah 1833 01:13:39,740 --> 01:13:40,700 I'll catch up with you guys 1834 01:13:40,700 --> 01:13:42,500 so if I'm not here tomorrow 1835 01:13:42,500 --> 01:13:44,020 look in that guy's trunk 1836 01:13:45,200 --> 01:13:45,680 um 1837 01:13:46,220 --> 01:13:47,440 a few trunks 1838 01:13:47,440 --> 01:13:48,800 oh geez 1839 01:13:50,300 --> 01:13:51,260 multiple trunks 1840 01:13:51,260 --> 01:13:51,960 um 1841 01:13:51,960 --> 01:13:53,840 so I talked to Scott Moore 1842 01:13:53,840 --> 01:13:54,320 you know 1843 01:13:54,320 --> 01:13:55,120 at IBM X-Force 1844 01:13:55,120 --> 01:13:56,120 because he's been an old friend 1845 01:13:56,120 --> 01:13:56,840 and uh 1846 01:13:56,840 --> 01:13:57,820 he's been indexing 1847 01:13:57,820 --> 01:13:58,360 uh 1848 01:13:58,360 --> 01:13:59,200 my vulnerabilities 1849 01:13:59,200 --> 01:14:00,260 for a long time also 1850 01:14:00,260 --> 01:14:00,840 so I 1851 01:14:00,840 --> 01:14:01,600 uh 1852 01:14:01,600 --> 01:14:03,140 I talked to Ryan Dewhurst 1853 01:14:03,140 --> 01:14:03,400 uh 1854 01:14:03,400 --> 01:14:05,400 for WordPress Vulnerability Database 1855 01:14:05,400 --> 01:14:06,200 and I said look guys 1856 01:14:06,200 --> 01:14:07,220 can you hold my hand 1857 01:14:07,220 --> 01:14:08,860 I'm kinda lost here 1858 01:14:08,860 --> 01:14:09,020 I 1859 01:14:09,020 --> 01:14:10,080 I found all this stuff 1860 01:14:10,080 --> 01:14:11,120 I don't know how to handle it 1861 01:14:11,120 --> 01:14:11,700 I need help 1862 01:14:11,700 --> 01:14:12,520 um 1863 01:14:12,520 --> 01:14:12,820 I 1864 01:14:12,820 --> 01:14:13,260 you know 1865 01:14:13,260 --> 01:14:14,560 told Akamai 1866 01:14:14,560 --> 01:14:16,300 I talked to Solar Designer about 1867 01:14:16,300 --> 01:14:16,680 you know 1868 01:14:16,680 --> 01:14:17,960 on the OSS security list 1869 01:14:18,580 --> 01:14:19,440 I'm like uh 1870 01:14:19,440 --> 01:14:20,800 I might have to put 1871 01:14:20,800 --> 01:14:21,080 you know 1872 01:14:21,080 --> 01:14:22,040 1300 vulnerabilities 1873 01:14:22,040 --> 01:14:23,880 on the open source security list 1874 01:14:23,880 --> 01:14:25,700 how do you want me to format that 1875 01:14:25,700 --> 01:14:27,720 I can't send 1300 of these things 1876 01:14:28,160 --> 01:14:28,740 you know 1877 01:14:28,740 --> 01:14:29,920 one email at a time 1878 01:14:29,920 --> 01:14:30,580 uh 1879 01:14:30,580 --> 01:14:31,340 that would be 1880 01:14:31,800 --> 01:14:33,060 I'd be a prick if I did that 1881 01:14:33,060 --> 01:14:33,500 so 1882 01:14:33,500 --> 01:14:33,980 uh 1883 01:14:33,980 --> 01:14:35,440 we worked out this whole 1884 01:14:35,440 --> 01:14:36,680 system for 1885 01:14:36,680 --> 01:14:37,120 you know 1886 01:14:37,120 --> 01:14:39,140 putting one line per plugin 1887 01:14:39,140 --> 01:14:41,040 per proof of concept exploit 1888 01:14:41,040 --> 01:14:42,240 and we would split it up 1889 01:14:42,240 --> 01:14:42,880 in four emails 1890 01:14:42,880 --> 01:14:44,180 I had written a bunch of Perl scripts 1891 01:14:44,180 --> 01:14:44,900 to get this done 1892 01:14:44,900 --> 01:14:45,800 was testing the mail 1893 01:14:46,440 --> 01:14:46,960 anyway 1894 01:14:46,960 --> 01:14:47,460 um 1895 01:14:48,120 --> 01:14:48,640 so 1896 01:14:49,660 --> 01:14:50,820 I thought I had 1897 01:14:50,820 --> 01:14:51,040 you know 1898 01:14:51,040 --> 01:14:52,340 these 1352 vulnerabilities 1899 01:14:52,340 --> 01:14:54,480 I started to export them 1900 01:14:54,480 --> 01:14:55,220 to various databases 1901 01:14:55,220 --> 01:14:55,920 you know 1902 01:14:55,920 --> 01:14:56,500 uh 1903 01:14:57,080 --> 01:14:58,480 I got a Skype call 1904 01:14:58,480 --> 01:14:59,460 from a group of researchers 1905 01:14:59,460 --> 01:15:00,120 in Germany 1906 01:15:00,120 --> 01:15:01,040 they're like 1907 01:15:01,040 --> 01:15:02,320 we've been looking for someone 1908 01:15:02,320 --> 01:15:03,920 to find zero days in plugins 1909 01:15:03,920 --> 01:15:05,260 because we wanna track 1910 01:15:05,260 --> 01:15:06,500 how long it takes 1911 01:15:06,500 --> 01:15:08,200 for a plugin to be discovered 1912 01:15:08,200 --> 01:15:09,720 to how long it's being abused 1913 01:15:09,720 --> 01:15:10,380 uh 1914 01:15:10,380 --> 01:15:11,200 in the wild 1915 01:15:11,200 --> 01:15:12,200 so this is great 1916 01:15:12,200 --> 01:15:13,340 you have all of these zero days 1917 01:15:13,340 --> 01:15:14,340 you haven't shared them with anybody 1918 01:15:14,340 --> 01:15:15,180 except you know 1919 01:15:15,180 --> 01:15:16,300 a handful of people 1920 01:15:16,760 --> 01:15:17,160 um 1921 01:15:17,160 --> 01:15:17,860 you know 1922 01:15:17,860 --> 01:15:19,400 we wanna tie you into our research 1923 01:15:19,400 --> 01:15:20,320 and you know 1924 01:15:20,320 --> 01:15:21,520 would you send us the database 1925 01:15:21,520 --> 01:15:22,320 I'm like sure 1926 01:15:22,320 --> 01:15:22,740 you know 1927 01:15:22,740 --> 01:15:23,420 I sent them the database 1928 01:15:23,420 --> 01:15:25,120 I sent them the PHP code 1929 01:15:25,120 --> 01:15:25,900 um 1930 01:15:25,900 --> 01:15:26,640 I was 1931 01:15:26,640 --> 01:15:27,800 I was um 1932 01:15:27,800 --> 01:15:28,700 creating uh 1933 01:15:28,700 --> 01:15:30,740 custom CSV files for people 1934 01:15:30,740 --> 01:15:31,480 you know 1935 01:15:31,480 --> 01:15:31,840 I was like 1936 01:15:31,840 --> 01:15:33,320 like a kid in a candy store 1937 01:15:33,320 --> 01:15:33,500 I'm like 1938 01:15:33,500 --> 01:15:34,480 oh you want some free candy 1939 01:15:34,480 --> 01:15:35,000 here you go 1940 01:15:36,500 --> 01:15:37,260 let me know what you think 1941 01:15:37,260 --> 01:15:37,520 it's 1942 01:15:37,520 --> 01:15:38,520 it's not gonna go um 1943 01:15:38,520 --> 01:15:40,060 public for another month or two 1944 01:15:40,780 --> 01:15:41,220 um 1945 01:15:41,940 --> 01:15:43,300 I sat with Jericho 1946 01:15:43,300 --> 01:15:44,080 well I didn't sit with him 1947 01:15:44,080 --> 01:15:44,400 but we 1948 01:15:44,400 --> 01:15:45,580 we talked over um 1949 01:15:45,580 --> 01:15:46,640 email for 1950 01:15:46,640 --> 01:15:47,560 a couple of days 1951 01:15:48,020 --> 01:15:48,640 massaging the 1952 01:15:48,640 --> 01:15:49,180 the database 1953 01:15:49,180 --> 01:15:49,820 we were 1954 01:15:49,820 --> 01:15:51,160 fixing mangled entries 1955 01:15:51,160 --> 01:15:51,760 um 1956 01:15:51,760 --> 01:15:53,100 he was giving me suggestions 1957 01:15:53,100 --> 01:15:54,160 on what data to store 1958 01:15:54,160 --> 01:15:54,500 because 1959 01:15:54,500 --> 01:15:55,900 I pretty much built 1960 01:15:55,900 --> 01:15:56,840 a vulnerability database 1961 01:15:56,840 --> 01:15:58,260 out of all of these 1962 01:15:58,260 --> 01:15:58,640 um 1963 01:15:58,640 --> 01:15:59,860 cross-site scripting things 1964 01:15:59,860 --> 01:16:00,520 and 1965 01:16:00,520 --> 01:16:01,380 he was the man 1966 01:16:01,380 --> 01:16:02,720 who knew how to index this stuff 1967 01:16:03,380 --> 01:16:03,820 um 1968 01:16:03,820 --> 01:16:04,800 and hence 1969 01:16:04,800 --> 01:16:06,100 they wanted more columns 1970 01:16:06,100 --> 01:16:07,220 so I was adding more columns 1971 01:16:07,220 --> 01:16:07,660 to the database 1972 01:16:07,660 --> 01:16:08,520 um 1973 01:16:08,520 --> 01:16:09,880 I was adding 1974 01:16:09,880 --> 01:16:10,280 uh 1975 01:16:10,820 --> 01:16:11,460 I wanted to 1976 01:16:11,460 --> 01:16:11,860 you know 1977 01:16:11,860 --> 01:16:13,420 add a spot for CVE IDs 1978 01:16:13,420 --> 01:16:14,280 um 1979 01:16:15,280 --> 01:16:17,180 I figured I would self-assign 1980 01:16:17,180 --> 01:16:17,540 uh 1981 01:16:17,540 --> 01:16:18,160 CVE IDs 1982 01:16:18,160 --> 01:16:18,740 for MITRE 1983 01:16:18,740 --> 01:16:19,080 uh 1984 01:16:19,080 --> 01:16:19,900 just so I had a 1985 01:16:19,900 --> 01:16:20,580 a number 1986 01:16:20,580 --> 01:16:21,780 that I could associate them with 1987 01:16:21,780 --> 01:16:22,600 and you know 1988 01:16:22,600 --> 01:16:24,320 not try and get those guys 1989 01:16:24,320 --> 01:16:25,140 to do that stuff 1990 01:16:25,820 --> 01:16:26,080 um 1991 01:16:26,620 --> 01:16:27,820 people also wanted 1992 01:16:27,820 --> 01:16:28,060 you know 1993 01:16:28,060 --> 01:16:28,640 what kind of 1994 01:16:28,640 --> 01:16:29,860 what type is this 1995 01:16:29,860 --> 01:16:30,800 is this a GET request 1996 01:16:30,800 --> 01:16:32,000 is this a POST request 1997 01:16:32,670 --> 01:16:32,920 um 1998 01:16:33,820 --> 01:16:34,200 I used non-C 1999 01:16:34,200 --> 01:16:34,760 um 2000 01:16:34,760 --> 01:16:36,280 I also created 2001 01:16:36,280 --> 01:16:37,600 an auto-verify field 2002 01:16:37,600 --> 01:16:39,160 because I was intending on 2003 01:16:39,700 --> 01:16:40,320 trying to figure out 2004 01:16:40,320 --> 01:16:40,760 if I can 2005 01:16:40,760 --> 01:16:41,040 you know 2006 01:16:41,040 --> 01:16:42,140 verify these things 2007 01:16:42,140 --> 01:16:42,640 automatically 2008 01:16:42,640 --> 01:16:43,860 and then know that 2009 01:16:43,860 --> 01:16:44,400 for sure 2010 01:16:44,400 --> 01:16:44,760 they're legit 2011 01:16:44,760 --> 01:16:45,800 cross-site scripting vulnerability 2012 01:16:46,480 --> 01:16:46,920 um 2013 01:16:47,460 --> 01:16:48,220 and you know 2014 01:16:48,220 --> 01:16:49,320 I wanted a contact date 2015 01:16:49,320 --> 01:16:49,880 because I was gonna 2016 01:16:49,880 --> 01:16:51,360 I was gonna try and do this responsibly 2017 01:16:51,360 --> 01:16:52,580 I was gonna contact vendors 2018 01:16:52,580 --> 01:16:53,560 and say look 2019 01:16:53,560 --> 01:16:53,920 you know 2020 01:16:53,920 --> 01:16:54,120 uh 2021 01:16:54,120 --> 01:16:55,640 I have a vulnerability in your code 2022 01:16:55,640 --> 01:16:56,340 uh 2023 01:16:56,340 --> 01:16:57,080 can you fix it 2024 01:16:57,080 --> 01:16:58,000 and then store the date 2025 01:16:58,000 --> 01:16:59,020 and um 2026 01:16:59,020 --> 01:17:00,260 I had uh 2027 01:17:00,260 --> 01:17:00,660 you know 2028 01:17:00,660 --> 01:17:01,620 the file name 2029 01:17:01,620 --> 01:17:02,020 uh 2030 01:17:02,020 --> 01:17:02,860 with the full path 2031 01:17:02,860 --> 01:17:04,180 because I would need that later on 2032 01:17:04,180 --> 01:17:04,800 in my research 2033 01:17:04,800 --> 01:17:06,100 to try and verify this stuff 2034 01:17:06,620 --> 01:17:07,100 um 2035 01:17:07,860 --> 01:17:08,780 and you know 2036 01:17:08,780 --> 01:17:09,720 I wanted to validate 2037 01:17:09,720 --> 01:17:10,700 the proof of concepts 2038 01:17:10,700 --> 01:17:11,420 uh 2039 01:17:12,340 --> 01:17:13,980 I wanted to make sure that 2040 01:17:13,980 --> 01:17:14,300 you know 2041 01:17:14,300 --> 01:17:15,340 if it was legit 2042 01:17:15,340 --> 01:17:16,200 that 2043 01:17:16,200 --> 01:17:16,720 you know 2044 01:17:16,720 --> 01:17:17,860 it was documented 2045 01:17:17,860 --> 01:17:18,340 legit 2046 01:17:18,340 --> 01:17:19,380 with a proof of concept 2047 01:17:19,380 --> 01:17:20,500 that wasn't just hearsay 2048 01:17:20,500 --> 01:17:21,340 or I suspect 2049 01:17:21,340 --> 01:17:22,240 it was real 2050 01:17:22,240 --> 01:17:23,500 cross-site scripting vulnerability 2051 01:17:23,920 --> 01:17:24,980 and I wanted to have it 2052 01:17:24,980 --> 01:17:25,520 in the database 2053 01:17:25,520 --> 01:17:26,660 so that I had 2054 01:17:26,660 --> 01:17:27,980 thirteen hundred vulnerabilities 2055 01:17:27,980 --> 01:17:29,000 and thirteen hundred 2056 01:17:29,020 --> 01:17:29,540 exploits 2057 01:17:29,540 --> 01:17:30,500 because I thought that would be really cool 2058 01:17:31,020 --> 01:17:32,000 and I had an idea 2059 01:17:32,000 --> 01:17:33,080 on how I was gonna test this 2060 01:17:33,080 --> 01:17:33,660 um 2061 01:17:33,660 --> 01:17:34,620 I had been thinking about it 2062 01:17:34,620 --> 01:17:35,440 for a few days 2063 01:17:35,800 --> 01:17:36,220 and uh 2064 01:17:36,220 --> 01:17:38,140 decided I had this clear path 2065 01:17:38,140 --> 01:17:39,000 to trying to 2066 01:17:39,000 --> 01:17:40,660 trying to exploit these things automatically 2067 01:17:41,480 --> 01:17:42,000 so 2068 01:17:42,000 --> 01:17:42,720 uh 2069 01:17:42,720 --> 01:17:43,660 I tried uh 2070 01:17:43,660 --> 01:17:44,440 auto-exploit 2071 01:17:44,840 --> 01:17:45,100 um 2072 01:17:45,860 --> 01:17:47,400 my idea was to 2073 01:17:47,400 --> 01:17:47,700 uh 2074 01:17:47,700 --> 01:17:49,940 send the auto-generated payloads 2075 01:17:49,940 --> 01:17:50,220 uh 2076 01:17:50,220 --> 01:17:51,300 to vulnerable plugins 2077 01:17:51,300 --> 01:17:53,320 I was gonna use cgi bin 2078 01:17:53,320 --> 01:17:54,920 I was gonna use phpcgi 2079 01:17:54,920 --> 01:17:56,740 to execute the php code 2080 01:17:56,740 --> 01:17:58,600 and render the html 2081 01:17:58,600 --> 01:17:59,080 with the 2082 01:17:59,600 --> 01:18:00,320 javascript payload 2083 01:18:00,320 --> 01:18:01,080 inside of it 2084 01:18:01,440 --> 01:18:01,720 um 2085 01:18:01,720 --> 01:18:02,900 the javascript payload 2086 01:18:02,900 --> 01:18:03,480 I thought 2087 01:18:03,480 --> 01:18:04,660 would be just 2088 01:18:04,660 --> 01:18:05,060 uh 2089 01:18:05,640 --> 01:18:06,760 an image request 2090 01:18:06,760 --> 01:18:08,580 to grab a script 2091 01:18:08,580 --> 01:18:10,540 that would just be a number on the end 2092 01:18:10,540 --> 01:18:11,740 which was the vulnerability number 2093 01:18:11,740 --> 01:18:12,400 uh 2094 01:18:12,400 --> 01:18:14,040 that would set the auto-verify 2095 01:18:14,040 --> 01:18:15,000 to one in the database 2096 01:18:15,000 --> 01:18:15,920 just saying that 2097 01:18:15,920 --> 01:18:16,200 you know 2098 01:18:16,200 --> 01:18:17,160 the javascript fired 2099 01:18:17,160 --> 01:18:18,280 and that 2100 01:18:18,280 --> 01:18:19,660 it was legitimately executing 2101 01:18:19,660 --> 01:18:20,200 in the browser 2102 01:18:20,200 --> 01:18:21,440 and that was a legit 2103 01:18:21,440 --> 01:18:22,180 uh 2104 01:18:22,180 --> 01:18:23,200 cross-site scripting vulnerability 2105 01:18:23,200 --> 01:18:24,580 and it was proven 2106 01:18:24,580 --> 01:18:25,680 um 2107 01:18:27,060 --> 01:18:27,620 so 2108 01:18:27,620 --> 01:18:28,420 uh 2109 01:18:28,420 --> 01:18:29,160 for the 2110 01:18:29,160 --> 01:18:29,340 uh 2111 01:18:29,340 --> 01:18:31,380 automatically generating the html 2112 01:18:31,380 --> 01:18:32,020 um 2113 01:18:32,020 --> 01:18:32,660 I set up 2114 01:18:32,660 --> 01:18:32,840 uh 2115 01:18:32,840 --> 01:18:33,440 a cgi 2116 01:18:33,440 --> 01:18:34,400 um 2117 01:18:34,400 --> 01:18:34,980 environment 2118 01:18:34,980 --> 01:18:35,600 uh 2119 01:18:35,600 --> 01:18:36,640 set up the environment variables 2120 01:18:36,640 --> 01:18:37,360 um 2121 01:18:37,360 --> 01:18:38,640 so you need to have these 2122 01:18:38,640 --> 01:18:39,160 uh 2123 01:18:39,160 --> 01:18:39,940 these populated 2124 01:18:39,940 --> 01:18:40,780 you had to have uh 2125 01:18:40,780 --> 01:18:41,960 you know the cgi 2126 01:18:41,960 --> 01:18:42,620 uh 2127 01:18:42,620 --> 01:18:43,400 stuff set up 2128 01:18:43,400 --> 01:18:44,280 redirect status 2129 01:18:44,280 --> 01:18:44,740 uh 2130 01:18:44,740 --> 01:18:45,660 the request method 2131 01:18:45,660 --> 01:18:47,000 would be automatically changed 2132 01:18:47,000 --> 01:18:48,620 depending on whether it was a get 2133 01:18:48,620 --> 01:18:49,460 or a request 2134 01:18:49,460 --> 01:18:50,940 or a post eventually 2135 01:18:50,940 --> 01:18:51,740 um 2136 01:18:51,740 --> 01:18:52,580 and then the query string 2137 01:18:52,580 --> 01:18:53,440 was just my payload 2138 01:18:53,440 --> 01:18:54,120 with uh 2139 01:18:54,120 --> 01:18:54,940 just a generic 2140 01:18:54,940 --> 01:18:55,780 um 2141 01:18:55,780 --> 01:18:57,660 cross-site scripting payload 2142 01:18:57,660 --> 01:18:58,020 you know 2143 01:18:58,020 --> 01:18:58,660 just an alert box 2144 01:18:58,660 --> 01:19:00,020 and um 2145 01:19:01,940 --> 01:19:02,500 so 2146 01:19:04,220 --> 01:19:05,640 it was a simple script 2147 01:19:05,640 --> 01:19:07,740 it's just a simple basic bash script 2148 01:19:07,740 --> 01:19:08,440 um 2149 01:19:08,440 --> 01:19:09,980 that would just set up the environment 2150 01:19:09,980 --> 01:19:11,480 and then I could just feed 2151 01:19:11,480 --> 01:19:12,320 um 2152 01:19:12,320 --> 01:19:13,360 from the database 2153 01:19:13,360 --> 01:19:14,260 I could feed 2154 01:19:14,260 --> 01:19:15,640 the uh 2155 01:19:16,440 --> 01:19:17,320 php file 2156 01:19:17,320 --> 01:19:17,880 that was vulnerable 2157 01:19:17,880 --> 01:19:18,820 and I could feed 2158 01:19:18,820 --> 01:19:19,520 uh 2159 01:19:19,520 --> 01:19:20,200 the payload 2160 01:19:20,200 --> 01:19:20,980 that I wanted to use 2161 01:19:20,980 --> 01:19:21,720 with the specific 2162 01:19:21,720 --> 01:19:23,020 vulnerability id number 2163 01:19:23,020 --> 01:19:24,100 in the uh 2164 01:19:24,100 --> 01:19:25,060 set for the variable 2165 01:19:25,060 --> 01:19:25,620 for the payload 2166 01:19:26,280 --> 01:19:26,720 um 2167 01:19:27,860 --> 01:19:29,720 it was a two-step process 2168 01:19:29,720 --> 01:19:30,580 um 2169 01:19:31,620 --> 01:19:32,500 I had 2170 01:19:32,500 --> 01:19:33,060 uh 2171 01:19:33,060 --> 01:19:33,940 I had to 2172 01:19:33,940 --> 01:19:34,360 first 2173 01:19:34,360 --> 01:19:35,780 render the html 2174 01:19:35,780 --> 01:19:37,240 and then I had to actually 2175 01:19:37,240 --> 01:19:38,080 run that html 2176 01:19:38,080 --> 01:19:38,940 through 2177 01:19:38,940 --> 01:19:39,480 um 2178 01:19:39,920 --> 01:19:40,340 phantom js 2179 01:19:40,340 --> 01:19:41,180 to exec the 2180 01:19:41,180 --> 01:19:41,900 javascript 2181 01:19:42,420 --> 01:19:43,280 and um 2182 01:19:44,360 --> 01:19:45,400 once I could do that 2183 01:19:45,400 --> 01:19:46,400 I could find out 2184 01:19:46,400 --> 01:19:46,940 you know 2185 01:19:46,940 --> 01:19:47,440 if 2186 01:19:48,000 --> 01:19:49,140 this thing was gonna even work 2187 01:19:49,140 --> 01:19:50,660 I wasn't sure if this was gonna work or not 2188 01:19:50,660 --> 01:19:50,920 I 2189 01:19:50,920 --> 01:19:51,680 I thought it might 2190 01:19:51,680 --> 01:19:52,460 um 2191 01:19:53,500 --> 01:19:54,400 and uh 2192 01:19:54,400 --> 01:19:55,220 I ended up 2193 01:19:55,220 --> 01:19:55,500 uh 2194 01:19:55,500 --> 01:19:56,700 pulling down phantom js 2195 01:19:57,360 --> 01:19:57,600 um 2196 01:19:58,100 --> 01:19:58,920 I don't know if 2197 01:19:58,920 --> 01:19:59,980 if folks are not familiar 2198 01:19:59,980 --> 01:20:00,620 with phantom js 2199 01:20:00,620 --> 01:20:01,580 it's uh 2200 01:20:02,280 --> 01:20:03,060 it's just a 2201 01:20:03,060 --> 01:20:04,220 a full stack 2202 01:20:04,220 --> 01:20:04,800 uh 2203 01:20:04,800 --> 01:20:05,920 web browser 2204 01:20:05,920 --> 01:20:06,840 what's headless though 2205 01:20:06,840 --> 01:20:07,140 so 2206 01:20:07,140 --> 01:20:08,320 you pretty much tell it 2207 01:20:08,320 --> 01:20:08,940 to do something 2208 01:20:08,940 --> 01:20:10,960 and it will spit out an html file 2209 01:20:10,960 --> 01:20:11,680 or uh 2210 01:20:11,680 --> 01:20:12,100 and uh 2211 01:20:12,100 --> 01:20:12,760 an image file 2212 01:20:12,760 --> 01:20:13,620 of what it got back 2213 01:20:13,620 --> 01:20:14,360 um 2214 01:20:15,780 --> 01:20:17,080 and I found this uh 2215 01:20:17,080 --> 01:20:17,800 skander 2216 01:20:18,460 --> 01:20:19,040 javascript code 2217 01:20:19,040 --> 01:20:19,780 that somebody had written 2218 01:20:19,780 --> 01:20:20,380 that would take 2219 01:20:20,380 --> 01:20:20,880 uh 2220 01:20:22,460 --> 01:20:22,640 a document 2221 01:20:22,640 --> 01:20:23,520 and then render 2222 01:20:23,520 --> 01:20:25,040 all of the html files 2223 01:20:25,040 --> 01:20:25,480 in it 2224 01:20:25,480 --> 01:20:26,940 as if it had gone through a browser 2225 01:20:27,460 --> 01:20:28,340 and spit out 2226 01:20:28,340 --> 01:20:28,880 a uh 2227 01:20:28,880 --> 01:20:29,700 an html file 2228 01:20:29,700 --> 01:20:30,640 and a png file 2229 01:20:30,640 --> 01:20:31,160 of the results 2230 01:20:31,160 --> 01:20:32,060 which was perfect 2231 01:20:32,060 --> 01:20:33,080 it was exactly what I needed 2232 01:20:33,080 --> 01:20:33,940 um 2233 01:20:34,640 --> 01:20:35,080 so 2234 01:20:35,840 --> 01:20:37,240 I set this thing all up 2235 01:20:37,700 --> 01:20:38,360 and uh 2236 01:20:39,460 --> 01:20:40,620 I'm about to hit enter 2237 01:20:40,620 --> 01:20:40,960 and I'm like 2238 01:20:40,960 --> 01:20:42,160 I wonder if this is gonna work 2239 01:20:42,160 --> 01:20:42,580 you know 2240 01:20:42,580 --> 01:20:42,820 I'm 2241 01:20:42,820 --> 01:20:43,600 I'm like 2242 01:20:43,600 --> 01:20:43,780 I'm 2243 01:20:43,780 --> 01:20:45,600 I'm sure someone else might have tried this 2244 01:20:45,600 --> 01:20:45,800 but 2245 01:20:45,800 --> 01:20:46,360 you know 2246 01:20:46,360 --> 01:20:47,320 this was my idea 2247 01:20:47,320 --> 01:20:48,200 and I figured I would 2248 01:20:48,200 --> 01:20:48,940 I would give it a whirl 2249 01:20:48,940 --> 01:20:49,880 and uh 2250 01:20:49,880 --> 01:20:50,540 so I hit enter 2251 01:20:51,160 --> 01:20:52,120 and I start uh 2252 01:20:52,720 --> 01:20:53,160 tailing 2253 01:20:53,160 --> 01:20:53,880 uh 2254 01:20:53,880 --> 01:20:55,500 the apache access log 2255 01:20:55,980 --> 01:20:56,860 and it's working 2256 01:20:56,860 --> 01:20:58,540 I'm seeing stuff come in 2257 01:20:58,540 --> 01:20:59,240 uh 2258 01:21:00,420 --> 01:21:01,440 stuff's firing off 2259 01:21:01,440 --> 01:21:02,320 I'm seeing um 2260 01:21:02,320 --> 01:21:02,740 you know 2261 01:21:02,740 --> 01:21:04,060 my logs are starting to scroll 2262 01:21:04,060 --> 01:21:04,720 and I'm like 2263 01:21:04,720 --> 01:21:05,680 holy crap 2264 01:21:05,680 --> 01:21:06,660 this is actually gonna work 2265 01:21:06,660 --> 01:21:07,280 I 2266 01:21:07,280 --> 01:21:08,000 I might have 2267 01:21:08,000 --> 01:21:08,400 you know 2268 01:21:09,100 --> 01:21:10,500 1300 of these vulnerabilities 2269 01:21:10,500 --> 01:21:11,900 with proof of concepts 2270 01:21:13,180 --> 01:21:14,420 Jericho's gonna buy me a beer 2271 01:21:14,420 --> 01:21:15,480 he'll buy me a beer 2272 01:21:15,480 --> 01:21:16,280 the next time he sees me 2273 01:21:16,280 --> 01:21:16,940 if this thing works 2274 01:21:17,460 --> 01:21:18,060 and uh 2275 01:21:18,060 --> 01:21:18,180 so 2276 01:21:18,180 --> 01:21:19,000 so then 2277 01:21:19,000 --> 01:21:19,820 I 2278 01:21:19,820 --> 01:21:20,240 you know 2279 01:21:20,240 --> 01:21:21,700 I start examining the results 2280 01:21:22,260 --> 01:21:22,980 and uh 2281 01:21:22,980 --> 01:21:23,260 I'm like 2282 01:21:23,260 --> 01:21:24,120 oh I have all of these 2283 01:21:24,120 --> 01:21:25,540 these results files in here 2284 01:21:25,960 --> 01:21:26,400 and uh 2285 01:21:26,400 --> 01:21:28,040 I can see where all of the 2286 01:21:28,040 --> 01:21:28,340 the 2287 01:21:28,340 --> 01:21:29,780 the code has been executed 2288 01:21:29,780 --> 01:21:30,400 in the ph 2289 01:21:30,400 --> 01:21:31,520 in the png files 2290 01:21:31,520 --> 01:21:32,680 you can see where 2291 01:21:32,680 --> 01:21:33,000 um 2292 01:21:33,000 --> 01:21:34,120 you had like 2293 01:21:34,120 --> 01:21:34,840 error 500 2294 01:21:34,840 --> 01:21:35,660 error 500 2295 01:21:36,180 --> 01:21:38,000 and then more error 500s 2296 01:21:38,000 --> 01:21:38,880 and then like 2297 01:21:38,880 --> 01:21:40,940 I saw legitimate cross-site scripting in there 2298 01:21:40,940 --> 01:21:42,520 and then another error 500 2299 01:21:42,520 --> 01:21:42,940 I'm like 2300 01:21:42,940 --> 01:21:43,100 uh 2301 01:21:43,100 --> 01:21:45,500 I wonder what this really boils down to 2302 01:21:45,980 --> 01:21:46,460 um 2303 01:21:46,460 --> 01:21:48,440 so I go through 2304 01:21:48,440 --> 01:21:49,640 and uh 2305 01:21:49,640 --> 01:21:52,100 I start looking at the results 2306 01:21:53,520 --> 01:21:55,100 38 of them fired off 2307 01:21:56,560 --> 01:21:57,220 I'm like 2308 01:21:57,220 --> 01:21:58,100 that's kinda low 2309 01:21:59,020 --> 01:21:59,580 uh 2310 01:22:00,160 --> 01:22:01,360 and at this point 2311 01:22:01,360 --> 01:22:01,960 I realize 2312 01:22:01,960 --> 01:22:03,440 something went horribly wrong 2313 01:22:03,440 --> 01:22:04,080 some 2314 01:22:04,080 --> 01:22:05,040 something's not right 2315 01:22:05,040 --> 01:22:05,660 there 2316 01:22:05,660 --> 01:22:05,880 there 2317 01:22:05,880 --> 01:22:06,760 there should have been 2318 01:22:06,760 --> 01:22:07,320 I thought 2319 01:22:08,280 --> 01:22:08,840 maybe 2320 01:22:08,840 --> 01:22:10,400 200 of them 2321 01:22:10,400 --> 01:22:10,780 maybe 2322 01:22:10,780 --> 01:22:12,080 would have fired off 2323 01:22:12,080 --> 01:22:12,600 as automatic 2324 01:22:13,180 --> 01:22:14,120 so I thought 2325 01:22:14,120 --> 01:22:14,320 well 2326 01:22:14,320 --> 01:22:14,920 you know 2327 01:22:14,920 --> 01:22:15,240 perhaps 2328 01:22:15,240 --> 01:22:16,260 they all need 2329 01:22:16,260 --> 01:22:16,440 you know 2330 01:22:16,460 --> 01:22:16,920 authentication 2331 01:22:16,920 --> 01:22:17,480 you know 2332 01:22:17,480 --> 01:22:18,640 maybe these things need to be 2333 01:22:18,640 --> 01:22:19,140 uh 2334 01:22:19,140 --> 01:22:20,360 authenticated in order for the 2335 01:22:20,360 --> 01:22:20,600 the 2336 01:22:20,600 --> 01:22:21,860 for the uh 2337 01:22:21,860 --> 01:22:23,600 vulnerable code to be reached 2338 01:22:23,600 --> 01:22:24,440 but 2339 01:22:24,440 --> 01:22:25,040 you know 2340 01:22:25,040 --> 01:22:25,560 I realized 2341 01:22:25,560 --> 01:22:26,560 it worked 2342 01:22:26,560 --> 01:22:27,740 it actually did work 2343 01:22:27,740 --> 01:22:28,780 so something went right 2344 01:22:28,780 --> 01:22:29,740 but something 2345 01:22:29,740 --> 01:22:30,740 something's still wrong 2346 01:22:30,740 --> 01:22:31,820 there's something that's broken 2347 01:22:32,380 --> 01:22:32,900 um 2348 01:22:34,000 --> 01:22:34,760 so then 2349 01:22:34,760 --> 01:22:35,240 you know 2350 01:22:35,240 --> 01:22:36,320 I started to 2351 01:22:36,320 --> 01:22:37,720 sit down and just think about 2352 01:22:37,720 --> 01:22:38,380 what I had done 2353 01:22:38,380 --> 01:22:40,000 and what my results meant 2354 01:22:40,000 --> 01:22:40,880 um 2355 01:22:41,740 --> 01:22:42,780 I figured 2356 01:22:42,780 --> 01:22:43,200 you know 2357 01:22:43,200 --> 01:22:44,560 if the javascript execution 2358 01:22:44,560 --> 01:22:45,940 was successful 2359 01:22:46,560 --> 01:22:47,000 then 2360 01:22:47,480 --> 01:22:49,340 I know that the proof of concept 2361 01:22:49,340 --> 01:22:50,600 that I generated is working 2362 01:22:50,600 --> 01:22:51,200 that that 2363 01:22:51,200 --> 01:22:51,740 that little 2364 01:22:52,280 --> 01:22:52,780 snippet of 2365 01:22:52,780 --> 01:22:54,460 java payload was actually 2366 01:22:54,460 --> 01:22:55,640 escaping the tags properly 2367 01:22:55,640 --> 01:22:57,480 that I was actually getting somewhere 2368 01:22:57,480 --> 01:22:58,260 and 2369 01:22:58,260 --> 01:23:00,920 the automatic generation of that thing 2370 01:23:00,920 --> 01:23:01,520 actually worked 2371 01:23:01,520 --> 01:23:02,660 and then 2372 01:23:02,660 --> 01:23:03,060 you know 2373 01:23:03,060 --> 01:23:04,180 I realized that 2374 01:23:04,180 --> 01:23:05,920 you don't need to be authenticated 2375 01:23:05,920 --> 01:23:06,760 if it did work 2376 01:23:06,760 --> 01:23:07,520 so these were 2377 01:23:07,520 --> 01:23:08,340 legitimately 2378 01:23:09,220 --> 01:23:09,820 unauthenticated 2379 01:23:09,820 --> 01:23:10,840 cross-site scripting vulnerabilities 2380 01:23:11,560 --> 01:23:11,960 um 2381 01:23:12,500 --> 01:23:14,080 and I knew that the injection point 2382 01:23:14,080 --> 01:23:14,480 was 2383 01:23:14,560 --> 01:23:14,700 you know 2384 01:23:14,700 --> 01:23:15,680 wasn't sanitized 2385 01:23:15,680 --> 01:23:17,260 and I knew the code wasn't 2386 01:23:17,260 --> 01:23:18,120 just defined in a class 2387 01:23:18,120 --> 01:23:18,760 I couldn't reach 2388 01:23:18,760 --> 01:23:19,420 um 2389 01:23:19,420 --> 01:23:20,220 because if it's 2390 01:23:20,220 --> 01:23:21,380 if it's stuck in a class 2391 01:23:21,380 --> 01:23:22,960 and that class isn't being loaded 2392 01:23:22,960 --> 01:23:23,880 you can't execute it 2393 01:23:24,410 --> 01:23:24,660 um 2394 01:23:25,660 --> 01:23:26,340 and then 2395 01:23:26,340 --> 01:23:26,720 you know 2396 01:23:26,720 --> 01:23:26,980 if 2397 01:23:26,980 --> 01:23:28,960 if the javascript didn't execute 2398 01:23:29,560 --> 01:23:29,940 um 2399 01:23:30,560 --> 01:23:30,940 the 2400 01:23:30,940 --> 01:23:31,720 I thought perhaps 2401 01:23:31,720 --> 01:23:32,440 the injection point 2402 01:23:32,440 --> 01:23:33,440 was being sanitized 2403 01:23:33,440 --> 01:23:34,340 and I had missed it somehow 2404 01:23:34,900 --> 01:23:35,400 or 2405 01:23:35,400 --> 01:23:35,720 uh 2406 01:23:35,720 --> 01:23:36,420 you know 2407 01:23:36,420 --> 01:23:37,480 the code required authentication 2408 01:23:37,480 --> 01:23:38,400 like admin rights 2409 01:23:38,400 --> 01:23:38,900 or 2410 01:23:38,900 --> 01:23:39,680 you know 2411 01:23:39,680 --> 01:23:40,920 regular login user 2412 01:23:40,920 --> 01:23:40,980 uh 2413 01:23:41,640 --> 01:23:43,880 rights for an author for wordpress 2414 01:23:44,360 --> 01:23:45,040 and then 2415 01:23:45,040 --> 01:23:45,280 uh 2416 01:23:45,280 --> 01:23:45,580 you know 2417 01:23:45,580 --> 01:23:46,660 perhaps the proof of concept 2418 01:23:46,660 --> 01:23:47,340 needed to be tweaked 2419 01:23:47,340 --> 01:23:48,260 it needed to be 2420 01:23:48,260 --> 01:23:50,420 it wasn't escaping the html tags properly 2421 01:23:50,420 --> 01:23:51,560 so I thought 2422 01:23:51,560 --> 01:23:51,780 you know 2423 01:23:51,780 --> 01:23:52,540 at this point I thought 2424 01:23:52,540 --> 01:23:52,760 you know 2425 01:23:52,760 --> 01:23:54,100 maybe there was some 2426 01:23:54,100 --> 01:23:54,720 some hope 2427 01:23:54,720 --> 01:23:55,120 you know 2428 01:23:55,120 --> 01:23:55,540 I'm like maybe 2429 01:23:55,540 --> 01:23:56,540 maybe the proof of concept 2430 01:23:56,540 --> 01:23:56,960 needed to be 2431 01:23:56,960 --> 01:23:57,280 you know 2432 01:23:57,280 --> 01:23:58,260 reworked and tweaked 2433 01:23:58,260 --> 01:23:59,080 and you know 2434 01:23:59,080 --> 01:23:59,520 um 2435 01:24:00,620 --> 01:24:02,560 I might have more of a success rate 2436 01:24:03,900 --> 01:24:05,780 so then I started looking at the environment 2437 01:24:05,780 --> 01:24:06,380 I had built 2438 01:24:06,380 --> 01:24:07,380 and realized 2439 01:24:07,380 --> 01:24:07,980 um 2440 01:24:07,980 --> 01:24:09,400 I had screwed up 2441 01:24:09,400 --> 01:24:10,100 um 2442 01:24:10,100 --> 01:24:13,080 I didn't have wordpress actually loaded 2443 01:24:13,080 --> 01:24:13,700 you know 2444 01:24:13,700 --> 01:24:13,960 this 2445 01:24:13,960 --> 01:24:15,240 this thing was just executing 2446 01:24:15,240 --> 01:24:16,480 these php 2447 01:24:16,480 --> 01:24:17,040 uh 2448 01:24:17,040 --> 01:24:17,520 files 2449 01:24:17,520 --> 01:24:18,980 but these php files 2450 01:24:18,980 --> 01:24:22,060 might be relying on other php snippets 2451 01:24:22,060 --> 01:24:22,920 to work properly 2452 01:24:22,920 --> 01:24:24,860 they might be including pieces of 2453 01:24:24,860 --> 01:24:25,660 other plugins 2454 01:24:25,660 --> 01:24:27,120 they might be including pieces of 2455 01:24:27,120 --> 01:24:27,800 uh 2456 01:24:27,800 --> 01:24:28,540 wordpress 2457 01:24:28,540 --> 01:24:29,340 um 2458 01:24:29,340 --> 01:24:30,000 and 2459 01:24:30,000 --> 01:24:31,060 if that's the case 2460 01:24:31,060 --> 01:24:32,140 I'm just going to get an error 500 2461 01:24:32,140 --> 01:24:32,900 it's 2462 01:24:32,900 --> 01:24:33,200 it's 2463 01:24:33,200 --> 01:24:34,260 it's not going to even run 2464 01:24:34,260 --> 01:24:34,600 so 2465 01:24:34,600 --> 01:24:35,820 those were 2466 01:24:35,820 --> 01:24:37,020 weren't even valid tests 2467 01:24:37,020 --> 01:24:37,860 um 2468 01:24:37,980 --> 01:24:39,940 and I didn't have the entire plugin copy 2469 01:24:39,940 --> 01:24:40,440 you know 2470 01:24:40,440 --> 01:24:41,700 these snippets of code 2471 01:24:41,700 --> 01:24:43,420 are from plugins 2472 01:24:43,420 --> 01:24:45,180 that rely on other pieces of code 2473 01:24:45,180 --> 01:24:45,680 in that plugin 2474 01:24:45,680 --> 01:24:46,840 and I didn't have that plugin available 2475 01:24:46,840 --> 01:24:47,560 so when 2476 01:24:47,560 --> 01:24:49,400 the php executed 2477 01:24:49,400 --> 01:24:51,280 and it went out to include another file 2478 01:24:51,280 --> 01:24:52,040 and that file didn't exist 2479 01:24:52,040 --> 01:24:52,840 it blew up 2480 01:24:52,840 --> 01:24:53,980 it just didn't matter 2481 01:24:53,980 --> 01:24:54,940 it didn't even execute 2482 01:24:54,940 --> 01:24:55,880 it just broke 2483 01:24:55,880 --> 01:24:56,660 and gave me error 500 2484 01:24:57,400 --> 01:24:57,880 um 2485 01:24:58,420 --> 01:25:00,540 and then another thing I realized is that 2486 01:25:00,540 --> 01:25:00,940 um 2487 01:25:00,940 --> 01:25:02,020 some of these 2488 01:25:02,020 --> 01:25:02,800 plugins 2489 01:25:02,800 --> 01:25:04,380 were setting the content header 2490 01:25:04,380 --> 01:25:05,980 so that they wouldn't be vulnerable 2491 01:25:05,980 --> 01:25:07,120 to cross-site scripting 2492 01:25:07,120 --> 01:25:08,540 and php5 2493 01:25:08,540 --> 01:25:09,920 doesn't set the headers 2494 01:25:09,920 --> 01:25:10,520 it just 2495 01:25:10,520 --> 01:25:11,640 renders the 2496 01:25:11,640 --> 01:25:12,280 the 2497 01:25:12,280 --> 01:25:13,560 it was just rendering the uh 2498 01:25:13,560 --> 01:25:14,860 the html 2499 01:25:14,860 --> 01:25:16,360 but not actually setting a header because 2500 01:25:16,360 --> 01:25:17,700 it's cgi 2501 01:25:17,700 --> 01:25:18,120 it's 2502 01:25:18,120 --> 01:25:19,100 it's on a command line 2503 01:25:19,100 --> 01:25:20,840 it's not a full stack web server 2504 01:25:20,840 --> 01:25:21,800 um 2505 01:25:22,400 --> 01:25:23,160 and then 2506 01:25:23,160 --> 01:25:23,780 the 2507 01:25:23,780 --> 01:25:24,440 the real 2508 01:25:24,440 --> 01:25:24,860 uh 2509 01:25:24,860 --> 01:25:25,960 kick to the head 2510 01:25:25,960 --> 01:25:28,000 was that I found out that wordpress 2511 01:25:28,000 --> 01:25:30,400 escapes the get, post, and request variables 2512 01:25:30,940 --> 01:25:32,120 I didn't know this 2513 01:25:32,120 --> 01:25:32,600 I 2514 01:25:32,600 --> 01:25:32,920 I 2515 01:25:32,920 --> 01:25:34,060 I ended up 2516 01:25:34,060 --> 01:25:35,080 finding this out 2517 01:25:35,080 --> 01:25:35,940 um 2518 01:25:35,940 --> 01:25:36,820 maybe 2519 01:25:36,820 --> 01:25:37,100 I 2520 01:25:37,640 --> 01:25:38,600 I don't know 2521 01:25:39,120 --> 01:25:40,020 two or three days 2522 01:25:40,020 --> 01:25:41,420 after I ran into this problem 2523 01:25:41,420 --> 01:25:42,380 was just mulling it over 2524 01:25:42,380 --> 01:25:43,320 like why didn't this work 2525 01:25:43,320 --> 01:25:44,340 and then 2526 01:25:44,340 --> 01:25:45,260 I thought to myself 2527 01:25:45,260 --> 01:25:47,440 perhaps the folks at wordpress knew this 2528 01:25:47,440 --> 01:25:48,100 uh 2529 01:25:48,100 --> 01:25:49,220 which is why they sort of 2530 01:25:49,220 --> 01:25:52,300 were dragging their feet on acknowledging the 1352 vulnerabilities 2531 01:25:52,980 --> 01:25:53,460 um 2532 01:25:53,460 --> 01:25:54,740 maybe they did 2533 01:25:54,740 --> 01:25:55,480 maybe they didn't 2534 01:25:55,480 --> 01:25:55,880 um 2535 01:25:56,540 --> 01:25:57,540 I know that 2536 01:25:57,540 --> 01:25:57,860 uh 2537 01:25:58,600 --> 01:25:59,080 it 2538 01:25:59,800 --> 01:26:00,760 it pretty much 2539 01:26:00,760 --> 01:26:02,680 messed up the research that I was doing 2540 01:26:02,680 --> 01:26:03,960 because I didn't figure this out 2541 01:26:03,960 --> 01:26:06,160 before getting too far with this 2542 01:26:06,160 --> 01:26:06,940 uh 2543 01:26:08,320 --> 01:26:09,500 so in the code 2544 01:26:10,300 --> 01:26:10,820 um 2545 01:26:11,880 --> 01:26:13,160 if you look at the code 2546 01:26:13,160 --> 01:26:13,880 and the uh 2547 01:26:13,880 --> 01:26:14,940 the wordpress load file 2548 01:26:14,940 --> 01:26:15,980 uh 2549 01:26:15,980 --> 01:26:17,460 you can see where it takes 2550 01:26:17,460 --> 01:26:19,200 the get variable and the post 2551 01:26:19,200 --> 01:26:19,980 and the cookie and the server 2552 01:26:19,980 --> 01:26:21,160 the gpcs variables 2553 01:26:21,160 --> 01:26:22,980 and just runs them through 2554 01:26:22,980 --> 01:26:23,880 addmagic quotes 2555 01:26:24,840 --> 01:26:25,360 so 2556 01:26:25,360 --> 01:26:26,500 what this did 2557 01:26:26,500 --> 01:26:27,220 was 2558 01:26:27,220 --> 01:26:27,720 um 2559 01:26:28,800 --> 01:26:29,320 it 2560 01:26:29,320 --> 01:26:30,460 screwed up my payload 2561 01:26:30,460 --> 01:26:30,920 so that 2562 01:26:30,920 --> 01:26:32,760 I couldn't break out of the html tags 2563 01:26:33,360 --> 01:26:34,160 and uh 2564 01:26:34,160 --> 01:26:35,180 pretty much rendered 2565 01:26:35,180 --> 01:26:36,220 a lot of the 2566 01:26:36,220 --> 01:26:36,680 uh 2567 01:26:36,680 --> 01:26:36,920 uh 2568 01:26:36,940 --> 01:26:38,040 cross-site scripting vulnerabilities 2569 01:26:38,040 --> 01:26:38,880 um 2570 01:26:39,710 --> 01:26:40,040 un 2571 01:26:40,040 --> 01:26:40,660 uh 2572 01:26:40,660 --> 01:26:41,520 unexploitable 2573 01:26:41,520 --> 01:26:42,640 um 2574 01:26:42,640 --> 01:26:43,480 so I was 2575 01:26:43,480 --> 01:26:44,540 I was actually pretty sad 2576 01:26:44,540 --> 01:26:44,940 uh 2577 01:26:44,940 --> 01:26:45,280 this was 2578 01:26:45,280 --> 01:26:45,680 this was 2579 01:26:45,680 --> 01:26:46,760 really uh 2580 01:26:46,760 --> 01:26:48,540 an annoying thing that I had run into 2581 01:26:48,540 --> 01:26:49,400 um 2582 01:26:49,400 --> 01:26:50,520 so I went back 2583 01:26:50,520 --> 01:26:51,960 and um 2584 01:26:53,100 --> 01:26:54,120 I managed 2585 01:26:54,120 --> 01:26:54,300 uh 2586 01:26:54,300 --> 01:26:55,100 I managed to go 2587 01:26:55,100 --> 01:26:56,700 and verify that uh 2588 01:26:56,700 --> 01:26:57,780 twenty 2589 01:26:57,780 --> 01:26:58,940 seven of these 2590 01:26:58,940 --> 01:26:59,920 automatically were 2591 01:26:59,920 --> 01:27:00,480 uh 2592 01:27:00,480 --> 01:27:01,360 the 2593 01:27:01,360 --> 01:27:02,560 the proof of concept was generated 2594 01:27:02,560 --> 01:27:04,320 the vulnerability was verified 2595 01:27:04,940 --> 01:27:05,740 and um 2596 01:27:05,740 --> 01:27:06,880 it actually worked 2597 01:27:06,880 --> 01:27:08,740 so twenty seven were fully automated 2598 01:27:08,740 --> 01:27:10,080 generated vulnerabilities 2599 01:27:10,080 --> 01:27:11,140 with proof of concepts 2600 01:27:11,140 --> 01:27:12,840 and verification of that vulnerability 2601 01:27:13,320 --> 01:27:15,080 and then three I manually validated 2602 01:27:15,080 --> 01:27:15,660 um 2603 01:27:15,660 --> 01:27:16,400 you know 2604 01:27:16,400 --> 01:27:17,740 some of the payloads needed tweaking 2605 01:27:17,740 --> 01:27:18,280 um 2606 01:27:18,280 --> 01:27:20,920 I think they needed another variable to be set 2607 01:27:20,920 --> 01:27:22,280 in order to reach the vulnerable code 2608 01:27:22,280 --> 01:27:23,340 in that PHP file 2609 01:27:23,340 --> 01:27:24,260 which I was able to 2610 01:27:24,260 --> 01:27:25,280 figure out once I 2611 01:27:25,280 --> 01:27:25,640 you know 2612 01:27:25,640 --> 01:27:26,780 after a manual code review 2613 01:27:27,340 --> 01:27:28,060 and uh 2614 01:27:28,060 --> 01:27:29,340 there were false positives too 2615 01:27:29,340 --> 01:27:29,960 um 2616 01:27:29,960 --> 01:27:30,960 I had found 2617 01:27:30,960 --> 01:27:31,200 you know 2618 01:27:31,200 --> 01:27:32,100 some places in the code 2619 01:27:32,640 --> 01:27:33,100 that had 2620 01:27:33,100 --> 01:27:33,480 you know 2621 01:27:33,480 --> 01:27:35,380 made sure that the variable was an integer 2622 01:27:35,380 --> 01:27:36,240 which you know 2623 01:27:36,240 --> 01:27:37,500 broke the cross-site scripting 2624 01:27:37,500 --> 01:27:38,240 um 2625 01:27:39,820 --> 01:27:40,300 so 2626 01:27:40,780 --> 01:27:41,860 at this point 2627 01:27:41,860 --> 01:27:42,340 um 2628 01:27:43,000 --> 01:27:43,480 I 2629 01:27:43,480 --> 01:27:43,760 I 2630 01:27:43,760 --> 01:27:44,020 I was 2631 01:27:44,020 --> 01:27:44,620 you know 2632 01:27:44,620 --> 01:27:46,240 my cool kid status was pretty low 2633 01:27:46,240 --> 01:27:46,680 I 2634 01:27:46,680 --> 01:27:47,480 I thought that uh 2635 01:27:47,480 --> 01:27:48,660 this was gonna be uh 2636 01:27:49,140 --> 01:27:51,200 something that I could submit to like DEF CON 2637 01:27:51,200 --> 01:27:51,560 which 2638 01:27:51,560 --> 01:27:52,440 I 2639 01:27:52,440 --> 01:27:52,980 I'm here 2640 01:27:52,980 --> 01:27:53,720 um 2641 01:27:53,720 --> 01:27:54,480 so I 2642 01:27:54,480 --> 01:27:55,400 I guess it kinda worked 2643 01:27:55,400 --> 01:27:56,100 um 2644 01:27:56,960 --> 01:27:57,740 but uh 2645 01:27:57,740 --> 01:27:59,460 it was just a real disappointment 2646 01:27:59,460 --> 01:28:00,420 I uh 2647 01:28:00,420 --> 01:28:00,880 uh 2648 01:28:00,880 --> 01:28:01,720 I thought that 2649 01:28:01,720 --> 01:28:02,540 you know 2650 01:28:02,540 --> 01:28:03,340 this was gonna be uh 2651 01:28:03,700 --> 01:28:06,500 a really cool example of how to automate this stuff 2652 01:28:06,500 --> 01:28:07,100 and then 2653 01:28:07,100 --> 01:28:07,800 you know 2654 01:28:07,800 --> 01:28:08,820 I thought perhaps uh 2655 01:28:08,820 --> 01:28:10,120 this could be something that 2656 01:28:10,120 --> 01:28:10,860 you know 2657 01:28:10,860 --> 01:28:12,300 folks could use and pick up 2658 01:28:12,300 --> 01:28:13,180 and start using to 2659 01:28:13,180 --> 01:28:15,260 to find their own security holes automatically 2660 01:28:15,880 --> 01:28:16,360 um 2661 01:28:17,720 --> 01:28:18,200 so 2662 01:28:18,900 --> 01:28:19,900 what I learned 2663 01:28:19,900 --> 01:28:22,240 and I think this is probably the most important slide 2664 01:28:22,240 --> 01:28:23,040 at least for me 2665 01:28:23,040 --> 01:28:23,920 was 2666 01:28:23,920 --> 01:28:25,700 I should have tested stuff end to end 2667 01:28:25,700 --> 01:28:26,540 um 2668 01:28:26,540 --> 01:28:28,520 I shouldn't have tried to cut corners 2669 01:28:28,520 --> 01:28:29,620 and make things quicker 2670 01:28:29,620 --> 01:28:30,160 and just 2671 01:28:30,160 --> 01:28:32,060 think that I was gonna be smart 2672 01:28:32,060 --> 01:28:32,600 by 2673 01:28:32,600 --> 01:28:33,040 you know 2674 01:28:33,040 --> 01:28:34,200 using PHP CGI 2675 01:28:34,200 --> 01:28:35,520 or CGI execution 2676 01:28:35,520 --> 01:28:36,700 I should've built a full 2677 01:28:36,700 --> 01:28:37,740 working 2678 01:28:37,740 --> 01:28:38,820 Apache installation 2679 01:28:38,820 --> 01:28:39,620 with WordPress 2680 01:28:39,620 --> 01:28:41,560 and installed the plugins myself 2681 01:28:41,560 --> 01:28:43,540 and then done the testing that way 2682 01:28:43,540 --> 01:28:44,320 um 2683 01:28:44,320 --> 01:28:47,900 I'm not sure how I would install 1352 plugins 2684 01:28:48,560 --> 01:28:48,860 uh 2685 01:28:49,160 --> 01:28:49,740 but 2686 01:28:49,740 --> 01:28:50,580 you know 2687 01:28:50,580 --> 01:28:52,620 it would've probably had better results than this did 2688 01:28:52,620 --> 01:28:53,360 um 2689 01:28:54,780 --> 01:28:55,380 and 2690 01:28:55,380 --> 01:28:56,680 when you see odd results 2691 01:28:56,680 --> 01:28:58,040 you gotta research them 2692 01:28:58,040 --> 01:28:58,580 you know 2693 01:28:58,580 --> 01:28:59,040 why 2694 01:28:59,620 --> 01:29:00,060 why am I getting 2695 01:29:00,620 --> 01:29:00,860 this 2696 01:29:01,500 --> 01:29:02,780 extra character in here 2697 01:29:02,780 --> 01:29:03,940 when I shouldn't be seeing anything 2698 01:29:04,560 --> 01:29:05,600 why isn't this working 2699 01:29:05,600 --> 01:29:06,020 you know 2700 01:29:06,020 --> 01:29:06,440 it's uh 2701 01:29:06,440 --> 01:29:07,460 you know 2702 01:29:07,460 --> 01:29:08,400 investigate 2703 01:29:08,400 --> 01:29:09,020 you know 2704 01:29:09,020 --> 01:29:10,000 if it doesn't make sense 2705 01:29:10,000 --> 01:29:10,800 you gotta look deeper 2706 01:29:10,800 --> 01:29:11,440 you know 2707 01:29:11,440 --> 01:29:12,180 I never thought 2708 01:29:12,180 --> 01:29:13,200 in my mind 2709 01:29:13,200 --> 01:29:14,120 that 2710 01:29:14,120 --> 01:29:16,460 someone would be doing something you're not expecting 2711 01:29:16,460 --> 01:29:16,920 uh 2712 01:29:16,920 --> 01:29:17,680 like 2713 01:29:17,680 --> 01:29:18,320 um 2714 01:29:19,540 --> 01:29:20,020 escaping 2715 01:29:20,600 --> 01:29:21,560 global variables 2716 01:29:21,560 --> 01:29:22,760 I would've never thought that 2717 01:29:22,760 --> 01:29:23,720 anybody would be doing that 2718 01:29:23,720 --> 01:29:24,360 um 2719 01:29:24,360 --> 01:29:25,300 it just never occurred to me 2720 01:29:25,300 --> 01:29:26,240 and I was dead wrong 2721 01:29:26,240 --> 01:29:26,480 I 2722 01:29:26,480 --> 01:29:27,880 WordPress was doing it 2723 01:29:27,880 --> 01:29:28,420 um 2724 01:29:28,420 --> 01:29:29,260 you know 2725 01:29:29,260 --> 01:29:29,820 they're escaping 2726 01:29:29,820 --> 01:29:31,500 everything I needed 2727 01:29:31,500 --> 01:29:33,260 to break out of those HTML tags 2728 01:29:33,260 --> 01:29:33,860 and actually 2729 01:29:33,860 --> 01:29:34,240 you know 2730 01:29:34,240 --> 01:29:34,860 make this thing work 2731 01:29:34,860 --> 01:29:35,220 so 2732 01:29:35,220 --> 01:29:36,040 uh 2733 01:29:36,040 --> 01:29:37,260 it tripped me up 2734 01:29:37,860 --> 01:29:38,760 it made 2735 01:29:38,760 --> 01:29:39,120 uh 2736 01:29:39,120 --> 01:29:41,020 it made everything context dependent 2737 01:29:41,020 --> 01:29:41,800 um 2738 01:29:41,800 --> 01:29:42,400 so 2739 01:29:43,800 --> 01:29:44,900 stuff like this 2740 01:29:45,320 --> 01:29:46,040 I could still 2741 01:29:46,040 --> 01:29:47,380 get working with 2742 01:29:47,380 --> 01:29:48,240 cross-site scripting 2743 01:29:48,240 --> 01:29:49,240 because it wasn't being escaped 2744 01:29:49,240 --> 01:29:50,000 out of any HTML 2745 01:29:50,000 --> 01:29:50,700 I could just 2746 01:29:50,700 --> 01:29:52,080 HTML doesn't care 2747 01:29:52,080 --> 01:29:52,740 if there's uh 2748 01:29:53,480 --> 01:29:53,800 um 2749 01:29:54,300 --> 01:29:54,580 uh 2750 01:29:54,580 --> 01:29:55,100 quotes 2751 01:29:55,100 --> 01:29:55,980 or double quotes in there 2752 01:29:55,980 --> 01:29:56,380 it'll still 2753 01:29:56,380 --> 01:29:56,860 you know 2754 01:29:56,860 --> 01:29:58,040 or JavaScript will just render 2755 01:29:58,040 --> 01:29:58,720 uh 2756 01:29:58,720 --> 01:29:59,860 we can still use our 2757 01:29:59,860 --> 01:30:00,760 our regular payload 2758 01:30:00,760 --> 01:30:01,600 but 2759 01:30:01,600 --> 01:30:02,640 most of these 2760 01:30:02,640 --> 01:30:04,080 were like this 2761 01:30:04,700 --> 01:30:05,580 context dependent 2762 01:30:05,580 --> 01:30:06,880 you had um 2763 01:30:07,380 --> 01:30:07,720 you know 2764 01:30:07,720 --> 01:30:10,080 all the stuff that was being stuck in there 2765 01:30:10,080 --> 01:30:10,860 uh 2766 01:30:10,860 --> 01:30:12,260 that I was trying to escape out of 2767 01:30:12,260 --> 01:30:12,940 you could see in the 2768 01:30:12,940 --> 01:30:13,540 oh 2769 01:30:13,540 --> 01:30:14,580 you can't see it too well but 2770 01:30:14,580 --> 01:30:15,120 um 2771 01:30:15,120 --> 01:30:16,980 it was escaping the 2772 01:30:16,980 --> 01:30:17,260 the 2773 01:30:17,260 --> 01:30:18,060 the double quotes 2774 01:30:18,060 --> 01:30:18,760 um 2775 01:30:18,760 --> 01:30:19,120 and 2776 01:30:19,120 --> 01:30:19,580 and I 2777 01:30:19,580 --> 01:30:21,200 that's why my payloads weren't firing 2778 01:30:21,200 --> 01:30:21,940 um 2779 01:30:24,580 --> 01:30:25,900 where the injection point was 2780 01:30:26,520 --> 01:30:26,800 and 2781 01:30:26,800 --> 01:30:28,000 you'd need to know 2782 01:30:28,000 --> 01:30:28,520 uh 2783 01:30:29,760 --> 01:30:31,360 if there's a way around it 2784 01:30:31,360 --> 01:30:32,880 and in some cases there wasn't 2785 01:30:32,880 --> 01:30:33,160 and 2786 01:30:33,160 --> 01:30:33,740 the 2787 01:30:34,500 --> 01:30:36,220 their escaping was just rendering stuff 2788 01:30:36,220 --> 01:30:36,880 um 2789 01:30:37,940 --> 01:30:38,500 uh 2790 01:30:38,500 --> 01:30:39,300 unexploitable 2791 01:30:39,300 --> 01:30:40,100 um 2792 01:30:40,100 --> 01:30:40,760 so 2793 01:30:42,900 --> 01:30:43,460 yeah 2794 01:30:43,460 --> 01:30:44,980 the next step would have been 2795 01:30:44,980 --> 01:30:46,660 vetting all that cross-site scripting 2796 01:30:46,660 --> 01:30:47,700 I would need to 2797 01:30:47,700 --> 01:30:49,400 to manually review the remaining entries 2798 01:30:49,400 --> 01:30:50,820 I'd have to go through each one 2799 01:30:51,340 --> 01:30:51,920 and see 2800 01:30:52,580 --> 01:30:53,960 where it was in the code 2801 01:30:53,960 --> 01:30:54,560 if it was 2802 01:30:54,580 --> 01:30:55,780 something I could escape 2803 01:30:55,780 --> 01:30:57,360 if it was something I couldn't escape 2804 01:30:57,360 --> 01:30:58,100 um 2805 01:30:58,100 --> 01:30:59,440 if it was something 2806 01:30:59,440 --> 01:30:59,860 uh 2807 01:30:59,860 --> 01:31:00,680 that was 2808 01:31:00,680 --> 01:31:01,040 uh 2809 01:31:01,040 --> 01:31:01,600 required 2810 01:31:01,600 --> 01:31:03,720 another variable to be set 2811 01:31:03,720 --> 01:31:05,000 in order to reach the vulnerable code 2812 01:31:05,000 --> 01:31:05,720 and it was legit 2813 01:31:05,720 --> 01:31:06,520 um 2814 01:31:06,520 --> 01:31:07,140 there was 2815 01:31:07,140 --> 01:31:08,580 no way I was gonna take 2816 01:31:08,580 --> 01:31:09,240 you know 2817 01:31:09,240 --> 01:31:10,200 the time to do this 2818 01:31:10,200 --> 01:31:10,620 this was 2819 01:31:10,620 --> 01:31:11,580 this would have been a huge 2820 01:31:11,580 --> 01:31:12,340 uh 2821 01:31:12,340 --> 01:31:13,500 a huge undertaking 2822 01:31:13,500 --> 01:31:14,800 even for a large team 2823 01:31:14,800 --> 01:31:15,160 I mean 2824 01:31:15,160 --> 01:31:16,940 you'd need a bunch of guys to go through this 2825 01:31:16,940 --> 01:31:17,220 and 2826 01:31:17,220 --> 01:31:17,980 um 2827 01:31:17,980 --> 01:31:18,740 it would be 2828 01:31:19,220 --> 01:31:20,540 it would just be too much work 2829 01:31:20,540 --> 01:31:21,160 and 2830 01:31:21,160 --> 01:31:23,480 I started dreaming about cross-site scripting 2831 01:31:23,480 --> 01:31:24,480 I was having like 2832 01:31:24,480 --> 01:31:25,840 nightmares about PHP 2833 01:31:25,840 --> 01:31:27,220 and plug-ins 2834 01:31:27,220 --> 01:31:28,240 and cross-site scripting 2835 01:31:28,240 --> 01:31:28,800 and I'd wake up 2836 01:31:28,800 --> 01:31:30,960 thinking about cross-site scripting bananas 2837 01:31:30,960 --> 01:31:31,640 and 2838 01:31:31,640 --> 01:31:32,820 and just like bizarre 2839 01:31:32,820 --> 01:31:34,280 things in my head that 2840 01:31:34,280 --> 01:31:36,300 it just spent too much time looking at code 2841 01:31:36,300 --> 01:31:37,200 and thinking about this stuff 2842 01:31:37,200 --> 01:31:37,540 so 2843 01:31:38,120 --> 01:31:38,360 um 2844 01:31:38,940 --> 01:31:40,760 I decided it was time to 2845 01:31:40,760 --> 01:31:41,020 to 2846 01:31:41,020 --> 01:31:42,100 you know wrap this up 2847 01:31:42,100 --> 01:31:43,520 and just document what I had done 2848 01:31:44,160 --> 01:31:44,600 and uh 2849 01:31:44,600 --> 01:31:45,880 see if other people could use it 2850 01:31:45,880 --> 01:31:46,580 um 2851 01:31:47,160 --> 01:31:47,520 I'm 2852 01:31:47,520 --> 01:31:49,500 I'm pretty much done with wordpress plug-ins 2853 01:31:49,500 --> 01:31:49,880 uh 2854 01:31:49,880 --> 01:31:50,300 for now 2855 01:31:50,820 --> 01:31:51,080 um 2856 01:31:51,080 --> 01:31:53,200 I think I'm sore at them for 2857 01:31:53,200 --> 01:31:53,540 for 2858 01:31:53,540 --> 01:31:54,540 doing the uh 2859 01:31:54,540 --> 01:31:54,920 content 2860 01:31:54,920 --> 01:31:55,420 or the uh 2861 01:31:55,420 --> 01:31:56,980 escaping of the global variables 2862 01:31:56,980 --> 01:31:59,180 I think that's an evil thing to do 2863 01:31:59,180 --> 01:31:59,900 um 2864 01:31:59,900 --> 01:32:00,380 so 2865 01:32:00,380 --> 01:32:01,180 I 2866 01:32:01,180 --> 01:32:02,780 I don't want to look at it anymore 2867 01:32:02,780 --> 01:32:03,500 um 2868 01:32:04,280 --> 01:32:05,020 I might 2869 01:32:05,020 --> 01:32:05,760 I thought about 2870 01:32:05,760 --> 01:32:06,040 you know 2871 01:32:06,040 --> 01:32:07,540 possibly looking at stuff like 2872 01:32:07,540 --> 01:32:08,140 you know 2873 01:32:08,140 --> 01:32:09,660 look for SQL injection this way 2874 01:32:09,660 --> 01:32:10,320 you know 2875 01:32:10,320 --> 01:32:11,220 it could be applied to 2876 01:32:11,220 --> 01:32:12,160 other functions 2877 01:32:12,160 --> 01:32:13,060 in PHP 2878 01:32:13,060 --> 01:32:13,540 that 2879 01:32:14,340 --> 01:32:15,780 might be prone to abuse 2880 01:32:15,780 --> 01:32:16,680 by a developer 2881 01:32:16,680 --> 01:32:18,080 or misused by a developer 2882 01:32:18,080 --> 01:32:19,080 um 2883 01:32:19,080 --> 01:32:19,700 you know 2884 01:32:19,700 --> 01:32:20,780 maybe look for some 2885 01:32:20,780 --> 01:32:21,120 uh 2886 01:32:21,860 --> 01:32:23,400 command injection stuff with this 2887 01:32:23,400 --> 01:32:24,120 um 2888 01:32:25,860 --> 01:32:26,420 other 2889 01:32:26,420 --> 01:32:26,920 other 2890 01:32:26,920 --> 01:32:28,100 content management systems 2891 01:32:28,100 --> 01:32:28,700 Joomlife 2892 01:32:28,700 --> 01:32:29,140 realized 2893 01:32:29,140 --> 01:32:30,200 doesn't escape superglobals 2894 01:32:30,840 --> 01:32:32,600 I started poking at that one 2895 01:32:32,600 --> 01:32:33,400 um 2896 01:32:33,400 --> 01:32:35,720 that might be kind of fun to play with 2897 01:32:35,720 --> 01:32:36,120 Drupal 2898 01:32:36,120 --> 01:32:37,220 has a nice listing 2899 01:32:37,220 --> 01:32:38,540 of all of its extensions 2900 01:32:38,540 --> 01:32:39,160 on that 2901 01:32:39,160 --> 01:32:39,380 uh 2902 01:32:39,380 --> 01:32:40,320 HTTPS link 2903 01:32:40,320 --> 01:32:41,900 so that's another starting point 2904 01:32:41,900 --> 01:32:42,080 you know 2905 01:32:42,080 --> 01:32:42,960 maybe I might poke at that 2906 01:32:42,960 --> 01:32:43,200 or 2907 01:32:43,200 --> 01:32:44,340 other people can 2908 01:32:44,340 --> 01:32:45,320 um 2909 01:32:46,180 --> 01:32:47,320 actually had uh 2910 01:32:47,320 --> 01:32:47,900 uh 2911 01:32:47,900 --> 01:32:48,880 a research 2912 01:32:48,880 --> 01:32:49,060 um 2913 01:32:49,080 --> 01:32:49,160 researcher 2914 01:32:49,160 --> 01:32:50,160 who's actually in this room 2915 01:32:50,160 --> 01:32:51,900 if he wants to stand up 2916 01:32:51,900 --> 01:32:52,440 and say hello 2917 01:32:53,180 --> 01:32:53,940 looking at you 2918 01:32:53,940 --> 01:32:54,300 brute 2919 01:32:54,940 --> 01:32:55,160 he's 2920 01:32:55,160 --> 01:32:56,320 super tall 2921 01:32:56,320 --> 01:32:56,840 uh 2922 01:32:56,840 --> 01:32:57,600 he actually 2923 01:32:57,600 --> 01:32:57,920 uh 2924 01:32:57,920 --> 01:32:59,060 he's an expert 2925 01:32:59,060 --> 01:33:00,160 of cross-site scripting 2926 01:33:00,160 --> 01:33:00,920 um 2927 01:33:00,920 --> 01:33:02,500 I saw a talk of his 2928 01:33:02,500 --> 01:33:02,700 and he 2929 01:33:02,700 --> 01:33:03,640 he blew my mind 2930 01:33:03,640 --> 01:33:04,280 but he actually 2931 01:33:04,280 --> 01:33:05,620 saw my technique 2932 01:33:05,620 --> 01:33:07,100 when we were both speaking 2933 01:33:07,100 --> 01:33:08,140 at the same b-sides 2934 01:33:08,140 --> 01:33:08,640 or uh 2935 01:33:08,640 --> 01:33:09,940 Boston b-sides conference 2936 01:33:10,500 --> 01:33:11,160 and uh 2937 01:33:11,160 --> 01:33:12,140 he ended up 2938 01:33:12,140 --> 01:33:13,440 writing his own scripts 2939 01:33:13,440 --> 01:33:14,240 to do what I did 2940 01:33:14,240 --> 01:33:15,220 and found a whole bunch of 2941 01:33:15,220 --> 01:33:16,320 vulnerabilities himself 2942 01:33:16,320 --> 01:33:17,280 and uh 2943 01:33:19,080 --> 01:33:20,000 it was sort of a success 2944 01:33:20,000 --> 01:33:21,100 because now he's able 2945 01:33:21,100 --> 01:33:21,860 to use this technique 2946 01:33:21,860 --> 01:33:23,140 and start finding stuff 2947 01:33:23,140 --> 01:33:24,260 and um 2948 01:33:24,260 --> 01:33:25,340 probably have more success 2949 01:33:25,340 --> 01:33:25,920 than I did 2950 01:33:25,920 --> 01:33:26,600 um 2951 01:33:26,600 --> 01:33:27,740 and then I started seeing 2952 01:33:27,740 --> 01:33:28,060 uh 2953 01:33:28,060 --> 01:33:28,640 vulnerabilities 2954 01:33:28,640 --> 01:33:29,700 that I had discovered 2955 01:33:29,700 --> 01:33:30,620 oh 2956 01:33:30,620 --> 01:33:31,220 uh 2957 01:33:31,220 --> 01:33:32,880 two or three months ago 2958 01:33:32,880 --> 01:33:33,700 uh 2959 01:33:33,700 --> 01:33:34,740 starting to show up 2960 01:33:34,740 --> 01:33:35,560 by the guys 2961 01:33:35,560 --> 01:33:36,220 who were running 2962 01:33:36,220 --> 01:33:37,080 the Summer of Pwnage 2963 01:33:37,080 --> 01:33:37,600 um 2964 01:33:37,600 --> 01:33:38,440 they were starting 2965 01:33:38,440 --> 01:33:39,120 to publish stuff 2966 01:33:39,120 --> 01:33:39,800 uh 2967 01:33:39,800 --> 01:33:40,700 on full disclosure 2968 01:33:40,700 --> 01:33:42,280 and I actually told him 2969 01:33:42,280 --> 01:33:42,520 like hey 2970 01:33:42,520 --> 01:33:43,320 I found that 2971 01:33:43,320 --> 01:33:44,240 about uh 2972 01:33:44,240 --> 01:33:45,880 two or three months ago 2973 01:33:46,280 --> 01:33:47,520 in this database 2974 01:33:47,520 --> 01:33:48,320 that I had built 2975 01:33:48,320 --> 01:33:50,080 but I never documented it 2976 01:33:50,080 --> 01:33:51,680 or wrote a proof of concept 2977 01:33:52,240 --> 01:33:52,820 and I said 2978 01:33:52,820 --> 01:33:53,880 it's cool that you guys 2979 01:33:53,880 --> 01:33:54,680 are finding this stuff 2980 01:33:54,680 --> 01:33:55,380 and uh 2981 01:33:55,380 --> 01:33:56,500 it's your vulnerability 2982 01:33:56,500 --> 01:33:58,180 I'm glad you found it 2983 01:33:58,180 --> 01:33:59,600 and you actually validated it 2984 01:33:59,600 --> 01:34:00,120 and if you guys 2985 01:34:00,120 --> 01:34:00,780 want my database 2986 01:34:00,780 --> 01:34:02,080 I'll just send it to you 2987 01:34:02,080 --> 01:34:02,360 you know 2988 01:34:02,360 --> 01:34:02,960 if you want to look at 2989 01:34:02,960 --> 01:34:03,440 the stuff there 2990 01:34:03,900 --> 01:34:04,300 um 2991 01:34:04,300 --> 01:34:04,720 so 2992 01:34:05,540 --> 01:34:05,940 um 2993 01:34:06,500 --> 01:34:07,060 so yeah 2994 01:34:07,060 --> 01:34:08,260 it was starting to see stuff 2995 01:34:08,260 --> 01:34:09,040 start to pop up 2996 01:34:09,040 --> 01:34:09,940 and uh 2997 01:34:09,940 --> 01:34:10,460 you know 2998 01:34:10,460 --> 01:34:11,340 people starting to see stuff 2999 01:34:11,340 --> 01:34:12,200 that I had found already 3000 01:34:12,200 --> 01:34:13,180 but just didn't look at 3001 01:34:13,180 --> 01:34:13,940 um 3002 01:34:16,160 --> 01:34:17,000 actually uh 3003 01:34:17,000 --> 01:34:18,360 this is kind of funny 3004 01:34:18,360 --> 01:34:18,620 so 3005 01:34:18,620 --> 01:34:19,980 I have a thank you slide 3006 01:34:19,980 --> 01:34:20,860 um 3007 01:34:21,700 --> 01:34:23,140 I'm just thanking everybody here 3008 01:34:23,140 --> 01:34:23,460 for just 3009 01:34:23,460 --> 01:34:24,400 listening to me ramble 3010 01:34:24,400 --> 01:34:25,060 about this stuff 3011 01:34:25,060 --> 01:34:26,280 this has been rattling around 3012 01:34:26,280 --> 01:34:26,720 in my head 3013 01:34:26,720 --> 01:34:27,080 for 3014 01:34:27,880 --> 01:34:28,660 I don't know 3015 01:34:28,660 --> 01:34:29,900 six or seven months now 3016 01:34:30,360 --> 01:34:30,800 and uh 3017 01:34:30,800 --> 01:34:31,220 you know 3018 01:34:31,220 --> 01:34:31,940 thanks for coming 3019 01:34:31,940 --> 01:34:33,140 to hear me talk about it 3020 01:34:33,140 --> 01:34:33,860 um 3021 01:34:33,860 --> 01:34:35,120 Brian Martin 3022 01:34:35,120 --> 01:34:35,740 and Scott Moore 3023 01:34:35,740 --> 01:34:37,280 and Ryan Dewhurst 3024 01:34:37,280 --> 01:34:38,340 those guys are all great 3025 01:34:38,340 --> 01:34:38,860 and just 3026 01:34:40,460 --> 01:34:40,800 sort it out 3027 01:34:41,360 --> 01:34:41,580 um 3028 01:34:42,040 --> 01:34:42,980 Mika at WordPress 3029 01:34:42,980 --> 01:34:43,640 uh 3030 01:34:44,080 --> 01:34:44,780 they were 3031 01:34:44,780 --> 01:34:45,240 they were 3032 01:34:45,240 --> 01:34:46,600 very helpful initially 3033 01:34:46,600 --> 01:34:47,400 with just saying 3034 01:34:47,400 --> 01:34:47,580 look 3035 01:34:47,580 --> 01:34:49,480 when you sent us this email 3036 01:34:49,480 --> 01:34:50,580 I did get a response from them 3037 01:34:50,580 --> 01:34:50,780 they said 3038 01:34:50,780 --> 01:34:51,640 when you sent us this email 3039 01:34:51,640 --> 01:34:52,420 uh 3040 01:34:52,420 --> 01:34:53,020 we 3041 01:34:53,020 --> 01:34:54,760 just about fell off our chairs 3042 01:34:54,760 --> 01:34:55,760 they thought 3043 01:34:55,760 --> 01:34:56,860 we have no idea 3044 01:34:56,860 --> 01:34:57,660 how we're going to process 3045 01:34:57,660 --> 01:34:58,660 1300 vulnerabilities 3046 01:34:59,180 --> 01:34:59,840 we do 3047 01:34:59,840 --> 01:35:01,020 one or two vulnerabilities 3048 01:35:01,020 --> 01:35:01,900 at a time 3049 01:35:02,420 --> 01:35:02,860 there's 3050 01:35:02,860 --> 01:35:03,840 we have no framework 3051 01:35:03,840 --> 01:35:05,380 for handling 1300 of these 3052 01:35:05,380 --> 01:35:06,140 so 3053 01:35:06,140 --> 01:35:07,440 they sort of just sat on it 3054 01:35:07,440 --> 01:35:08,120 and let me know that 3055 01:35:08,120 --> 01:35:08,440 you know 3056 01:35:10,460 --> 01:35:10,920 sort of thinking about 3057 01:35:10,920 --> 01:35:12,060 what they were going to do with it 3058 01:35:12,060 --> 01:35:13,520 and then I had to send them 3059 01:35:13,520 --> 01:35:14,020 the email saying 3060 01:35:14,020 --> 01:35:14,340 yeah 3061 01:35:14,340 --> 01:35:15,100 I didn't realize 3062 01:35:15,100 --> 01:35:15,840 you guys were 3063 01:35:15,840 --> 01:35:16,680 um 3064 01:35:16,680 --> 01:35:17,420 escaping 3065 01:35:17,420 --> 01:35:18,940 the global variables 3066 01:35:19,640 --> 01:35:20,340 and uh 3067 01:35:20,340 --> 01:35:21,420 so a lot of these things 3068 01:35:21,420 --> 01:35:22,240 are context dependent 3069 01:35:22,240 --> 01:35:23,820 which means that a lot of these 3070 01:35:23,820 --> 01:35:25,060 are probably false positives 3071 01:35:25,060 --> 01:35:25,900 so 3072 01:35:26,260 --> 01:35:26,660 you know 3073 01:35:26,660 --> 01:35:26,840 uh 3074 01:35:26,840 --> 01:35:27,880 emergency over 3075 01:35:28,440 --> 01:35:29,180 and then uh 3076 01:35:29,180 --> 01:35:30,400 solar designer for 3077 01:35:30,400 --> 01:35:30,840 you know 3078 01:35:30,840 --> 01:35:32,200 taking the time to actually 3079 01:35:32,200 --> 01:35:33,080 help me format email 3080 01:35:33,080 --> 01:35:33,460 that I 3081 01:35:33,460 --> 01:35:34,440 eventually sent 3082 01:35:34,440 --> 01:35:35,380 to uh 3083 01:35:35,380 --> 01:35:36,860 the OSS security list 3084 01:35:36,860 --> 01:35:37,460 but it only had 3085 01:35:37,460 --> 01:35:38,320 30 uh 3086 01:35:38,320 --> 01:35:39,020 plugins on 3087 01:35:39,020 --> 01:35:39,620 instead of the 3088 01:35:39,620 --> 01:35:41,240 1300 that I thought 3089 01:35:41,980 --> 01:35:42,940 and then uh 3090 01:35:43,760 --> 01:35:45,280 the I'm sorry slide 3091 01:35:45,280 --> 01:35:45,880 which is 3092 01:35:45,880 --> 01:35:47,260 you'll notice is the same as 3093 01:35:47,260 --> 01:35:48,180 the thank you slide 3094 01:35:48,180 --> 01:35:49,120 because 3095 01:35:49,120 --> 01:35:49,780 you know 3096 01:35:49,780 --> 01:35:49,980 I 3097 01:35:49,980 --> 01:35:52,000 I put these guys through so much 3098 01:35:52,000 --> 01:35:52,560 and and 3099 01:35:52,560 --> 01:35:52,920 uh 3100 01:35:52,920 --> 01:35:53,640 you know 3101 01:35:53,640 --> 01:35:55,240 kept hounding them for information 3102 01:35:55,240 --> 01:35:56,640 and they were working with me 3103 01:35:56,640 --> 01:35:57,780 only to have 3104 01:35:57,780 --> 01:35:58,080 you know 3105 01:35:58,080 --> 01:35:58,900 this small result 3106 01:35:58,900 --> 01:35:59,460 uh 3107 01:35:59,460 --> 01:36:00,480 come as a 3108 01:36:00,480 --> 01:36:02,060 come to fruition from it 3109 01:36:02,060 --> 01:36:02,700 um 3110 01:36:03,980 --> 01:36:04,820 and uh 3111 01:36:04,820 --> 01:36:05,340 you know 3112 01:36:05,340 --> 01:36:06,660 if anybody has any questions 3113 01:36:07,220 --> 01:36:07,820 or uh 3114 01:36:08,340 --> 01:36:09,000 um 3115 01:36:09,000 --> 01:36:10,020 these are 3116 01:36:10,020 --> 01:36:11,320 any 3117 01:36:12,040 --> 01:36:12,760 my 3118 01:36:12,760 --> 01:36:12,940 my 3119 01:36:12,940 --> 01:36:13,280 my 3120 01:36:13,280 --> 01:36:13,460 my 3121 01:36:13,460 --> 01:36:13,700 my 3122 01:36:13,700 --> 01:36:14,100 my 3123 01:36:14,100 --> 01:36:14,140 my 3124 01:36:14,140 --> 01:36:14,660 my 3125 01:36:15,600 --> 01:36:16,320 my 3126 01:36:16,320 --> 01:36:17,120 breaking 3127 01:36:21,800 --> 01:36:23,200 my 3128 01:36:27,520 --> 01:36:28,920 Lastly 3129 01:36:28,920 --> 01:36:29,980 Yeah 3130 01:36:31,800 --> 01:36:32,500 I 3131 01:36:32,500 --> 01:36:33,260 had 3132 01:36:33,260 --> 01:36:33,480 Falcon 3133 01:36:35,800 --> 01:36:36,500 but 3134 01:36:36,500 --> 01:36:36,520 in 3135 01:36:38,320 --> 01:36:39,720 off 3136 01:36:39,720 --> 01:36:40,040 call 3137 01:36:40,040 --> 01:36:40,440 my 3138 01:36:40,440 --> 01:36:45,240 think. Yeah, I can't see anything. 3139 01:36:53,520 --> 01:37:00,780 Hello. Can you tell us what is the timeline of all your researches related to this? 3140 01:37:04,500 --> 01:37:11,580 I'd say it was over a month or two. I initially started digging into things, I believe it 3141 01:37:11,580 --> 01:37:22,360 was February, and then I realized that things didn't go as I had planned by, I'd say, late 3142 01:37:22,360 --> 01:37:30,500 April. Yeah, this year. Last year I was looking at mostly SQL injection and remote file inclusion. 3143 01:37:32,460 --> 01:37:36,060 But, yeah, it was about two months, I'd say. Two to three months. 3144 01:37:38,780 --> 01:37:49,920 Any other questions? No? Going once, going twice. Well, Larry, thank you so much, my 3145 01:37:49,920 --> 01:37:54,380 friend. Thank you. So, once again, Larry Kastaller, everybody. 3146 01:38:03,000 --> 01:38:10,000 So, once again, once again, as I said earlier, all the presentation slides will be posted 3147 01:38:10,000 --> 01:38:17,920 on the Wall of Sheep website within the next two weeks. Videos sometime in the fall when 3148 01:38:17,920 --> 01:38:24,560 DEF CON gets them. And thank you so much for being here for today. Our next talk is at 3149 01:38:24,560 --> 01:38:30,200 1210, and it will be Kate Pierce and Carl Vinson on HTTP. 3150 01:38:30,780 --> 01:38:33,300 Stay tuned. 3151 01:39:28,860 --> 01:39:30,260 Thank you. 3152 01:39:58,860 --> 01:40:00,260 Thank you. 3153 01:40:29,360 --> 01:40:30,760 Thank you. 3154 01:40:58,860 --> 01:41:00,260 Thank you. 3155 01:41:28,860 --> 01:41:30,260 Thank you. 3156 01:41:59,360 --> 01:42:00,760 Thank you. 3157 01:42:29,360 --> 01:42:30,760 Thank you. 3158 01:42:58,860 --> 01:43:00,260 Thank you. 3159 01:43:28,860 --> 01:43:30,260 Thank you. 3160 01:43:58,860 --> 01:44:00,260 Thank you. 3161 01:44:03,280 --> 01:44:06,080 Thank you. 3162 01:44:06,220 --> 01:44:10,480 Thank you. 3163 01:44:11,060 --> 01:44:11,360 Thank you. 3164 01:44:41,480 --> 01:44:42,880 . 3165 01:44:46,780 --> 01:44:48,180 . 3166 01:45:41,460 --> 01:45:42,860 . 3167 01:46:11,460 --> 01:46:12,860 . 3168 01:46:41,460 --> 01:46:42,860 . 3169 01:47:11,460 --> 01:47:12,860 . 3170 01:47:41,460 --> 01:47:42,860 . 3171 01:48:11,460 --> 01:48:12,860 . 3172 01:48:41,460 --> 01:48:42,860 . 3173 01:49:11,460 --> 01:49:12,860 . 3174 01:49:41,460 --> 01:49:42,860 . 3175 01:49:52,260 --> 01:49:53,660 . 3176 01:50:12,880 --> 01:50:13,760 . 3177 01:50:13,760 --> 01:50:13,780 . 3178 01:50:39,700 --> 01:50:41,100 . 3179 01:50:42,880 --> 01:50:44,240 . 3180 01:50:44,240 --> 01:50:45,140 . 3181 01:50:52,440 --> 01:50:53,840 . 3182 01:50:53,840 --> 01:50:54,940 . 3183 01:50:54,940 --> 01:50:55,440 . 3184 01:50:55,440 --> 01:50:55,460 . 3185 01:50:55,460 --> 01:50:55,540 . 3186 01:50:55,540 --> 01:50:56,260 . 3187 01:50:56,260 --> 01:51:05,760 to be a very good one we already know it's on http2 by uh sec valve and virus also known as uh 3188 01:51:06,860 --> 01:51:16,420 also known as um kate uh kate pierce and uh carl vincent so they're uh they're in the back they're 3189 01:51:16,420 --> 01:51:22,640 uh getting they're getting warmed up um but again uh thank you so much for all be for you all being 3190 01:51:22,640 --> 01:51:29,040 uh being here um you know this afternoon i mean it was just amazing like even before i walked into 3191 01:51:29,040 --> 01:51:32,280 early people like you're sitting down i was like you got to be kidding me what happened 3192 01:51:32,820 --> 01:51:37,840 so thank you so much i think we can't thank you enough for your support um this year at 3193 01:51:37,840 --> 01:51:43,500 the packet hacking village at uh at defcon uh while we're waiting for uh pierce uh for 3194 01:51:43,500 --> 01:51:52,540 i mean for uh kate and um and uh and um and uh carl uh i guess we can uh take some time to give 3195 01:51:52,540 --> 01:51:52,620 us some time to give us some time to give us some time to give us some time to give us some 3196 01:51:52,620 --> 01:51:53,180 time to give us some time to give us some time to give us some time to give us some time to give us some 3197 01:51:53,180 --> 01:51:55,200 some time to give us some time to give us some time to give us some time to give us some stuff okay so 3198 01:51:55,200 --> 01:51:55,260 some stuff okay so 3199 01:51:55,260 --> 01:51:58,940 some stuff okay so https i got we got a mice here from f5 3200 01:51:58,940 --> 01:51:58,960 https i got we got a mice here from f5 3201 01:51:58,960 --> 01:52:01,880 https i got we got a mice here from f5 uh what does http stand for that's just 3202 01:52:01,880 --> 01:52:02,300 uh what does http stand for that's just 3203 01:52:02,300 --> 01:52:04,020 uh what does http stand for that's just i like yours 3204 01:52:04,020 --> 01:52:04,080 i like yours 3205 01:52:04,080 --> 01:52:08,160 i like yours okay so uh we got another mice and we're 3206 01:52:08,160 --> 01:52:08,180 okay so uh we got another mice and we're 3207 01:52:08,180 --> 01:52:10,000 okay so uh we got another mice and we're going to be doing this stick the whole 3208 01:52:10,000 --> 01:52:10,260 going to be doing this stick the whole 3209 01:52:10,260 --> 01:52:12,420 going to be doing this stick the whole for the whole day and uh good parts of 3210 01:52:12,420 --> 01:52:28,200 tomorrow. What's a good question here? All right. Oh, let's see. What's a good trivia 3211 01:52:28,200 --> 01:52:57,940 question I can think of? No, no, no, no. I don't know about version numbers. I'm not going to answer. I'm not sure if I want to answer. I'm not sure if I'm capable of answering that question. Let's see. Okay. The organizing group. Ah, here's a good one. Here's a good one. Who is named the 3212 01:52:57,940 --> 01:52:58,180 organization? 3213 01:52:58,200 --> 01:53:26,220 The organization that's in charge of the web standards. Who said that? I'm going to give a couple of them out. Here's one. And we'll give you a half. Okay. And again, these are Mises from F5. Let's see what's another question. That's a good one. 3214 01:53:27,660 --> 01:53:54,860 No, I don't like to. No, let's not go there. Let's not go there. Let's not answer that one. Let's give you another. Let me think of one. Let me. Before I give the mice, I actually do want to give a shout out. One of our sponsors for the Wall of Sheep is Veracode. And we'll be giving these shirts out all day. All right. Who wants the shirt? 3215 01:53:55,080 --> 01:53:56,000 Who wants the shirt? 3216 01:53:58,580 --> 01:54:16,440 So, I got to be careful because we don't want to break things. We don't want to rack up the insurance policy. We got to be very, very careful. These are shirts from Veracode. Okay. You can jump for it. And this light is bright. 3217 01:54:23,080 --> 01:54:25,080 Okay. And... 3218 01:54:28,740 --> 01:54:39,860 I'm going to go somewhere in the back. Oh! That was a ricochet. Yes. Here's the... I think I... 3219 01:54:45,860 --> 01:54:47,420 What's a good question here? 3220 01:54:53,720 --> 01:54:54,280 So... 3221 01:54:56,900 --> 01:54:59,480 Well, that's too easy of a question. That's too easy. 3222 01:54:59,820 --> 01:55:07,740 I think next year I got to come up with a whole list of questions before we... Before we... Before I come out here. I'm drawing blanks right now. 3223 01:55:10,020 --> 01:55:21,840 Actually, here's a fun question. Here is a fun... This is a fun question to ask, which has nothing. So, you ready? And they're ready. Coming down the aisle. 3224 01:55:23,220 --> 01:55:23,660 Woo! 3225 01:55:24,540 --> 01:55:25,620 SecValve and Byrus. 3226 01:55:32,340 --> 01:55:33,120 Oh, boy. 3227 01:55:35,880 --> 01:55:45,320 Yeah. So, we got the light... VGA or... You have DisplayPort? Oh, you got everything. So... What's the line? 3228 01:56:02,200 --> 01:56:03,060 An bonsai. 3229 01:56:11,260 --> 01:56:12,060 So, you know what? You had the vai...- 3230 01:56:12,060 --> 01:56:12,100 You had a phone. 3231 01:56:13,820 --> 01:56:14,620 You had an iPhone. 3232 01:56:14,620 --> 01:56:15,020 You had a iPhone. 3233 01:56:31,180 --> 01:56:34,160 While they're sitting up, I did think of a question. 3234 01:56:35,060 --> 01:56:39,780 So here at the Wall of Sheep, here at the Wall of Sheep in the Hackett Hacking Village, 3235 01:56:42,540 --> 01:56:47,580 you know, the whole idea of, I know a lot of people have come, you know, over the last 3236 01:56:47,580 --> 01:56:50,700 few years have come to see our speaker workshops. 3237 01:56:51,440 --> 01:56:56,460 Does anyone know how long the speaker workshops have been going on for at the Wall of Sheep? 3238 01:56:57,260 --> 01:56:58,140 Three years. 3239 01:56:58,820 --> 01:56:59,340 Woo. 3240 01:56:59,940 --> 01:57:00,460 2001. 3241 01:57:00,740 --> 01:57:01,020 Huh? 3242 01:57:01,340 --> 01:57:01,860 2001. 3243 01:57:02,420 --> 01:57:03,960 We would like to say that. 3244 01:57:04,300 --> 01:57:04,940 Six years. 3245 01:57:05,780 --> 01:57:06,300 Ah. 3246 01:57:06,860 --> 01:57:07,560 Five years. 3247 01:57:07,720 --> 01:57:08,640 Four years. 3248 01:57:08,740 --> 01:57:09,020 Seven. 3249 01:57:09,020 --> 01:57:09,480 Eleven. 3250 01:57:10,120 --> 01:57:10,560 Twelve. 3251 01:57:10,860 --> 01:57:11,300 Five. 3252 01:57:11,340 --> 01:57:11,780 No. 3253 01:57:12,580 --> 01:57:14,940 I, I, I, someone did say the right answer. 3254 01:57:15,640 --> 01:57:16,080 Huh? 3255 01:57:16,540 --> 01:57:17,380 Who said that? 3256 01:57:17,620 --> 01:57:17,820 Eight. 3257 01:57:17,820 --> 01:57:18,120 Four. 3258 01:57:18,120 --> 01:57:18,700 Who said four? 3259 01:57:19,740 --> 01:57:20,180 Yeah. 3260 01:57:20,420 --> 01:57:21,840 So, surprise, surprise. 3261 01:57:23,160 --> 01:57:27,660 Ah, just to give you a little idea, yeah, the speaker workshop, this is only the fourth 3262 01:57:27,660 --> 01:57:27,960 year. 3263 01:57:28,160 --> 01:57:34,200 This is only the fourth year of speaker workshops, and yeah, we'll never forget what happened. 3264 01:57:34,340 --> 01:57:38,680 I guess on a personal story, on a personal story. 3265 01:57:39,020 --> 01:57:44,480 When all the speaker workshops got founded, how we, how this all came about was I got 3266 01:57:44,480 --> 01:57:49,680 rejected from DEF CON in 2012, and I said, you know, and I said a few four-letter words, 3267 01:57:49,860 --> 01:57:56,200 stuff was said, and that's when we decided, you know, we, and we, we also noticed we 3268 01:57:56,200 --> 01:58:01,560 got like a lot of room back, it was at the Rio, and we thought about, you know, doing 3269 01:58:01,560 --> 01:58:08,360 something that was, you know, that wasn't just, just a wall, as, you know, we've known 3270 01:58:08,360 --> 01:58:11,520 over the last so many, so many years, if not decades. 3271 01:58:11,960 --> 01:58:18,340 So this was actually one of the reasons why we decided that we, we, you know, what we 3272 01:58:18,340 --> 01:58:22,400 didn't know was when we first ran this workshop, we didn't know how popular it was gonna be, 3273 01:58:22,560 --> 01:58:28,220 and so this is one of the reasons why we actually, instead of creating just, you know, a table 3274 01:58:28,220 --> 01:58:33,620 with, you know, people putting paper plates of usernames and passwords, and it was a far 3275 01:58:33,620 --> 01:58:37,940 cry from what it used to be, and we knew that when we were running events like the 3276 01:58:37,940 --> 01:58:38,340 Speaker Workshop. 3277 01:58:38,360 --> 01:58:45,100 We said we had, there was, there was something bigger, and this is why when you're here now 3278 01:58:45,100 --> 01:58:49,640 at the, at the Packet Hacking Village, not only do you see the wall of sheep, you also 3279 01:58:49,640 --> 01:58:55,360 have the Speaker Workshop, we have Captain Packet, Packet Detective, and now there's 3280 01:58:55,360 --> 01:59:02,100 so many different events such as the Y5 Sheep Hunt, and, and now Sheep City, and so that, 3281 01:59:02,220 --> 01:59:08,340 that, that, that's basically a brief history of how, how the monster was created. 3282 01:59:09,320 --> 01:59:16,260 So next year, at DEFCON 25, if it will happen, again, I say if it will happen, because you 3283 01:59:16,260 --> 01:59:21,780 know that there is always a possibility DEFCON can be canceled, and when we're gonna be 3284 01:59:21,780 --> 01:59:24,800 here, it's gonna be the fifth year of the Speaker Workshop, so next year will be the 3285 01:59:24,800 --> 01:59:25,220 fifth one. 3286 01:59:25,700 --> 01:59:26,460 What time is it? 3287 02:00:04,620 --> 02:00:08,320 And, uh, before, you know, now, I guess, oh, you got the, oh, you got the pointy-toe, 3288 02:00:08,340 --> 02:00:13,980 some people were looking for that yesterday, the pointy thing, oh gosh, yeah, we don't 3289 02:00:13,980 --> 02:00:18,320 provide, one of the things that we gotta be real careful, so we don't provide the pointy 3290 02:00:18,320 --> 02:00:22,380 things, because we don't want anyone's eyes to get popped out, and we don't, we don't 3291 02:00:22,380 --> 02:00:28,980 think we have insurance, so, I didn't say that, but, um, so, uh, thank you so much 3292 02:00:28,980 --> 02:00:34,960 for being here, and, uh, before, um, before I pass the mic over to, uh, to, uh, to Kate 3293 02:00:34,960 --> 02:00:36,280 and to Carl, um. 3294 02:00:38,960 --> 02:00:43,400 I don't know what that was, so, um, you know, one of the things that we're very lucky is 3295 02:00:43,400 --> 02:00:48,660 that we get, not only do we have, uh, speakers, uh, that come from all over the world, but 3296 02:00:48,660 --> 02:00:54,980 we also have DJs come from all over the world, and, uh, literally, and, uh, the next, uh, 3297 02:00:55,180 --> 02:00:59,440 the next two speakers that we have, uh, are no different, and I, because I know that, 3298 02:00:59,440 --> 02:01:01,980 uh, Kate, uh, Kate is from New Zealand, right? 3299 02:01:02,080 --> 02:01:02,800 You're from New Zealand? 3300 02:01:03,040 --> 02:01:03,400 Yeah. 3301 02:01:03,480 --> 02:01:05,120 You know, home of the All Blacks. 3302 02:01:05,900 --> 02:01:07,300 Home of the All Blacks. 3303 02:01:07,400 --> 02:01:08,320 And so, uh. 3304 02:01:08,340 --> 02:01:13,080 And so, uh, without much ado, I, uh, I don't think the next two need too much introduction, 3305 02:01:13,620 --> 02:01:18,900 and, uh, because, uh, you've, uh, we've, uh, you've been to Black Hat, you've spoken at 3306 02:01:18,900 --> 02:01:24,880 Black Hat and DEF CON in the past, and so, without much ado, uh, it is my pleasure to 3307 02:01:24,880 --> 02:01:29,580 introduce to you SecVal and Virus, Kate Pierce and Carl Vinson. 3308 02:01:30,360 --> 02:01:31,140 I already got one. 3309 02:01:36,040 --> 02:01:36,480 Hey. 3310 02:01:37,120 --> 02:01:37,560 Hey. 3311 02:01:37,680 --> 02:01:37,840 Hey, sir. 3312 02:01:37,920 --> 02:01:38,320 I have some questions. 3313 02:01:38,340 --> 02:01:39,100 I'm going to bust it up in my voice. 3314 02:01:39,260 --> 02:01:42,320 Uh, that's what happens from yelling at, well, things. 3315 02:01:43,160 --> 02:01:43,840 Blame Black Hat. 3316 02:01:44,180 --> 02:01:45,000 Yeah, blame Black Hat. 3317 02:01:45,060 --> 02:01:45,320 Okay. 3318 02:01:45,480 --> 02:01:49,260 So, I'll try, I'll try overpowering the voice thing, and I want to be able to talk for 3319 02:01:49,260 --> 02:01:51,320 the next week, but I think I can make this work. 3320 02:01:51,440 --> 02:01:53,220 Okay, so, this is our session. 3321 02:01:53,380 --> 02:01:55,700 ACDB 2.1 quick, and I really shouldn't do that because I'm not going to talk by the 3322 02:01:55,700 --> 02:01:56,800 end of it, so, okay, I'm going to slow back down. 3323 02:01:57,320 --> 02:01:59,200 Teaching good protocols to do bad things. 3324 02:02:00,040 --> 02:02:04,360 So, as previously introduced, Kate, SecVal on Twitter, yell at me, people do. 3325 02:02:05,260 --> 02:02:07,560 Security consultant at Cisco, breaking stuff. 3326 02:02:08,780 --> 02:02:10,540 Telling people, do it right. 3327 02:02:11,560 --> 02:02:13,200 Research, which sort of led to this. 3328 02:02:14,600 --> 02:02:18,560 Distinguishing features, loud, yellow, or maybe that's just a loud yellow. 3329 02:02:19,780 --> 02:02:21,980 I'm also never going to get a better photo than that one. 3330 02:02:23,660 --> 02:02:24,100 Ever. 3331 02:02:24,680 --> 02:02:25,460 So jelly. 3332 02:02:25,820 --> 02:02:26,840 Go to KiwiCon. 3333 02:02:27,060 --> 02:02:28,160 Speak at KiwiCon. 3334 02:02:28,360 --> 02:02:32,040 Get a photo like that, and then be like, okay, I'm done. 3335 02:02:33,860 --> 02:02:34,800 That's just so amazing. 3336 02:02:35,400 --> 02:02:36,340 All right, Carl. 3337 02:02:37,840 --> 02:02:38,700 I'm not important. 3338 02:02:39,300 --> 02:02:39,640 Yeah. 3339 02:02:41,020 --> 02:02:41,880 I break things. 3340 02:02:42,980 --> 02:02:43,960 Hopefully, I scare you. 3341 02:02:45,520 --> 02:02:48,680 Defcon's about what you say, not who you are, so screw this slide. 3342 02:02:49,200 --> 02:02:49,980 He's pretty scary. 3343 02:02:50,520 --> 02:02:51,640 It's left over from Black Hat. 3344 02:02:51,740 --> 02:02:52,660 Just never mind that slide. 3345 02:02:52,760 --> 02:02:53,920 If you piss him off, just don't let him know. 3346 02:02:55,380 --> 02:02:59,480 All right, so starting with a very uninteresting looking video of me just, like, getting a 3347 02:02:59,480 --> 02:03:02,040 VM, and I'm going to start browsing some stuff, and let's not. 3348 02:03:02,380 --> 02:03:02,880 Come on. 3349 02:03:02,940 --> 02:03:03,540 Play, damn you. 3350 02:03:04,980 --> 02:03:05,320 Play. 3351 02:03:05,480 --> 02:03:05,820 Play. 3352 02:03:08,760 --> 02:03:09,940 Something, something, demo gods. 3353 02:03:10,140 --> 02:03:11,260 Something, something, video gods. 3354 02:03:14,720 --> 02:03:15,440 Come on. 3355 02:03:15,760 --> 02:03:16,220 That's kind of funny. 3356 02:03:16,600 --> 02:03:17,720 Works fine the other day. 3357 02:03:18,160 --> 02:03:18,220 All right. 3358 02:03:18,560 --> 02:03:18,920 Play. 3359 02:03:22,440 --> 02:03:22,800 Woo. 3360 02:03:23,000 --> 02:03:23,220 Yay. 3361 02:03:23,680 --> 02:03:23,800 Woo. 3362 02:03:24,620 --> 02:03:26,620 I can talk like that all the time, but let's not do that. 3363 02:03:27,960 --> 02:03:32,380 All right, so we decided to browse some Google News, which has, look, this was the New Zealand 3364 02:03:32,380 --> 02:03:33,280 Google News that day. 3365 02:03:33,360 --> 02:03:34,080 It's not my fault. 3366 02:03:34,140 --> 02:03:34,420 I mean. 3367 02:03:35,760 --> 02:03:36,120 Yeah. 3368 02:03:36,340 --> 02:03:36,840 I mean, OK. 3369 02:03:37,040 --> 02:03:38,740 So, yeah, that one. 3370 02:03:39,920 --> 02:03:40,940 Again, this was news. 3371 02:03:41,040 --> 02:03:41,660 This was not me. 3372 02:03:41,740 --> 02:03:43,460 This was the universe speaking to me. 3373 02:03:43,580 --> 02:03:44,800 And so I decided I got bored with that. 3374 02:03:45,160 --> 02:03:47,240 Go to YouTube, and I start looking for something to watch. 3375 02:03:48,400 --> 02:03:53,320 And then, you know, being the clickbait victim that I am, I decide, oh, Pokemon Go in nine 3376 02:03:53,320 --> 02:03:53,580 minutes. 3377 02:03:53,640 --> 02:03:54,200 Let's have a look at that. 3378 02:03:54,820 --> 02:03:56,800 Getting bored with this dude walking down the street. 3379 02:03:56,860 --> 02:03:57,520 No one wants to see a dude. 3380 02:03:57,620 --> 02:03:58,540 I want to see Pokemon, damn it. 3381 02:03:59,100 --> 02:04:01,980 So I look up where I was going to be speaking in a couple of weeks down at the Mandalay. 3382 02:04:03,420 --> 02:04:04,000 Oh, yeah, Wellington. 3383 02:04:04,080 --> 02:04:04,500 That's where I'm from. 3384 02:04:06,040 --> 02:04:06,320 So I look up where I was going to be speaking in a couple of weeks down at the Mandalay. 3385 02:04:06,320 --> 02:04:07,120 Mandalay Bay. 3386 02:04:07,320 --> 02:04:07,440 Yeah. 3387 02:04:07,820 --> 02:04:08,380 The hotel. 3388 02:04:08,540 --> 02:04:09,020 Down the road. 3389 02:04:09,760 --> 02:04:10,120 Stuff. 3390 02:04:10,340 --> 02:04:11,580 There is a reason for all this. 3391 02:04:11,760 --> 02:04:12,500 Right now, I'm not. 3392 02:04:12,520 --> 02:04:13,880 I'm just randomly browsing. 3393 02:04:14,160 --> 02:04:14,840 Yeah, I'm randomly browsing. 3394 02:04:15,260 --> 02:04:16,040 But there is a point. 3395 02:04:16,880 --> 02:04:17,240 Mandalay. 3396 02:04:17,420 --> 02:04:17,600 Oh, yeah. 3397 02:04:17,600 --> 02:04:17,880 Cool. 3398 02:04:18,000 --> 02:04:18,680 How do I get there? 3399 02:04:18,800 --> 02:04:19,980 Feel free to jump in, Carl. 3400 02:04:20,180 --> 02:04:20,580 Say something. 3401 02:04:20,640 --> 02:04:20,880 Yeah. 3402 02:04:20,880 --> 02:04:23,080 Notice all of these services are all Google services. 3403 02:04:23,420 --> 02:04:26,200 That will become relevant extremely in a few seconds. 3404 02:04:26,380 --> 02:04:26,560 Yeah. 3405 02:04:26,580 --> 02:04:27,620 I don't know why I was trying to get there from Spain. 3406 02:04:30,260 --> 02:04:31,300 A few more seconds. 3407 02:04:31,700 --> 02:04:32,180 But, yeah. 3408 02:04:32,380 --> 02:04:32,740 Yeah. 3409 02:04:32,820 --> 02:04:35,860 The important thing to remember about the video until it goes away is that 3410 02:04:35,860 --> 02:04:36,300 Yeah. 3411 02:04:36,320 --> 02:04:42,940 all the URLs that were visited are all public and are all running on Google's native host 3412 02:04:42,940 --> 02:04:43,540 cloud. 3413 02:04:43,820 --> 02:04:45,160 So it's all the same web server. 3414 02:04:45,660 --> 02:04:46,140 Yeah. 3415 02:04:46,280 --> 02:04:49,100 And this is an unmodified Chrome on an unmodified Windows. 3416 02:04:49,440 --> 02:04:50,040 There's nothing fancy. 3417 02:04:50,060 --> 02:04:50,800 Except, oh, shit. 3418 02:04:50,840 --> 02:04:51,580 TCP is blocked. 3419 02:04:51,840 --> 02:04:52,580 Like all of it. 3420 02:04:53,340 --> 02:04:54,280 Like completely. 3421 02:04:56,160 --> 02:04:58,040 So why does everything work? 3422 02:04:58,900 --> 02:04:59,380 Yeah. 3423 02:04:59,460 --> 02:05:00,180 Like what? 3424 02:05:03,880 --> 02:05:05,660 How does it work with TCP blocked? 3425 02:05:06,660 --> 02:05:09,580 Well, you'll probably find your browser's already doing this. 3426 02:05:09,720 --> 02:05:10,660 But we'll get to that in a moment. 3427 02:05:11,400 --> 02:05:12,600 Do you get the code working, Carl? 3428 02:05:14,000 --> 02:05:14,300 Maybe. 3429 02:05:15,240 --> 02:05:15,540 Maybe. 3430 02:05:15,780 --> 02:05:17,680 He's sitting there coding a demo as we stand here. 3431 02:05:17,780 --> 02:05:17,820 I know. 3432 02:05:17,840 --> 02:05:18,000 Right? 3433 02:05:18,060 --> 02:05:18,620 I mean, how hardcore? 3434 02:05:19,800 --> 02:05:20,100 Okay. 3435 02:05:20,100 --> 02:05:20,300 Okay. 3436 02:05:20,320 --> 02:05:21,780 So TCP was blocked. 3437 02:05:21,820 --> 02:05:22,280 What the hell? 3438 02:05:22,700 --> 02:05:26,280 I look at the PCAP and there's this quick thing. 3439 02:05:26,740 --> 02:05:27,040 What? 3440 02:05:28,420 --> 02:05:30,960 And it's got a whole lot of headers and crypto stuff. 3441 02:05:32,080 --> 02:05:33,480 And I have no idea what that is. 3442 02:05:33,540 --> 02:05:34,180 But we'll get to that later. 3443 02:05:35,220 --> 02:05:35,640 And, yeah. 3444 02:05:35,640 --> 02:05:36,560 And then I've got some other stuff. 3445 02:05:36,800 --> 02:05:37,560 Going to Facebook. 3446 02:05:39,200 --> 02:05:39,560 Okay. 3447 02:05:39,620 --> 02:05:40,140 So the wire. 3448 02:05:40,240 --> 02:05:41,080 So it's obviously encrypted. 3449 02:05:41,200 --> 02:05:41,860 Look at the SSL. 3450 02:05:42,520 --> 02:05:42,880 Yeah. 3451 02:05:42,940 --> 02:05:43,360 That doesn't help. 3452 02:05:44,020 --> 02:05:46,360 Then Wireshark does this decompressed header, whatever that is. 3453 02:05:46,440 --> 02:05:49,020 And electric breakfast. 3454 02:05:49,360 --> 02:05:49,720 Yeah. 3455 02:05:49,800 --> 02:05:52,260 I looked up and there's like a toaster collection thing on Facebook. 3456 02:05:53,080 --> 02:05:55,260 I found that kind of amusing and that was what I used for the example. 3457 02:05:55,380 --> 02:05:56,080 I don't know why. 3458 02:05:56,920 --> 02:05:58,840 But they have some really bling toasters. 3459 02:05:59,820 --> 02:06:00,340 All right. 3460 02:06:00,380 --> 02:06:02,540 So, again, doesn't make much sense. 3461 02:06:02,620 --> 02:06:03,240 It's a new protocol. 3462 02:06:03,320 --> 02:06:04,980 It's already live on all of these things. 3463 02:06:04,980 --> 02:06:09,580 So let's talk about some things that are already here. 3464 02:06:10,020 --> 02:06:12,520 Some transport protocols that are already making the world explode. 3465 02:06:13,200 --> 02:06:17,580 You know, everything's getting bigger, faster, more connections, more different places, moving 3466 02:06:17,580 --> 02:06:17,860 around. 3467 02:06:20,240 --> 02:06:23,620 So if you want to get trending stats, go to the HTTP archive. 3468 02:06:24,380 --> 02:06:26,120 They dump it all into Google BigQuery. 3469 02:06:26,500 --> 02:06:27,260 You pull it up. 3470 02:06:27,280 --> 02:06:27,880 You can query it. 3471 02:06:27,980 --> 02:06:32,600 And you can pull stuff like this, which shows you that, you know, your bytes and flow size 3472 02:06:32,600 --> 02:06:34,720 are all going up exponentially over the last few years. 3473 02:06:35,100 --> 02:06:37,180 The same with the number of domains, the number of requests. 3474 02:06:37,340 --> 02:06:37,900 It's all going up. 3475 02:06:39,420 --> 02:06:43,160 And the reason this is all happening is because, you know, we need all these better capabilities 3476 02:06:43,160 --> 02:06:43,940 to do things. 3477 02:06:44,980 --> 02:06:46,460 But there's a few different ways you can do it. 3478 02:06:46,600 --> 02:06:49,340 So HTTP2 multiplexes within TCP. 3479 02:06:50,060 --> 02:06:50,980 We'll get to that in a moment. 3480 02:06:51,360 --> 02:06:53,260 And Quirk just says, you know, I don't need TCP. 3481 02:06:53,480 --> 02:06:53,880 I'm doing this myself. 3482 02:06:55,740 --> 02:07:00,280 And, well, yeah, they change the way things work quite substantially, actually. 3483 02:07:00,840 --> 02:07:03,340 And the reason you care is because there's some familiar stuff, you know. 3484 02:07:03,720 --> 02:07:04,760 You can't see through it. 3485 02:07:04,760 --> 02:07:05,040 It's opaque. 3486 02:07:05,260 --> 02:07:06,040 You don't know what's going on. 3487 02:07:06,320 --> 02:07:07,380 That's what those teasers were. 3488 02:07:07,500 --> 02:07:08,700 But there's also some new stuff. 3489 02:07:09,740 --> 02:07:13,200 You know, some new fragmentation attacks, similar to multipath TCP. 3490 02:07:13,960 --> 02:07:18,220 And also, your network security right now probably has no idea what's going on. 3491 02:07:19,060 --> 02:07:22,440 And yet, to be clear, personally, I like these protocols. 3492 02:07:23,100 --> 02:07:26,760 They're more of a culture shock than a direct vulnerability or concern. 3493 02:07:28,160 --> 02:07:29,360 I actually want them to succeed. 3494 02:07:29,460 --> 02:07:32,420 Your stuff works a lot better and smoother when they're working. 3495 02:07:33,180 --> 02:07:34,380 But no one's ready. 3496 02:07:36,060 --> 02:07:40,620 And just because it's going to be always that one person, we're skipping ridiculous amounts of detail. 3497 02:07:41,300 --> 02:07:43,180 Go and read the RFCs if you want detail. 3498 02:07:43,400 --> 02:07:44,320 Or ask us afterwards. 3499 02:07:44,360 --> 02:07:45,000 Just don't be a dick. 3500 02:07:46,000 --> 02:07:47,140 We're skipping so much. 3501 02:07:47,180 --> 02:07:50,640 Two protocols, 25, 30 minutes, a lot of detail. 3502 02:07:51,280 --> 02:07:51,820 All right. 3503 02:07:51,840 --> 02:07:52,900 So how do we get here? 3504 02:07:52,940 --> 02:07:54,040 Why would these things come along? 3505 02:07:54,580 --> 02:07:55,660 These things have come along. 3506 02:07:57,740 --> 02:08:00,520 Multipath TCP, presented on that a few years ago. 3507 02:08:01,580 --> 02:08:04,200 Extended TCP to add multi-homing and mobility. 3508 02:08:04,200 --> 02:08:06,320 And link aggregation and all that. 3509 02:08:07,300 --> 02:08:08,900 But that never really took off. 3510 02:08:09,040 --> 02:08:12,360 Because if you're changing TCP, you need to have the OS involved. 3511 02:08:14,120 --> 02:08:16,480 And if you've got hardware, yeah, good luck changing that. 3512 02:08:16,960 --> 02:08:19,760 If you've got a router or a middle box in the way, it's going to screw with it as well. 3513 02:08:19,980 --> 02:08:22,880 So you're all right. 3514 02:08:22,980 --> 02:08:23,620 The demo works. 3515 02:08:25,940 --> 02:08:26,300 Oh! 3516 02:08:28,880 --> 02:08:30,440 Writing the demo in the talk. 3517 02:08:30,580 --> 02:08:30,900 Oh, yeah! 3518 02:08:31,220 --> 02:08:31,580 Oh! 3519 02:08:32,180 --> 02:08:32,540 Woo-hoo! 3520 02:08:34,280 --> 02:08:34,860 All right! 3521 02:08:37,020 --> 02:08:37,520 All right. 3522 02:08:37,520 --> 02:08:39,180 Who are we sacrificing to the demo god? 3523 02:08:41,820 --> 02:08:42,380 This guy? 3524 02:08:43,900 --> 02:08:44,680 Oh, I don't know. 3525 02:08:45,540 --> 02:08:47,260 Can we take a rain check from the demo god? 3526 02:08:47,500 --> 02:08:47,860 No. 3527 02:08:48,040 --> 02:08:48,400 No? 3528 02:08:48,440 --> 02:08:48,680 No. 3529 02:08:48,840 --> 02:08:49,400 All right. 3530 02:08:49,740 --> 02:08:50,100 Anyway. 3531 02:08:50,200 --> 02:08:51,740 And you know, your middle box is getting in the way. 3532 02:08:52,120 --> 02:08:53,520 And there's this whole chicken and egg deployment. 3533 02:08:53,700 --> 02:08:54,380 We will do that. 3534 02:08:54,460 --> 02:08:54,640 Don't worry. 3535 02:08:54,720 --> 02:08:55,300 We'll show you that. 3536 02:08:55,900 --> 02:09:00,880 There's this chicken and egg deployment thing where no one wants to support it until people are using it. 3537 02:09:00,880 --> 02:09:02,800 And no one wants to use it until it's supported. 3538 02:09:03,160 --> 02:09:04,180 And so nothing happens. 3539 02:09:05,660 --> 02:09:11,520 And what I mean is TCP doesn't do things like high availability, link aggregation, or multi-homing. 3540 02:09:13,500 --> 02:09:15,080 It's incapable of mesh networking. 3541 02:09:15,420 --> 02:09:16,840 And it's really, really chatty. 3542 02:09:17,580 --> 02:09:18,540 TCP is like, hi. 3543 02:09:18,800 --> 02:09:19,160 Hi. 3544 02:09:19,280 --> 02:09:19,640 Hi. 3545 02:09:19,680 --> 02:09:20,100 Do you want to talk? 3546 02:09:20,160 --> 02:09:20,560 Yeah, let's talk. 3547 02:09:20,660 --> 02:09:20,840 Great. 3548 02:09:21,060 --> 02:09:21,820 Let's just encrypt it. 3549 02:09:21,860 --> 02:09:21,960 Sure. 3550 02:09:22,040 --> 02:09:22,620 How do we do it encrypted? 3551 02:09:22,740 --> 02:09:22,880 Great. 3552 02:09:23,360 --> 02:09:26,600 And you've got so many round trips just to set up a conversation. 3553 02:09:27,500 --> 02:09:31,900 And until you've got through your greeting, TCP is not going anywhere. 3554 02:09:32,000 --> 02:09:34,420 It blocks until those retransmits are done. 3555 02:09:34,540 --> 02:09:35,760 It blocks until that handshake is done. 3556 02:09:36,120 --> 02:09:37,960 And that's really, really a problem. 3557 02:09:38,540 --> 02:09:40,800 So multipath TCP helps with those top four. 3558 02:09:41,360 --> 02:09:42,940 Quicken H2 helps with the bottom couple. 3559 02:09:43,780 --> 02:09:51,920 And there's a lot of talk in various places of Quik bringing in these capabilities of the top things into a user space network protocol. 3560 02:09:52,520 --> 02:09:55,560 So, you know, if this is stuff you want TCP to do, what? 3561 02:09:55,560 --> 02:09:57,840 And there are some reasons not to change TCP. 3562 02:09:58,880 --> 02:10:00,980 As earlier, you know, it's handshake. 3563 02:10:01,140 --> 02:10:02,120 You can't change that. 3564 02:10:03,740 --> 02:10:04,820 It's kernel mode. 3565 02:10:04,880 --> 02:10:05,520 It's outside user space. 3566 02:10:06,040 --> 02:10:06,740 It blocks. 3567 02:10:06,980 --> 02:10:07,840 You can't change that. 3568 02:10:07,960 --> 02:10:09,760 But if you can't change TCP, what do you do? 3569 02:10:10,100 --> 02:10:11,300 Well, HTTP. 3570 02:10:12,740 --> 02:10:13,960 Do you know anything that uses it? 3571 02:10:15,940 --> 02:10:16,340 Yes. 3572 02:10:16,500 --> 02:10:16,820 What? 3573 02:10:16,900 --> 02:10:17,760 I can't tell you. 3574 02:10:19,080 --> 02:10:19,900 It's a work thing. 3575 02:10:20,120 --> 02:10:20,460 Oh. 3576 02:10:20,800 --> 02:10:22,060 So you can't tell me on stage? 3577 02:10:22,440 --> 02:10:22,760 Correct. 3578 02:10:24,740 --> 02:10:25,320 All right. 3579 02:10:25,340 --> 02:10:25,540 All right. 3580 02:10:25,560 --> 02:10:26,680 I know things that use it. 3581 02:10:26,820 --> 02:10:29,220 But by and large, especially in the consumer space, nothing uses it. 3582 02:10:30,220 --> 02:10:33,400 It has the same problems as MPTCP, but even crazier. 3583 02:10:34,660 --> 02:10:35,700 Because MPTCP is TCP. 3584 02:10:36,180 --> 02:10:39,620 HTTP is a completely different layer. 3585 02:10:39,760 --> 02:10:40,760 And it just breaks everything. 3586 02:10:41,220 --> 02:10:42,280 If you don't have the app layer, well, sure. 3587 02:10:42,440 --> 02:10:43,420 That's what H2 and SPDY do. 3588 02:10:44,680 --> 02:10:45,680 UDP doesn't do anything. 3589 02:10:45,840 --> 02:10:46,580 Doesn't do anything at all. 3590 02:10:46,920 --> 02:10:47,980 Which is kind of the point. 3591 02:10:49,300 --> 02:10:50,580 And that's why Quik uses it. 3592 02:10:50,860 --> 02:10:52,060 So to sum up these journeys. 3593 02:10:54,200 --> 02:10:55,540 TCP attempted to change your model. 3594 02:10:55,540 --> 02:10:56,060 It's a multi-part TCP. 3595 02:10:56,280 --> 02:10:59,820 And for various reasons, they decided Quik was a better way to achieve some of those 3596 02:10:59,820 --> 02:11:00,060 goals. 3597 02:11:01,360 --> 02:11:05,340 And HTTP, to bring in some of these additions, they went to SPDY. 3598 02:11:05,600 --> 02:11:07,880 And that was what led to HTTP version 2. 3599 02:11:09,980 --> 02:11:11,100 Again, so what? 3600 02:11:11,400 --> 02:11:15,020 Well, have you looked at how many security tools support either of those? 3601 02:11:16,160 --> 02:11:16,600 Hint. 3602 02:11:17,520 --> 02:11:18,540 Cloudflare supports them. 3603 02:11:18,980 --> 02:11:22,680 But in terms of the security tool for your network, nothing. 3604 02:11:22,860 --> 02:11:23,480 Nothing much. 3605 02:11:23,480 --> 02:11:27,560 Cloudflare also can only see them on two ports and can't traverse Quik. 3606 02:11:27,960 --> 02:11:29,800 They don't actually support it. 3607 02:11:29,880 --> 02:11:31,480 They just detect it, kind of. 3608 02:11:31,600 --> 02:11:32,880 Well, they do serve it. 3609 02:11:32,880 --> 02:11:33,500 They serve it. 3610 02:11:33,760 --> 02:11:33,880 Yeah. 3611 02:11:34,920 --> 02:11:36,860 H2 in particular has served on quite a lot of things. 3612 02:11:36,960 --> 02:11:37,540 It's really unfortunate. 3613 02:11:38,320 --> 02:11:39,780 And so, yeah, that prevalence. 3614 02:11:40,260 --> 02:11:42,340 MPTCP came along really fast and then sort of choked. 3615 02:11:43,320 --> 02:11:46,540 Quik came along a lot faster because Google was pushing both client and server. 3616 02:11:47,140 --> 02:11:48,280 H2 was just crazy. 3617 02:11:49,380 --> 02:11:52,580 So Quik is already probably 10 or 15% of your network traffic. 3618 02:11:54,020 --> 02:11:56,420 Most YouTube traffic right now traverses Quik. 3619 02:11:58,160 --> 02:12:00,960 If you don't believe me, if you're not blocking UDP, go and look. 3620 02:12:01,980 --> 02:12:03,880 Whenever I get someone to, they're like, whoa, what? 3621 02:12:05,040 --> 02:12:07,060 And HTTP 2 has been even faster. 3622 02:12:07,220 --> 02:12:09,640 So MPTCP, you know, 50 million. 3623 02:12:09,700 --> 02:12:10,080 It's in iOS. 3624 02:12:10,300 --> 02:12:10,940 It's in MacOS. 3625 02:12:11,440 --> 02:12:13,100 A couple of ISPs have done some stuff. 3626 02:12:13,200 --> 02:12:13,920 Not too much. 3627 02:12:14,660 --> 02:12:17,520 You bring on Quik and you put Google in and suddenly you've got a hell of a lot more. 3628 02:12:18,340 --> 02:12:19,420 Probably understated a bit here. 3629 02:12:19,780 --> 02:12:20,400 A billion. 3630 02:12:20,460 --> 02:12:22,060 It's probably more like one and a half. 3631 02:12:23,100 --> 02:12:23,740 Something like that. 3632 02:12:23,760 --> 02:12:24,320 Something like that, yeah. 3633 02:12:24,680 --> 02:12:25,900 You bring on H2 though. 3634 02:12:26,000 --> 02:12:29,000 This is H2 over the last year for the Alexa top one million. 3635 02:12:32,980 --> 02:12:33,900 250,000 sites. 3636 02:12:34,880 --> 02:12:36,120 So let's go with this line here. 3637 02:12:36,720 --> 02:12:40,180 At least 15% of the top million Alexa sites are using this stuff. 3638 02:12:41,440 --> 02:12:42,320 Over the last year. 3639 02:12:42,420 --> 02:12:43,760 A year ago, no one was really using it. 3640 02:12:44,780 --> 02:12:45,560 And that's crazy. 3641 02:12:45,580 --> 02:12:48,420 When you bring in the client support, you're looking at two, three billion. 3642 02:12:50,020 --> 02:12:51,080 That's an awful lot of things. 3643 02:12:51,080 --> 02:12:52,800 It's about 6% of the internet. 3644 02:12:53,500 --> 02:12:54,720 It's bigger than IPv6. 3645 02:12:57,220 --> 02:13:00,640 Yeah, and if you bring that up to, you know, look at the top, call it 20. 3646 02:13:02,540 --> 02:13:07,880 Facebook, Google, Twitter, Wikipedia, Yahoo, YouTube, Instagram. 3647 02:13:08,480 --> 02:13:11,000 To be fair, there's a couple of companies overlapping. 3648 02:13:11,160 --> 02:13:14,520 But most of the biggest sites are using these and that's really quite surprising. 3649 02:13:16,280 --> 02:13:17,420 Anyway, what are these things? 3650 02:13:17,500 --> 02:13:18,020 How do they work? 3651 02:13:18,680 --> 02:13:20,440 I'm going to have a call for a moment and let my voice recover. 3652 02:13:22,140 --> 02:13:23,560 Or I'll jump in if you... 3653 02:13:25,280 --> 02:13:29,840 Yeah, there's a lot of black hat references here that are all supposed to scare you into why this is relevant. 3654 02:13:30,080 --> 02:13:33,120 But I'm not really feeling the need to go through these things at DEF CON. 3655 02:13:33,680 --> 02:13:34,400 Oh, cool. 3656 02:13:34,640 --> 02:13:35,260 All right. 3657 02:13:35,500 --> 02:13:36,740 There's a lot of common features. 3658 02:13:37,380 --> 02:13:39,020 Multiplex requests, which we'll get to in a minute. 3659 02:13:39,140 --> 02:13:42,060 Priority requests, which are frames and things. 3660 02:13:42,280 --> 02:13:42,980 Okay, fun stuff. 3661 02:13:43,340 --> 02:13:44,520 So, all right. 3662 02:13:44,960 --> 02:13:50,260 The way that connections in general work for pretty much every protocol on the planet right now is, 3663 02:13:50,260 --> 02:13:52,080 like, the Internet is a series of tubes. 3664 02:13:53,860 --> 02:13:56,820 Usually a TCP tube, but a tube. 3665 02:13:57,420 --> 02:14:01,760 And what that actually looks like is more like this because the tubes are full of packets. 3666 02:14:02,220 --> 02:14:06,400 So, the analogy that I use is pint glasses. 3667 02:14:06,560 --> 02:14:10,420 Think of pint glasses with grains of sand where each grain of sand is a different color. 3668 02:14:11,140 --> 02:14:14,740 And usually, if you want to get five pint glasses from one bar to another, 3669 02:14:14,960 --> 02:14:17,440 you have to have five different garden hoses to pour it down through. 3670 02:14:17,860 --> 02:14:18,380 All right. 3671 02:14:18,380 --> 02:14:24,400 Well, multiplexing is when you have one garden hose and you pour all of those jars into one thing 3672 02:14:24,400 --> 02:14:29,380 and then you have a magic robot on the other side that splits everything into the same five glasses. 3673 02:14:30,200 --> 02:14:34,180 So, that means you create one connection and then you give everything a magic ID in the middle 3674 02:14:34,180 --> 02:14:35,400 and it all comes out fine. 3675 02:14:37,800 --> 02:14:47,440 So, what this looks like in terms of differences is that so with H1 on a typical TLS browser setup, 3676 02:14:47,440 --> 02:14:51,260 you have a TCP connection, you negotiate TLS over that TCP connection, 3677 02:14:51,540 --> 02:14:54,040 and then you send a plain text request, you get a plain text response. 3678 02:14:56,100 --> 02:15:02,720 With H2, you have a single connection and then there's a software-level tracking of this magic number called streams. 3679 02:15:03,180 --> 02:15:06,800 And you can kind of do whatever you want in each stream. 3680 02:15:06,980 --> 02:15:12,540 You send a series of frames and those frames tell it, give me bytes or reset this stream or... 3681 02:15:12,540 --> 02:15:14,940 A stream is analogous to an HTTP connection. 3682 02:15:16,740 --> 02:15:17,220 Basically. 3683 02:15:17,440 --> 02:15:17,700 Yeah. 3684 02:15:18,820 --> 02:15:19,600 You wanna... 3685 02:15:19,600 --> 02:15:21,740 Nah, it's more black-out stuff, but sure, why not? 3686 02:15:23,280 --> 02:15:24,740 HTTP, you know, we know about that. 3687 02:15:24,900 --> 02:15:26,280 H2, fun things. 3688 02:15:26,440 --> 02:15:27,100 Binary framing. 3689 02:15:27,440 --> 02:15:28,600 Not human-readable anymore. 3690 02:15:29,600 --> 02:15:30,040 Multiplexed. 3691 02:15:30,180 --> 02:15:31,440 It's no longer linear. 3692 02:15:33,200 --> 02:15:38,060 Prioritize, which is particularly fun because you can request things and they can come through in a bizarre order. 3693 02:15:38,980 --> 02:15:40,380 Compressed in a very stateful way. 3694 02:15:40,500 --> 02:15:43,600 And server-pushed, where the server will send you things you never asked for. 3695 02:15:45,920 --> 02:15:47,180 There'll be dragons there. 3696 02:15:47,440 --> 02:15:48,220 Oh, yeah. 3697 02:15:48,880 --> 02:15:50,580 Some dragons coming for your face. 3698 02:15:52,840 --> 02:15:53,200 Yeah. 3699 02:15:53,880 --> 02:15:57,260 So, H2, you know, you got your transport layer, which has some number of frames. 3700 02:15:57,520 --> 02:15:59,400 And each of those frames has a header and a payload. 3701 02:15:59,820 --> 02:16:01,800 And there's a few of them, you know... 3702 02:16:01,800 --> 02:16:02,400 All right, cool. 3703 02:16:03,700 --> 02:16:07,000 And if you start breaking that down a bit more, your frame with your header then has 3704 02:16:07,000 --> 02:16:07,420 a payload. 3705 02:16:07,900 --> 02:16:11,180 And that payload itself has various other headers and type fields. 3706 02:16:11,380 --> 02:16:12,860 You know, it's nesting and nesting and nesting. 3707 02:16:12,960 --> 02:16:14,620 You know, this is a dragon's nest. 3708 02:16:15,320 --> 02:16:15,680 Yeah. 3709 02:16:15,900 --> 02:16:16,260 Yeah. 3710 02:16:16,280 --> 02:16:16,440 Yeah. 3711 02:16:16,500 --> 02:16:17,040 All of... 3712 02:16:17,040 --> 02:16:17,420 All of your... 3713 02:16:17,420 --> 02:16:19,240 All of these boxes are all binary frames, by the way. 3714 02:16:19,340 --> 02:16:20,880 So, yay binary parsing. 3715 02:16:21,100 --> 02:16:21,680 And it gets deeper. 3716 02:16:21,880 --> 02:16:22,740 You know, we need to go deeper. 3717 02:16:25,560 --> 02:16:29,600 And this is probably one of the slides that I probably should never have built in PowerPoint. 3718 02:16:30,100 --> 02:16:32,220 You know, you've got a transport layer with a stream. 3719 02:16:32,400 --> 02:16:35,280 That stream is bidirectional and it has some frames sitting upon it. 3720 02:16:35,440 --> 02:16:36,820 And those frames have all that other stuff. 3721 02:16:37,380 --> 02:16:39,660 And there's a whole lot of frames on each direction. 3722 02:16:40,280 --> 02:16:41,780 And then a whole lot of streams with frames. 3723 02:16:44,100 --> 02:16:44,460 Like... 3724 02:16:44,460 --> 02:16:45,100 Whoa. 3725 02:16:46,160 --> 02:16:47,360 Try and parse this manually. 3726 02:16:47,480 --> 02:16:48,580 You're going to have a really bad time. 3727 02:16:48,920 --> 02:16:49,200 Go on. 3728 02:16:50,860 --> 02:16:51,480 Langsec nightmare. 3729 02:16:51,960 --> 02:16:52,280 Yeah. 3730 02:16:52,320 --> 02:16:52,940 Langsec nightmare. 3731 02:16:53,140 --> 02:16:53,900 You should get to the quick stuff. 3732 02:16:54,120 --> 02:16:54,640 Get to the quick stuff. 3733 02:16:54,780 --> 02:16:54,960 All right. 3734 02:16:57,680 --> 02:16:58,320 So, there's... 3735 02:16:58,320 --> 02:17:01,180 It does some advertisement to know it supports this. 3736 02:17:01,340 --> 02:17:02,940 We can go through those questions if anyone has it. 3737 02:17:03,940 --> 02:17:09,880 So, H2 sets up with HTTP2 and Prism, which, if you look at it, is actually a Snowden joke. 3738 02:17:12,080 --> 02:17:14,320 There's chatter on the mailing list for why they came up with Prism. 3739 02:17:14,360 --> 02:17:14,640 Was... 3740 02:17:14,640 --> 02:17:15,080 I don't know. 3741 02:17:15,080 --> 02:17:16,580 They're like, well, we can choose anything. 3742 02:17:16,740 --> 02:17:17,260 We want to do that. 3743 02:17:18,780 --> 02:17:21,140 You know, frames, fixed length header, binary protocol. 3744 02:17:22,220 --> 02:17:23,420 And there's your types of frames. 3745 02:17:24,900 --> 02:17:27,780 I guess that does matter because we do reference a few of them, but I'm not going to go into 3746 02:17:27,780 --> 02:17:28,020 detail. 3747 02:17:28,520 --> 02:17:28,800 Yeah. 3748 02:17:28,880 --> 02:17:32,700 The only thing that's worth immediately taking away from this slide technically is the fact 3749 02:17:32,700 --> 02:17:37,640 that if you talk to any server on the internet that is currently implementing H2 right now 3750 02:17:37,640 --> 02:17:41,660 and you change the order of these frames in accordance with the implementation of the 3751 02:17:41,660 --> 02:17:43,580 spec, they don't all answer the same way. 3752 02:17:44,240 --> 02:17:45,000 So, yeah. 3753 02:17:45,060 --> 02:17:48,220 H2 is everywhere, but it's still a relatively young protocol, and we're already starting 3754 02:17:48,220 --> 02:17:53,720 to see deviations in implementation in the way that they handle the order of frames and 3755 02:17:53,720 --> 02:17:54,880 what their immediate response is. 3756 02:17:55,440 --> 02:17:55,880 Yeah. 3757 02:17:56,000 --> 02:18:00,260 Some of them will send you an update or settings or a ping at different intervals and different 3758 02:18:00,260 --> 02:18:00,620 orders. 3759 02:18:00,960 --> 02:18:01,280 And, yeah. 3760 02:18:01,360 --> 02:18:02,160 You can fingerprint with that. 3761 02:18:04,160 --> 02:18:09,360 Headers are compressed with Huffman encoding, which is actually really interesting as far 3762 02:18:09,360 --> 02:18:10,320 as encoding goes. 3763 02:18:10,560 --> 02:18:12,460 You've got a static table of things you see regularly. 3764 02:18:12,620 --> 02:18:14,880 You know, your get methods, your user agents, all of that. 3765 02:18:15,240 --> 02:18:21,360 Rather than sending user agents, Chrome, whatever, it's just like 12 because you've got the 3766 02:18:21,360 --> 02:18:21,600 table. 3767 02:18:22,120 --> 02:18:24,840 And a dynamic table, which builds up as you go through the connection. 3768 02:18:26,020 --> 02:18:27,440 And this is fully stateful. 3769 02:18:27,480 --> 02:18:29,020 You can't jump in the middle and make any sense of this. 3770 02:18:29,780 --> 02:18:30,460 Fun pitfalls. 3771 02:18:30,700 --> 02:18:32,000 And this is yours. 3772 02:18:33,560 --> 02:18:34,060 Connection reuse. 3773 02:18:36,440 --> 02:18:39,700 I kind of don't even want to give all this away yet because the demo is going to be a 3774 02:18:39,700 --> 02:18:39,920 All right. 3775 02:18:40,000 --> 02:18:41,400 Do you want to skip into the demo? 3776 02:18:41,540 --> 02:18:41,740 Yeah. 3777 02:18:42,000 --> 02:18:42,440 All right. 3778 02:18:42,440 --> 02:18:42,520 All right. 3779 02:18:42,760 --> 02:18:44,580 So how about I just jump to QUIC and we can always come back. 3780 02:18:44,860 --> 02:18:45,080 All right. 3781 02:18:45,100 --> 02:18:48,180 QUIC takes H2 stuff, adds in more stuff. 3782 02:18:49,060 --> 02:18:52,700 The thing about QUIC is it combines your TLS and your transport protocol together. 3783 02:18:54,060 --> 02:18:59,760 So where H2 does this and has the common layer underneath, with QUIC, the top bit looks 3784 02:18:59,760 --> 02:19:00,600 the same from the app. 3785 02:19:01,860 --> 02:19:07,460 However, QUIC with TLS integrated over UDP, but your streams go all the way down. 3786 02:19:08,300 --> 02:19:10,500 You put an H2 frame, it goes into a QUIC frame. 3787 02:19:10,660 --> 02:19:10,840 All right. 3788 02:19:12,460 --> 02:19:14,280 So you've got your transport line managers, your app layer stuff. 3789 02:19:16,900 --> 02:19:19,520 Much the same as H2. 3790 02:19:19,920 --> 02:19:22,920 Skipping ahead because that is a cool demo and we didn't have that last time. 3791 02:19:23,300 --> 02:19:24,460 We didn't have it 10 minutes ago. 3792 02:19:26,080 --> 02:19:26,880 Yeah, that's... 3793 02:19:26,880 --> 02:19:27,240 All right. 3794 02:19:27,680 --> 02:19:29,020 QUIC has a couple of fun things. 3795 02:19:29,220 --> 02:19:30,320 Zero round trip time. 3796 02:19:30,900 --> 02:19:33,040 So it can actually start sending data with the first packet. 3797 02:19:34,640 --> 02:19:35,360 No latency. 3798 02:19:36,480 --> 02:19:38,660 It pads stuff out so you can't do Oracle attacks. 3799 02:19:39,260 --> 02:19:40,160 Forward error correction. 3800 02:19:40,160 --> 02:19:41,000 Disabled it. 3801 02:19:41,060 --> 02:19:41,520 Just to annoy me. 3802 02:19:41,760 --> 02:19:42,780 And multi-path. 3803 02:19:43,040 --> 02:19:44,200 But that's a whole other bundle of crazy. 3804 02:19:44,500 --> 02:19:49,420 So as with H2, you've got a connection with some number of streams and a packet. 3805 02:19:51,020 --> 02:19:54,880 A packet contains frame packets and those frame packets contain frames. 3806 02:19:56,000 --> 02:19:56,440 Dragons. 3807 02:19:57,960 --> 02:19:58,520 All right. 3808 02:19:58,520 --> 02:19:59,140 Bring up one of those again. 3809 02:19:59,220 --> 02:20:04,180 You've got a UDP packet which contains a public header and authenticated and encrypted data. 3810 02:20:05,060 --> 02:20:08,100 And inside there, you've got a private header and some frame packets with frames. 3811 02:20:08,760 --> 02:20:10,000 You can read that top bit. 3812 02:20:10,000 --> 02:20:10,460 You can read it without a key. 3813 02:20:10,800 --> 02:20:11,780 You need a key for that. 3814 02:20:13,740 --> 02:20:18,520 So QUIC is actually really annoying to try and make sense of even with an encryption key. 3815 02:20:20,840 --> 02:20:22,380 Advertisement is much the same way as with H2. 3816 02:20:22,520 --> 02:20:23,620 So what can you do with these things? 3817 02:20:23,840 --> 02:20:24,840 Well, H2, always encrypted. 3818 02:20:25,280 --> 02:20:26,440 Binary frame, blah, blah, blah. 3819 02:20:27,460 --> 02:20:28,440 Really complex state. 3820 02:20:28,620 --> 02:20:29,520 Whole lot of side channels. 3821 02:20:30,920 --> 02:20:31,640 QUIC, encrypted. 3822 02:20:32,160 --> 02:20:33,520 Really annoying to try and man in the middle. 3823 02:20:34,000 --> 02:20:34,620 User space. 3824 02:20:35,320 --> 02:20:36,780 You don't need any else help on that. 3825 02:20:38,820 --> 02:20:43,860 Doesn't require a socket because it's UDP, which some of you will be able to work out the applications of that. 3826 02:20:43,980 --> 02:20:47,020 And it's a real pain to fingerprint because it's variable length. 3827 02:20:47,600 --> 02:20:48,000 Yeah. 3828 02:20:48,100 --> 02:20:57,060 I'm pretty sure we built the best QUIC fingerprinter in the world as a demo because it turns out everything that claims to fingerprint QUIC sucks at it. 3829 02:20:57,360 --> 02:20:57,760 Yeah. 3830 02:20:57,860 --> 02:21:01,100 It really just listens on 80 and 443 and goes, is that UDP? 3831 02:21:01,280 --> 02:21:01,520 All right. 3832 02:21:01,540 --> 02:21:02,240 It's probably QUIC. 3833 02:21:02,240 --> 02:21:02,940 It tries to parse it. 3834 02:21:03,700 --> 02:21:04,480 It does. 3835 02:21:04,540 --> 02:21:06,400 Like you laugh, but it really is that lame. 3836 02:21:06,400 --> 02:21:07,600 You look at the code and it's like, really? 3837 02:21:08,360 --> 02:21:09,560 Oh, it's not 80 and 443. 3838 02:21:12,300 --> 02:21:13,000 There's no tools. 3839 02:21:13,800 --> 02:21:16,580 It's faster and more reliable than TCP over UDP. 3840 02:21:17,740 --> 02:21:18,060 Yeah. 3841 02:21:18,220 --> 02:21:19,240 We're not doing any implementation stuff. 3842 02:21:19,480 --> 02:21:19,600 Okay. 3843 02:21:19,700 --> 02:21:19,980 All right. 3844 02:21:20,020 --> 02:21:21,920 First demo because this is what you want to actually get to. 3845 02:21:22,040 --> 02:21:22,280 All right. 3846 02:21:24,460 --> 02:21:25,100 Two microphones. 3847 02:21:25,320 --> 02:21:25,420 Woo! 3848 02:21:27,180 --> 02:21:29,420 So, what we've got here is an H2 tunnel in. 3849 02:21:30,200 --> 02:21:30,840 Over QUIC. 3850 02:21:31,520 --> 02:21:32,260 An H2 out. 3851 02:21:32,800 --> 02:21:34,580 And why you should care about that? 3852 02:21:34,700 --> 02:21:35,480 Well, we'll get to that. 3853 02:21:36,060 --> 02:21:36,380 So, what we've got here is an H2 tunnel in. 3854 02:21:52,480 --> 02:21:53,120 An H2 tunnel in. 3855 02:21:53,120 --> 02:21:53,360 And what we've got here is an H2 tunnel in. 3856 02:21:53,360 --> 02:21:53,660 We're going to look at this for a second. 3857 02:21:53,840 --> 02:21:55,780 So, what we've got here is an H2 tunnel in. 3858 02:21:55,780 --> 02:21:55,940 And then, in a little bit, we're going to go down through the H2 tunnel. 3859 02:21:55,940 --> 02:21:56,020 So, we're going to have to build it and we're going to look at the H2 tunnel. 3860 02:21:56,020 --> 02:21:56,220 So, let's see. 3861 02:21:56,220 --> 02:21:56,380 Let's get a couple more. 3862 02:21:56,380 --> 02:21:56,400 Let's see. 3863 02:21:56,540 --> 02:21:56,840 Here. 3864 02:21:58,720 --> 02:21:59,040 Where is it? 3865 02:21:59,100 --> 02:21:59,420 Wait a second. 3866 02:21:59,420 --> 02:22:00,740 Oh, there's one here. 3867 02:22:00,980 --> 02:22:03,020 So, I just want to go over to the . 3868 02:22:07,340 --> 02:22:11,360 uh okay well i don't know how i'm going to show you a demo if the projector doesn't like my laptop 3869 02:22:11,360 --> 02:22:19,720 that kind of what you say press alt nf5 it's a linux laptop yeah 3870 02:22:25,540 --> 02:22:28,620 try different don't nope nope 3871 02:22:30,620 --> 02:22:40,120 yeah i don't i don't have that that's that's not a thing all right science 3872 02:22:50,540 --> 02:22:52,640 i did actually i restarted x 3873 02:22:58,840 --> 02:23:04,000 no because google didn't make their libraries work with the real operating system so blame google 3874 02:23:10,300 --> 02:23:11,620 uh seriously 3875 02:23:15,380 --> 02:23:22,140 oh uh yeah all right because that's my background 3876 02:23:23,560 --> 02:23:24,220 why 3877 02:23:24,220 --> 02:23:28,460 because occasionally i take this box to 3878 02:23:28,460 --> 02:23:28,600 climb 3879 02:23:28,620 --> 02:23:32,480 lands and i like to not get screamed out all right all right all right all right all right 3880 02:23:35,560 --> 02:23:42,900 so i'm gonna give you a terminal to look at as soon as i figure out how to how to computer 3881 02:23:43,420 --> 02:23:51,380 all right all right never mind the numbers on the top um so you guys remember the the diagram that 3882 02:23:51,380 --> 02:23:57,040 you saw earlier where it was a h1 to quick uh diagram on one side and then a quick to h1 diagram 3883 02:23:57,040 --> 02:23:58,300 on the other uh so 3884 02:23:58,300 --> 02:24:03,240 the way i've implemented that is as two standalone binaries so there's a binary with a go web server 3885 02:24:03,740 --> 02:24:09,280 which is a transparent a complete one-to-one http proxy so it doesn't handle all the http verbs and 3886 02:24:09,280 --> 02:24:14,520 all that stuff that is implementable normally under a go context but again google writes code 3887 02:24:15,140 --> 02:24:20,460 so if you try to do that idiomatically it'll laugh at you and say the connect header makes no sense 3888 02:24:20,460 --> 02:24:25,120 so instead we got two binaries so what i'm about to do when i set the microphone down so i can type 3889 02:24:25,120 --> 02:24:32,400 is I will initiate one binary which I'll initiate one binary which will start the 3890 02:24:32,400 --> 02:24:35,580 h1 server that will actually talk to and I'll give it a dial back address the 3891 02:24:35,580 --> 02:24:40,120 dial back address is gonna be localhost port and the secondary server the 3892 02:24:40,120 --> 02:24:44,580 secondary server is gonna have a quick server and then an h1 dial back which is 3893 02:24:44,580 --> 02:24:47,860 gonna be the endpoint in this case what I'm gonna do is set that endpoint to 3894 02:24:47,860 --> 02:24:52,620 dial back to Metasploit so I have a VM we're gonna load a VM and then we're 3895 02:24:52,620 --> 02:24:58,880 gonna PS exec and instead of the PS exec payload calling back to a native 3896 02:24:58,880 --> 02:25:02,940 Metasploit listener it's gonna be calling back to an h1 tube that speaks 3897 02:25:02,940 --> 02:25:06,460 quick in the middle and with Wireshark running I will show you what it looks 3898 02:25:06,460 --> 02:25:07,940 like which is basically fuck all 3899 02:25:22,620 --> 02:25:24,280 h1 to quick 3900 02:25:58,960 --> 02:26:01,020 so this is the entry to the tunnel 3901 02:26:07,300 --> 02:26:10,220 so now we have the entry server running so now we're gonna start the other one 3902 02:26:10,820 --> 02:26:11,220 you 3903 02:26:22,620 --> 02:26:28,620 notice how this binary has more options that's because you have to use SSL when 3904 02:26:28,620 --> 02:26:32,600 you use quick it's not optional on h2 it's technically not optional as well 3905 02:26:32,600 --> 02:26:36,660 but they have an h2 variant called h2c which doesn't require SSL yeah because 3906 02:26:36,660 --> 02:26:40,580 quick mixes in your TLS well your crypto with your transport layer you 3907 02:26:40,580 --> 02:26:41,980 can't set up transport without crypto 3908 02:26:52,620 --> 02:26:52,800 you 3909 02:26:52,800 --> 02:26:54,100 you 3910 02:26:56,840 --> 02:26:58,240 yeah 3911 02:27:02,760 --> 02:27:03,460 yeah 3912 02:27:03,460 --> 02:27:05,660 you 3913 02:27:05,660 --> 02:27:05,880 you 3914 02:27:05,880 --> 02:27:08,100 do 3915 02:27:21,900 --> 02:27:22,600 you 3916 02:27:33,800 --> 02:27:37,900 Alright, so now we have our Metasploit listener, and I'm just doing this so that we can see 3917 02:27:37,900 --> 02:27:38,660 where the listener is. 3918 02:27:39,980 --> 02:27:47,880 And now, as soon as we start the VM, and as soon as I start the second server, then I'll 3919 02:27:47,880 --> 02:27:49,480 do the VM callback and everything will make sense. 3920 02:28:36,740 --> 02:28:38,380 This is how you be credible, you do it live. 3921 02:28:39,720 --> 02:28:43,700 We could have done this in the video, but then the video wouldn't play, and yeah, well 3922 02:28:43,700 --> 02:28:44,280 no we did, but. 3923 02:28:45,920 --> 02:28:47,860 The next demo will be far, far more interesting. 3924 02:28:47,860 --> 02:28:49,240 And more nefarious. 3925 02:28:51,760 --> 02:28:55,020 When you see the packet capture for this, you'll understand. 3926 02:29:05,260 --> 02:29:13,840 Where's my front end tube, my front end tube is 8.8, 8.8, hang on, sorry, gonna wrap my 3927 02:29:13,840 --> 02:29:14,700 brain around my own demo. 3928 02:29:15,700 --> 02:29:16,260 Um. 3929 02:29:20,100 --> 02:29:21,300 Okay, yeah, I did that wrong. 3930 02:29:22,440 --> 02:29:23,320 That's supposed to be. 3931 02:29:23,600 --> 02:29:25,320 Yeah, so we set the port wrong, we're just fixing that. 3932 02:29:29,400 --> 02:29:29,760 Oh. 3933 02:29:32,840 --> 02:29:33,560 4.1. 3934 02:29:35,200 --> 02:29:40,760 And then this is. 3935 02:29:45,440 --> 02:29:47,840 Funneling back to 88.3. 3936 02:29:51,880 --> 02:29:54,240 I'm still typing, I need a hand. 3937 02:30:02,540 --> 02:30:04,260 I think next time we should mirror your screen. 3938 02:30:05,800 --> 02:30:07,440 Well, we didn't plan on this demo, remember? 3939 02:30:07,660 --> 02:30:08,140 Oh, yeah. 3940 02:30:08,380 --> 02:30:08,620 That's what happens. 3941 02:30:09,840 --> 02:30:11,500 We didn't plan on this demo at all. 3942 02:30:14,720 --> 02:30:15,240 That's fine. 3943 02:30:19,080 --> 02:30:23,480 And this code's all available for you to play with yourself, so pay attention to what we're doing. 3944 02:30:24,320 --> 02:30:24,880 All right. 3945 02:30:27,800 --> 02:30:29,180 Now I've got to go to my VM. 3946 02:30:29,820 --> 02:30:31,420 All right, so we've opened up the tunnel. 3947 02:30:32,000 --> 02:30:33,740 It will take what goes in and send it out. 3948 02:30:35,380 --> 02:30:38,100 If I can remember where the heck I put my VM. 3949 02:30:40,520 --> 02:30:42,180 You're not an enterprise, how do you lose a VM? 3950 02:30:45,240 --> 02:30:46,460 Lose VMs all the time. 3951 02:30:47,460 --> 02:30:48,480 VMs all the way down? 3952 02:30:51,420 --> 02:30:51,980 Demo. 3953 02:30:51,980 --> 02:30:53,460 Demo VM, probably a good start. 3954 02:30:59,060 --> 02:31:03,000 Good old Microsoft browser test VMs, really handy. 3955 02:31:05,560 --> 02:31:06,860 All right, one VM. 3956 02:31:11,880 --> 02:31:13,000 One VM. 3957 02:31:13,000 --> 02:31:15,020 All right. 3958 02:31:23,860 --> 02:31:28,300 All right, so there's our password, and just to make sure we know what the IP is. 3959 02:31:32,020 --> 02:31:35,340 All right, so there's our IP, 0.29. 3960 02:31:40,340 --> 02:31:41,380 0.29. 3961 02:31:41,560 --> 02:31:43,040 How are you? 3962 02:31:51,980 --> 02:31:54,500 So we're PSExec-ing through the binary. 3963 02:31:58,540 --> 02:31:59,560 Oh, damn it. 3964 02:32:03,240 --> 02:32:04,220 God damn it. 3965 02:32:07,480 --> 02:32:08,540 Reverse HTTP. 3966 02:32:11,120 --> 02:32:12,400 Interpreter, reverse HTTP. 3967 02:32:13,120 --> 02:32:13,740 HTTP. 3968 02:32:14,280 --> 02:32:14,980 Arho. 3969 02:32:16,540 --> 02:32:17,100 Pера. 3970 02:32:23,480 --> 02:32:24,040 Pera. 3971 02:32:24,040 --> 02:32:24,620 Too many donts. 3972 02:32:26,400 --> 02:32:28,020 What was my IP again? 3973 02:32:28,220 --> 02:32:28,860 0.29. 3974 02:32:29,240 --> 02:32:29,500 0.29. 3975 02:32:30,300 --> 02:32:31,100 0.29. 3976 02:32:32,620 --> 02:32:33,440 All right. 3977 02:32:35,120 --> 02:32:36,780 So, it's an user. 3978 02:32:37,720 --> 02:32:38,840 My user. 3979 02:32:39,400 --> 02:32:40,300 So, let's see. 3980 02:32:41,220 --> 02:32:41,780 Host. 3981 02:32:42,220 --> 02:32:42,780 Host. 3982 02:32:43,040 --> 02:32:43,160 Host. 3983 02:32:43,160 --> 02:32:43,360 Host. 3984 02:32:43,360 --> 02:32:43,600 Host. 3985 02:32:43,600 --> 02:32:43,620 Host. 3986 02:32:43,840 --> 02:32:44,360 Host. 3987 02:32:44,360 --> 02:32:44,380 Host. 3988 02:32:44,660 --> 02:32:45,220 Host. 3989 02:33:02,940 --> 02:33:05,480 So now I'm going to start Wireshark. 3990 02:33:15,260 --> 02:33:16,340 And go away. 3991 02:33:18,180 --> 02:33:20,960 We're going to go down to localhost. 3992 02:33:23,500 --> 02:33:25,260 And that's going to show us a bunch of stuff. 3993 02:33:26,500 --> 02:33:29,520 And now, if I didn't screw anything up... 3994 02:33:38,540 --> 02:33:39,140 What'd I do? 3995 02:33:47,880 --> 02:33:49,120 I did something wrong. 3996 02:33:49,320 --> 02:33:50,200 You're listening. 3997 02:33:50,480 --> 02:33:50,680 Which one? 3998 02:33:54,220 --> 02:33:54,700 Where? 3999 02:33:58,860 --> 02:33:59,920 No, that's right. 4000 02:34:04,200 --> 02:34:04,880 No, it's not. 4001 02:34:06,180 --> 02:34:07,460 It's on 8888. 4002 02:34:08,020 --> 02:34:08,500 Yeah. 4003 02:34:08,560 --> 02:34:09,660 That's what it's supposed to be on. 4004 02:34:13,680 --> 02:34:14,740 That's about to be it. 4005 02:34:15,600 --> 02:34:16,120 What'd you do? 4006 02:34:17,320 --> 02:34:18,000 I don't know. 4007 02:34:19,020 --> 02:34:20,620 Anyone else seen what we did wrong? 4008 02:34:23,560 --> 02:34:23,940 No. 4009 02:34:25,760 --> 02:34:26,520 Oh, sorry. 4010 02:34:26,720 --> 02:34:27,340 I know what I did. 4011 02:34:27,440 --> 02:34:27,960 I know what I did. 4012 02:34:28,020 --> 02:34:28,380 I'm stupid. 4013 02:34:31,760 --> 02:34:35,540 There we go. 4014 02:34:36,760 --> 02:34:37,280 Oh, yeah. 4015 02:34:37,340 --> 02:34:37,620 That. 4016 02:34:40,200 --> 02:34:40,760 All right. 4017 02:34:41,000 --> 02:34:41,920 Still did something wrong. 4018 02:34:43,260 --> 02:34:43,900 But, okay. 4019 02:34:44,640 --> 02:34:45,060 There we go. 4020 02:34:45,060 --> 02:34:45,220 There's our... 4021 02:34:45,240 --> 02:34:45,640 Our request. 4022 02:34:46,320 --> 02:34:48,240 Our request went back to... 4023 02:34:52,080 --> 02:34:52,460 Oh. 4024 02:34:53,680 --> 02:34:56,000 So, we should have sacrificed that person to demo gods. 4025 02:34:57,620 --> 02:34:58,160 It's cool. 4026 02:34:58,320 --> 02:34:59,100 We'll figure it out. 4027 02:34:59,600 --> 02:35:00,600 Yeah, we'll figure it out. 4028 02:35:01,900 --> 02:35:02,800 Okay, I know what I did. 4029 02:35:03,080 --> 02:35:03,560 What'd you do? 4030 02:35:04,220 --> 02:35:05,960 I sent the listener to the wrong port. 4031 02:35:06,240 --> 02:35:06,600 Yep. 4032 02:35:15,240 --> 02:35:16,060 Oh, yeah. 4033 02:35:18,120 --> 02:35:19,020 All right. 4034 02:35:20,900 --> 02:35:22,080 Take three. 4035 02:35:25,740 --> 02:35:26,460 Something... 4036 02:35:27,400 --> 02:35:28,480 Something whatever. 4037 02:35:30,940 --> 02:35:32,380 All right. 4038 02:35:32,400 --> 02:35:33,260 So, let's look at this. 4039 02:35:36,860 --> 02:35:38,840 You know, 443 and 8881 out. 4040 02:35:40,100 --> 02:35:41,240 Oh, computers. 4041 02:35:42,380 --> 02:35:43,100 Computers. 4042 02:35:48,160 --> 02:35:49,560 It's calling back to the right place. 4043 02:35:50,880 --> 02:35:51,520 It's on zero. 4044 02:35:51,680 --> 02:35:52,540 Not 127. 4045 02:35:53,700 --> 02:35:55,040 It should still bind, though. 4046 02:35:58,280 --> 02:35:59,440 It's supposed to be on zero. 4047 02:36:02,040 --> 02:36:03,040 Why is my mouse not working? 4048 02:36:03,040 --> 02:36:03,320 Wait, wait, wait. 4049 02:36:03,420 --> 02:36:03,780 445. 4050 02:36:04,040 --> 02:36:04,540 Go back. 4051 02:36:05,920 --> 02:36:06,560 Right up top. 4052 02:36:07,520 --> 02:36:08,840 Oh, did I enter the wrong number? 4053 02:36:08,920 --> 02:36:09,300 Yeah, go back. 4054 02:36:09,940 --> 02:36:10,600 Go back to where? 4055 02:36:10,840 --> 02:36:11,260 Mid-sport. 4056 02:36:11,520 --> 02:36:12,060 That's normal. 4057 02:36:12,240 --> 02:36:12,700 That's normal. 4058 02:36:12,820 --> 02:36:13,720 That's the thing. 4059 02:36:13,940 --> 02:36:14,300 Okay. 4060 02:36:14,300 --> 02:36:15,320 Oh, that was the other one. 4061 02:36:15,340 --> 02:36:15,480 Yep. 4062 02:36:15,880 --> 02:36:16,520 That's PS exec. 4063 02:36:17,740 --> 02:36:18,180 All right. 4064 02:36:18,360 --> 02:36:19,300 I don't know what I did wrong. 4065 02:36:21,280 --> 02:36:23,100 Do you want to get that going, and I'll continue through the slides? 4066 02:36:23,440 --> 02:36:24,120 Yeah, I don't know what I did wrong. 4067 02:36:24,240 --> 02:36:25,300 All right. 4068 02:36:26,900 --> 02:36:28,180 Well, that was unfortunate. 4069 02:36:33,660 --> 02:36:39,320 It worked perfectly the other day, but, you know, we'll have it going with a little less downtime. 4070 02:37:04,920 --> 02:37:14,220 Okay, this one's working. 4071 02:37:14,220 --> 02:37:14,480 Right. 4072 02:37:14,620 --> 02:37:14,800 Anyway. 4073 02:37:17,400 --> 02:37:18,120 This was... 4074 02:37:24,700 --> 02:37:26,220 That was what you're supposed to see. 4075 02:37:27,080 --> 02:37:28,680 We had some trouble with the listeners there. 4076 02:37:28,740 --> 02:37:29,600 We'll get that working by the end. 4077 02:37:31,480 --> 02:37:31,840 Right. 4078 02:37:33,320 --> 02:37:34,560 Let's talk through these fun things. 4079 02:37:36,620 --> 02:37:39,420 Because of the way Quirk is structured, you can do some quite fun attacks with it. 4080 02:37:39,820 --> 02:37:42,820 First one is because most stuff right now just looks for the port, 4081 02:37:43,020 --> 02:37:44,200 if you change your port, you're going to have a lot of fun. 4082 02:37:44,220 --> 02:37:46,060 If you change your port, a lot of things will just naively accept it, 4083 02:37:46,120 --> 02:37:47,220 especially in UDP space. 4084 02:37:48,260 --> 02:37:50,520 Because it's complex, you've also got the side channels and scrambling. 4085 02:37:51,640 --> 02:37:54,260 There's some protocol stego in those side channels, 4086 02:37:54,480 --> 02:37:56,100 a bit like DNS text fields. 4087 02:37:57,660 --> 02:37:59,140 We're pretty sure there are some polyglots. 4088 02:37:59,300 --> 02:38:03,100 We haven't found any particularly interesting other than academic, but... 4089 02:38:04,560 --> 02:38:05,460 Did you figure it out? 4090 02:38:05,880 --> 02:38:06,720 He figured it out. 4091 02:38:07,580 --> 02:38:10,040 Stego polyglots and stego multiplex polyglots. 4092 02:38:10,180 --> 02:38:12,640 We'll discuss those a bit later, but that stuff is crazy mode. 4093 02:38:13,620 --> 02:38:15,480 Fragmentation, agility, you're jumping around all over the place, 4094 02:38:15,560 --> 02:38:16,880 all these connections and streams and stuff. 4095 02:38:17,060 --> 02:38:20,220 So as earlier, you start with that, you multiplex it down. 4096 02:38:20,680 --> 02:38:23,680 Or if you have multipath and you break it up across paths or connections, 4097 02:38:24,560 --> 02:38:26,940 and then if you mux them together and you do both the same things, 4098 02:38:26,980 --> 02:38:28,020 you get this set up. 4099 02:38:29,660 --> 02:38:32,960 You can already do this today, but if you get multipath and multiplex, 4100 02:38:33,400 --> 02:38:35,020 you start chunking stuff all over the place. 4101 02:38:35,340 --> 02:38:37,160 Good luck being an IDS dealing with that. 4102 02:38:38,320 --> 02:38:38,680 . 4103 02:38:41,220 --> 02:38:41,580 . 4104 02:38:42,640 --> 02:38:43,100 Blah, blah, blah. 4105 02:38:43,220 --> 02:38:43,620 Right. 4106 02:38:44,120 --> 02:38:45,660 Forward error correction is all sorts of fun. 4107 02:38:45,860 --> 02:38:49,220 You can inject fake packets, because you know the FEC and they don't. 4108 02:38:49,520 --> 02:38:52,200 And you can drop or corrupt packets to force them to recreate them. 4109 02:38:52,800 --> 02:38:56,200 If you want to detect the client traffic for these, go for the upgrade. 4110 02:38:56,320 --> 02:39:01,420 Go for your SSL ALPN header or your quick client traffic. 4111 02:39:01,760 --> 02:39:03,660 As we said, UDP 80 and 443. 4112 02:39:04,740 --> 02:39:05,840 Bidirectional patterns of communication. 4113 02:39:06,220 --> 02:39:08,240 This stuff does not look like most UDP traffic. 4114 02:39:08,680 --> 02:39:10,400 It's very chatty and back and forth. 4115 02:39:10,580 --> 02:39:10,980 . 4116 02:39:12,040 --> 02:39:12,480 . 4117 02:39:13,600 --> 02:39:15,000 And there's no static identifier. 4118 02:39:15,320 --> 02:39:17,180 You really have to parse this to make sense of it. 4119 02:39:18,140 --> 02:39:22,020 And that's why we released that detector the virus referred to earlier. 4120 02:39:23,160 --> 02:39:23,800 Are you good? 4121 02:39:25,200 --> 02:39:26,380 All right, he's still working on that. 4122 02:39:28,120 --> 02:39:30,120 If you want to detect the servers, it's actually a lot harder. 4123 02:39:30,480 --> 02:39:34,580 H2 server, make an ALPN request to it saying, you want to speak H2? 4124 02:39:35,220 --> 02:39:36,880 Send us an upgrade header, see if it upgrades. 4125 02:39:38,780 --> 02:39:39,800 Quick server traffic. 4126 02:39:40,540 --> 02:39:42,160 Again, UDP 80 and 443. 4127 02:39:42,160 --> 02:39:47,100 Or simply try and connect to it, which is actually really messy because it expects the right crypto to come in. 4128 02:39:49,400 --> 02:39:51,100 Blocking it, H2, actually easy. 4129 02:39:51,440 --> 02:39:55,960 If it's over TCP, you throw in a proxy, you don't support it outbound, you rewrite it. 4130 02:39:57,940 --> 02:39:59,960 If it's on a non-standard port, it gets a little messier. 4131 02:40:00,980 --> 02:40:05,760 If it's quick, right now that you block on an 80 and 443, that'll block it most of the time. 4132 02:40:05,940 --> 02:40:09,600 It won't block anyone using something like we do. 4133 02:40:09,900 --> 02:40:11,720 That sends that across a non-standard port. 4134 02:40:12,740 --> 02:40:16,520 With Chrome, there's actually a policy setting that no one says. 4135 02:40:16,640 --> 02:40:18,880 Google says right now this goes over 93% of networks. 4136 02:40:21,500 --> 02:40:23,560 So people aren't setting that. 4137 02:40:25,540 --> 02:40:29,360 And you can fingerprint detect and parse it, but in the end, not so much. 4138 02:40:29,840 --> 02:40:33,820 You bring this up in Wireshark, Wireshark's detector for H2 is actually pretty good. 4139 02:40:35,280 --> 02:40:37,180 Chrome with its net internal is also pretty good. 4140 02:40:38,020 --> 02:40:41,080 It tells you the protocol, it tells you the stream ID, the remote address and all that. 4141 02:40:42,160 --> 02:40:46,500 If you're doing it with H2 log parser, it makes it into a somewhat more friendly view. 4142 02:40:48,400 --> 02:40:51,040 H2i enables you to send and request arbitrary frames. 4143 02:40:52,300 --> 02:40:54,940 Well, not quite arbitrary frames, arbitrary messages. 4144 02:40:57,520 --> 02:41:02,060 NG HTTP, there's a lot of tools for H2 out there, just not many in terms of security tools. 4145 02:41:02,940 --> 02:41:05,160 MIT and Proxy actually has support for this recently. 4146 02:41:05,500 --> 02:41:07,020 That's the thing I'd encourage you to play with. 4147 02:41:09,140 --> 02:41:11,060 Curl. Curl already supports H2. 4148 02:41:12,160 --> 02:41:15,380 You send a request with the HTTP2 flag, it'll pull it over H2. 4149 02:41:21,260 --> 02:41:23,500 And you actually see a few browsers using this today. 4150 02:41:23,620 --> 02:41:27,200 If you open up your Chrome, you go to your net internals, 4151 02:41:27,620 --> 02:41:30,980 pull up your HTTP2 and your alternate service mappings, 4152 02:41:31,580 --> 02:41:33,800 and you'll get what I've got here, which is from one of my browsers, 4153 02:41:33,860 --> 02:41:35,020 where you have a whole lot of them. 4154 02:41:35,560 --> 02:41:38,720 It shows you where they're using them, what the expiry is. 4155 02:41:40,400 --> 02:41:41,520 Probably more than you expect. 4156 02:41:42,760 --> 02:41:43,820 Wireshark supports QUIC. 4157 02:41:44,780 --> 02:41:46,860 It's not very good if it's on non-standard ports. 4158 02:41:47,780 --> 02:41:49,640 You can also pull it up through Tshark. 4159 02:41:51,900 --> 02:41:55,520 Largely by looking for your ALPN stuff, is how you can perk your HTTP2. 4160 02:41:55,820 --> 02:41:59,840 For your QUIC, you have to force it to pass it and then pass through, 4161 02:42:00,300 --> 02:42:02,020 pull the flags and the tags. 4162 02:42:02,260 --> 02:42:02,440 It works? 4163 02:42:03,360 --> 02:42:03,940 Yeah, it works. 4164 02:42:04,440 --> 02:42:06,280 Okay, let's see if this works. 4165 02:42:18,600 --> 02:42:21,140 All right, so it turns out I don't know how to Metasploit, 4166 02:42:21,280 --> 02:42:24,280 but after enough time, I figured it out. 4167 02:42:24,520 --> 02:42:25,420 You have five minutes. 4168 02:42:25,700 --> 02:42:26,100 Okay. 4169 02:42:26,620 --> 02:42:27,260 Five minutes. 4170 02:42:28,020 --> 02:42:28,680 All right. 4171 02:42:30,040 --> 02:42:30,620 All right. 4172 02:42:37,900 --> 02:42:38,860 So we got a shell. 4173 02:42:39,100 --> 02:42:39,380 Yay. 4174 02:42:39,980 --> 02:42:40,520 All right. 4175 02:42:40,760 --> 02:42:42,140 So now, if you look at... 4176 02:42:42,160 --> 02:42:42,740 Wireshark. 4177 02:42:43,620 --> 02:42:46,620 And I moved the window over so that you guys can see Wireshark. 4178 02:42:49,640 --> 02:42:50,040 Hello. 4179 02:42:55,280 --> 02:42:55,840 All right. 4180 02:42:55,940 --> 02:43:00,140 So it's a PSXX, so you would expect to see a reverse HTTP handle. 4181 02:43:00,280 --> 02:43:02,060 But instead, all you see is a bunch of this UDP crap. 4182 02:43:03,780 --> 02:43:05,520 And nothing has any idea what it is. 4183 02:43:05,620 --> 02:43:06,600 And it's all on random ports. 4184 02:43:07,240 --> 02:43:12,060 And if I manually tell this to decode as quick 4185 02:43:13,200 --> 02:43:14,620 It's going to be super quick. 4186 02:43:15,620 --> 02:43:16,060 Uh... 4187 02:43:18,180 --> 02:43:18,620 Huh? 4188 02:43:22,000 --> 02:43:22,880 Ah, not... 4189 02:43:33,700 --> 02:43:35,620 All it sees is a bunch of encrypted garbage. 4190 02:43:36,220 --> 02:43:38,420 And even if you look at the details of the packet, 4191 02:43:38,580 --> 02:43:40,740 it pretty much has, like, 4192 02:43:40,740 --> 02:43:47,380 a tenth of the metadata of what it normally does when you're browsing and yeah lol ids there you go 4193 02:43:47,380 --> 02:43:57,080 number one you want to go over multiplexing before i do that okay so the next demo i'm just 4194 02:43:57,080 --> 02:44:04,220 going to do because my laptop's hooked up and we're running out of time um yeah so remember 4195 02:44:04,220 --> 02:44:07,700 earlier i showed you the multiplexing with all the different bits of different files in different 4196 02:44:07,700 --> 02:44:13,420 orders so what we're doing here is we're pulling in um we've got an h2 connection which has a large 4197 02:44:13,420 --> 02:44:19,820 number of streams within it with identifiers and we've set up a program opens up one connection 4198 02:44:19,820 --> 02:44:26,260 opens up a stream grabs a random byte from the file opens up a new stream grabs a random remaining 4199 02:44:26,260 --> 02:44:31,640 byte basically grabs the entire uh file or does your web browsing by randomly grabbing bytes via 4200 02:44:31,640 --> 02:44:37,420 range requests inside that tunnel so it's really noisy but it's one connection that is 4201 02:44:37,420 --> 02:44:37,680 really noisy and it's really noisy and it's really noisy and it's really noisy and it's really 4202 02:44:37,680 --> 02:44:43,680 jumbling up the file uh i don't know if this is a ddos technique i don't recon well i don't know 4203 02:44:43,680 --> 02:44:51,940 find out but um basically when this happens we pull a lot of random parts of the file it's 4204 02:44:51,940 --> 02:44:56,760 incredibly difficult to reassemble it because you need to be scripting and if we pull multiple bits 4205 02:44:56,760 --> 02:45:00,460 more than once it'll make a lot more sense when you see it but if you've got say a file that is 4206 02:45:00,460 --> 02:45:04,620 called a thousand bytes long we'll be pulling a hundred random bytes at a time from that through 4207 02:45:04,620 --> 02:45:06,160 the connection multiplexing 4208 02:45:12,200 --> 02:45:17,400 okay so this is actually a lot cooler than it's going to look and i'll flash you through the 4209 02:45:17,400 --> 02:45:23,220 source code real quick but basically so what this is gonna what you're about to look at is an h2 4210 02:45:23,220 --> 02:45:28,980 request where the h2 request is only requesting a head first of the content and the head will 4211 02:45:28,980 --> 02:45:33,460 return a content length and then for every byte of the content length we're going to choose a 4212 02:45:33,460 --> 02:45:36,140 byte at random and request it over h2 under an h2 request and we're going to choose a byte at 4213 02:45:36,160 --> 02:45:41,340 independent frame so if you were to look at this in wireshark it would just get an entire frame 4214 02:45:41,340 --> 02:45:46,800 center of return from http and then a single byte of data with no context but magically it would 4215 02:45:46,800 --> 02:45:47,680 look okay in a web browser 4216 02:45:58,020 --> 02:45:58,460 this 4217 02:45:58,460 --> 02:45:58,780 is 4218 02:46:11,020 --> 02:46:13,440 I think of this as traffic obfuscation 4219 02:46:21,900 --> 02:46:29,480 so that is yahoo.com one byte at a time using as many connection ids as it possibly can in order 4220 02:46:29,480 --> 02:46:35,620 until my box runs out of network sockets actually no it's using one socket 4221 02:46:36,160 --> 02:46:39,400 no it's not using that no wait you're opening connections yes 4222 02:46:40,680 --> 02:46:47,880 what do you hate the internet yes apparently it's slow think of this as a little analogous to 4223 02:46:48,920 --> 02:46:56,520 yeah byte wise sqli but good luck figuring out what you're doing here noisy inefficient 4224 02:46:57,520 --> 02:47:02,780 a nightmare to reassemble whether encrypted or not slides are basically done and we can do this 4225 02:47:02,780 --> 02:47:05,840 with any arbitrary server that supports this you can actually do this over h1 as well 4226 02:47:06,160 --> 02:47:09,920 but over h2 it's a lot gnarlier because of how the complexity of the protocol works 4227 02:47:15,160 --> 02:47:21,980 yeah so yeah we're way out of time so short of this I'm just going to read off the slides as I go rather than setting them up 4228 02:47:23,640 --> 02:47:28,980 tools aren't keeping up with tech and if the tools aren't keeping up we need to you need to be aware of these things looking for these things 4229 02:47:29,720 --> 02:47:33,860 understanding strangers when you see it even if your tools do it playtime's over because 4230 02:47:34,200 --> 02:47:34,520 uh 4231 02:47:36,740 --> 02:47:41,380 yeah if you come across this stuff in a packet capture what are you going to do 4232 02:47:43,000 --> 02:47:49,120 so text moving faster and fastest vendors are driving it not security companies not standards bodies 4233 02:47:49,120 --> 02:47:54,740 user space network stacks are coming already here when malware's putting this stuff in things are going to get really messy 4234 02:47:55,280 --> 02:47:58,720 you think polymorphic binaries are bad wait about polymorphic protocols 4235 02:47:59,820 --> 02:48:04,900 they'll be context heavy encrypted and really heavily multiplexed communications more so than we've seen before 4236 02:48:06,160 --> 02:48:06,240 uh 4237 02:48:08,200 --> 02:48:11,180 yeah right let's just shift shift to questions then um 4238 02:48:11,680 --> 02:48:12,080 cool 4239 02:48:13,160 --> 02:48:16,100 yeah I'm pretty sure we're out of time so like I will stand there and answer questions 4240 02:48:16,100 --> 02:48:16,520 yeah 4241 02:48:16,520 --> 02:48:16,820 bye