1 00:00:00,390 --> 00:00:03,510 [Music] 2 00:00:05,040 --> 00:00:06,960 I was primarily responsible for the 3 00:00:06,960 --> 00:00:08,760 Linux curl and engine X vulnerabil 4 00:00:08,760 --> 00:00:10,040 injections the way we went about 5 00:00:10,040 --> 00:00:11,960 selecting those was it had to have a 6 00:00:11,960 --> 00:00:14,120 large market share we wanted it to be a 7 00:00:14,120 --> 00:00:16,400 fairly well recognizable piece of 8 00:00:16,400 --> 00:00:18,600 software the second thing was we wanted 9 00:00:18,600 --> 00:00:20,600 the code base to be decently large so 10 00:00:20,600 --> 00:00:21,960 that we could inject M abilities you 11 00:00:21,960 --> 00:00:23,800 didn't want them to be too concentrated 12 00:00:23,800 --> 00:00:25,039 they need to be spread out across the 13 00:00:25,039 --> 00:00:27,199 source code the third part was we really 14 00:00:27,199 --> 00:00:31,160 wanted to have unit tests I ideally that 15 00:00:31,160 --> 00:00:34,160 way when competitors submit patches we 16 00:00:34,160 --> 00:00:36,320 can run this test to confirm that all 17 00:00:36,320 --> 00:00:38,840 the functionality still exists so we 18 00:00:38,840 --> 00:00:41,559 partnered with the Linux foundation and 19 00:00:41,559 --> 00:00:44,039 we begin injecting vulnerabilities and 20 00:00:44,039 --> 00:00:45,520 the way you trigger them with Linux 21 00:00:45,520 --> 00:00:48,039 kernel is by writing C programs we 22 00:00:48,039 --> 00:00:50,160 quickly encountered that llms it's very 23 00:00:50,160 --> 00:00:53,399 hard to generate working complex code to 24 00:00:53,399 --> 00:00:55,120 trigger some of these what we quickly 25 00:00:55,120 --> 00:00:57,359 pivoted to was this idea of a test 26 00:00:57,359 --> 00:01:00,160 harness what it does is it wraps a Ser 27 00:01:00,160 --> 00:01:03,359 of commands into containerized call a 28 00:01:03,359 --> 00:01:06,840 blob format so the blob format allows 29 00:01:06,840 --> 00:01:09,200 seven different commands you can open an 30 00:01:09,200 --> 00:01:11,280 a socket connection you can call set 31 00:01:11,280 --> 00:01:15,520 sock op you can send a blob of data over 32 00:01:15,520 --> 00:01:17,040 the connection you've created you can 33 00:01:17,040 --> 00:01:18,720 send a netlink packet which is a very 34 00:01:18,720 --> 00:01:21,240 specific subsystem within Linux carel 35 00:01:21,240 --> 00:01:23,520 you can close listening socket and you 36 00:01:23,520 --> 00:01:26,400 can close a connected socket these seven 37 00:01:26,400 --> 00:01:30,079 function calls allow a significant 38 00:01:30,079 --> 00:01:31,840 attack surface for the attackers and for 39 00:01:31,840 --> 00:01:33,840 us to inject vulnerabilities into 40 00:01:33,840 --> 00:01:35,119 however generating this is a little 41 00:01:35,119 --> 00:01:37,040 difficult because it's a binary format 42 00:01:37,040 --> 00:01:41,159 inob so we also created a Pyon script 43 00:01:41,159 --> 00:01:43,640 that was generic enough to allow us to 44 00:01:43,640 --> 00:01:46,159 take whatever vulnerability wrote and 45 00:01:46,159 --> 00:01:48,240 turn into a blob so here's a good 46 00:01:48,240 --> 00:01:50,439 example of why we decided to not require 47 00:01:50,439 --> 00:01:53,880 llms to generate source code to uh 48 00:01:53,880 --> 00:01:55,439 trigger vulnerabilities so this is the 49 00:01:55,439 --> 00:01:57,920 tip C buug that we also released as an 50 00:01:57,920 --> 00:01:59,439 Exemplar for the for the teams the 51 00:01:59,439 --> 00:02:02,880 amount of code and the complexity of the 52 00:02:02,880 --> 00:02:04,479 code required to communicate with the 53 00:02:04,479 --> 00:02:07,759 tipc net lake subsystem is non-trivial 54 00:02:07,759 --> 00:02:09,399 this challenge or competition isn't 55 00:02:09,399 --> 00:02:11,160 about code generation it's about bug 56 00:02:11,160 --> 00:02:13,040 finding and patching so that was a big 57 00:02:13,040 --> 00:02:15,040 influence using the blob post and the 58 00:02:15,040 --> 00:02:18,080 harness as OPP post to requiring per the 59 00:02:18,080 --> 00:02:20,080 challenges that we wrote kind of fall 60 00:02:20,080 --> 00:02:23,000 into easy medium even hard cpb1 is 61 00:02:23,000 --> 00:02:25,640 without a doubt relatively easy it was 62 00:02:25,640 --> 00:02:29,599 injected into socket. C specifically the 63 00:02:29,599 --> 00:02:32,160 soet create function and all it does is 64 00:02:32,160 --> 00:02:34,920 removes the bounds of the protocol check 65 00:02:34,920 --> 00:02:37,120 you have a a network a family and a type 66 00:02:37,120 --> 00:02:40,040 and a protocol and these are bound 67 00:02:40,040 --> 00:02:41,080 because what they do is they actually 68 00:02:41,080 --> 00:02:43,480 reference finite size structure if you 69 00:02:43,480 --> 00:02:46,120 go outside the bound you'll cause and so 70 00:02:46,120 --> 00:02:48,200 this patch injection simply remov the 71 00:02:48,200 --> 00:02:50,760 checks for the bounds so it allows you 72 00:02:50,760 --> 00:02:52,720 to reference outside of that the bounds 73 00:02:52,720 --> 00:02:55,000 of that structure as I mentioned before 74 00:02:55,000 --> 00:02:57,920 the CP V8 is kind of a mid-range 75 00:02:57,920 --> 00:02:59,159 vulnerability but it was also the 76 00:02:59,159 --> 00:03:01,200 Exemplar cpv that we released to the 77 00:03:01,200 --> 00:03:03,799 teams so they can begin understanding 78 00:03:03,799 --> 00:03:06,120 the format the API that we expect so an 79 00:03:06,120 --> 00:03:08,239 example of one that I was considered 80 00:03:08,239 --> 00:03:10,879 kind of difficult is cpv2 it was an 81 00:03:10,879 --> 00:03:14,799 inject into the TCP options code so when 82 00:03:14,799 --> 00:03:17,400 you send a packet to the host it'll send 83 00:03:17,400 --> 00:03:19,400 a send and then inside of that there are 84 00:03:19,400 --> 00:03:21,040 different option fields to tell how to 85 00:03:21,040 --> 00:03:23,480 handle this packet what to do in various 86 00:03:23,480 --> 00:03:25,879 cases but on top of that the problem we 87 00:03:25,879 --> 00:03:27,360 have is we also have to ensure that the 88 00:03:27,360 --> 00:03:29,040 functionality is there the teams patch 89 00:03:29,040 --> 00:03:31,040 out the code you don't want it to just 90 00:03:31,040 --> 00:03:32,439 be gone you want to confirm that the 91 00:03:32,439 --> 00:03:33,840 functionality still exists while the 92 00:03:33,840 --> 00:03:36,080 vulnerability doesn't to test for this 93 00:03:36,080 --> 00:03:38,720 we had to modify the code to also send 94 00:03:38,720 --> 00:03:42,000 back information you send a packet and 95 00:03:42,000 --> 00:03:44,239 then you get back data so here's an 96 00:03:44,239 --> 00:03:45,760 example of the back and forth with the 97 00:03:45,760 --> 00:03:47,080 ability to confirm that the 98 00:03:47,080 --> 00:03:48,920 functionality is still there you see it 99 00:03:48,920 --> 00:03:53,159 sends but then it also responds with 100 00:03:53,159 --> 00:03:55,360 this option p with this where would 101 00:03:55,360 --> 00:03:57,760 confirm that the patch didn't remove 102 00:03:57,760 --> 00:03:59,480 functionality we select the anics 103 00:03:59,480 --> 00:04:01,040 because had an existing project to know 104 00:04:01,040 --> 00:04:02,920 as fuzz there's already existing 105 00:04:02,920 --> 00:04:04,439 infrastructure around it to do fuzzing 106 00:04:04,439 --> 00:04:07,439 and test harness so we can capture when 107 00:04:07,439 --> 00:04:09,400 something crashes or there's one little 108 00:04:09,400 --> 00:04:11,599 condition that arises and the way it 109 00:04:11,599 --> 00:04:14,560 works is very similar to the Linux test 110 00:04:14,560 --> 00:04:17,478 furnace you have a blob of data that you 111 00:04:17,478 --> 00:04:19,839 pass to it and it runs it through the 112 00:04:19,839 --> 00:04:22,639 paring the handling of the functionality 113 00:04:22,639 --> 00:04:24,000 we don't want teams to have access to 114 00:04:24,000 --> 00:04:25,880 the internet or network so the 115 00:04:25,880 --> 00:04:28,080 networking side of it is actually kind 116 00:04:28,080 --> 00:04:29,919 of stubbed out and pretend so we trick 117 00:04:29,919 --> 00:04:31,840 in Gen X into thinking that is talking 118 00:04:31,840 --> 00:04:34,080 over the network and it's not our first 119 00:04:34,080 --> 00:04:38,639 cpv that we went with was an this thing 120 00:04:38,639 --> 00:04:41,240 called the FR header inside of HTP 121 00:04:41,240 --> 00:04:43,240 engine doesn't Implement all of the HTP 122 00:04:43,240 --> 00:04:46,039 spec what I did was I browsed through 123 00:04:46,039 --> 00:04:49,320 the HTTP RFC looking for functionality 124 00:04:49,320 --> 00:04:51,080 that exists in the RFC so it's valid 125 00:04:51,080 --> 00:04:54,520 HTTP traffic but isn't really handled by 126 00:04:54,520 --> 00:04:57,440 engine X the reason behind this is that 127 00:04:57,440 --> 00:04:59,240 an llm is going to know the RSC it's 128 00:04:59,240 --> 00:05:01,919 going to have train on the RFC and so we 129 00:05:01,919 --> 00:05:04,440 will have seen this from header now if I 130 00:05:04,440 --> 00:05:07,400 had made some other header that doesn't 131 00:05:07,400 --> 00:05:10,520 exist in the RFC the llm could quickly 132 00:05:10,520 --> 00:05:13,280 see that okay I don't know what this is 133 00:05:13,280 --> 00:05:15,320 I've never seen it in the RFC before and 134 00:05:15,320 --> 00:05:17,520 so it kind of puts a spotlight on that 135 00:05:17,520 --> 00:05:19,240 code so what I did was I added this 136 00:05:19,240 --> 00:05:22,000 functionality in NX the handling of this 137 00:05:22,000 --> 00:05:26,039 this from HTP and it accepts an email 138 00:05:26,039 --> 00:05:28,199 parses it out and handles it so you can 139 00:05:28,199 --> 00:05:30,160 see we have 140 00:05:30,160 --> 00:05:32,680 this addition of the from header and 141 00:05:32,680 --> 00:05:35,800 then how it validates it so if van LM is 142 00:05:35,800 --> 00:05:37,919 able to actually develop these patches 143 00:05:37,919 --> 00:05:40,919 that don't crash fix the vulnerability 144 00:05:40,919 --> 00:05:43,360 itself and conform to the programming 145 00:05:43,360 --> 00:05:45,960 practices of that project it will reduce 146 00:05:45,960 --> 00:05:47,600 significantly the number of person hours 147 00:05:47,600 --> 00:05:50,360 required to fix V abilities and deploy 148 00:05:50,360 --> 00:05:52,440 these Solutions in a way to make us all 149 00:05:52,440 --> 00:05:55,800 much more secure