1 00:00:00,480 --> 00:00:02,480 speaker he's shaking his head he's like 2 00:00:02,480 --> 00:00:05,279 no you're not no liar he's a new face to 3 00:00:05,279 --> 00:00:07,799 the cloud Village but a veteran speaker 4 00:00:07,799 --> 00:00:10,519 uh he's spoken at bsides SF Melbourne 5 00:00:10,519 --> 00:00:15,080 canbera and more places canra canra I I 6 00:00:15,080 --> 00:00:17,320 apologize to all the Australians who who 7 00:00:17,320 --> 00:00:19,439 just cringe listening to me try and say 8 00:00:19,439 --> 00:00:22,640 that uh Sam Stewart who goes by Frenchie 9 00:00:22,640 --> 00:00:24,680 uh is a CEO and founder of Insignia 10 00:00:24,680 --> 00:00:26,640 security uh and previously infr SEC at 11 00:00:26,640 --> 00:00:29,480 brex cruise and culture amp uh Frenchie 12 00:00:29,480 --> 00:00:30,720 will be intr producing runtime 13 00:00:30,720 --> 00:00:32,800 reachability it's a novel approach that 14 00:00:32,800 --> 00:00:35,559 leverages continuous profiling via ebpf 15 00:00:35,559 --> 00:00:37,280 to quantify how often a vulnerable 16 00:00:37,280 --> 00:00:39,640 method or Cod path is called in actual 17 00:00:39,640 --> 00:00:41,760 production usage the name of Frenchie 18 00:00:41,760 --> 00:00:43,760 talk is runtime reachability 19 00:00:43,760 --> 00:00:45,800 prioritizing vulnerabilities with ebpf 20 00:00:45,800 --> 00:00:47,800 and continuous profiling uh please give 21 00:00:47,800 --> 00:00:51,719 a warm welcome to my favorite Australian 22 00:00:51,719 --> 00:00:54,239 crunchie thank you very much 23 00:00:54,239 --> 00:00:58,199 Mike uh can I get a mic check hey it's 24 00:00:58,199 --> 00:01:01,359 Mike uh sorry I do that every time I 25 00:01:01,359 --> 00:01:02,600 present with Mike Mike and I are dear 26 00:01:02,600 --> 00:01:04,080 friends um somehow he keeps letting me 27 00:01:04,080 --> 00:01:05,920 goof around on stage uh thank you so 28 00:01:05,920 --> 00:01:08,840 much for coming in um this is kind of a 29 00:01:08,840 --> 00:01:11,159 bit of a Mad ramble um I I really just 30 00:01:11,159 --> 00:01:13,040 want your feedback that's the main thing 31 00:01:13,040 --> 00:01:15,159 um yeah as Mike already gave the 32 00:01:15,159 --> 00:01:17,360 introduction I speak in ramble on cloud 33 00:01:17,360 --> 00:01:19,240 clusters containers anything starting 34 00:01:19,240 --> 00:01:20,600 with a c generally is is what's 35 00:01:20,600 --> 00:01:23,920 interesting to me um uh bit of a 36 00:01:23,920 --> 00:01:25,439 overview of what we're run through the 37 00:01:25,439 --> 00:01:26,560 problem statement that I'm trying to 38 00:01:26,560 --> 00:01:27,720 solve for with this cuz I think that's 39 00:01:27,720 --> 00:01:30,000 worth being precise about um and then a 40 00:01:30,000 --> 00:01:31,159 couple of background things there'll be 41 00:01:31,159 --> 00:01:33,159 a lot of Prior research so if you're not 42 00:01:33,159 --> 00:01:35,560 familiar with continuous profiling or EF 43 00:01:35,560 --> 00:01:37,640 or any of that stuff that's great we'll 44 00:01:37,640 --> 00:01:41,960 hopefully bring you up to speed um so 45 00:01:41,960 --> 00:01:43,520 that's surprisingly low resolution I'm 46 00:01:43,520 --> 00:01:45,600 hoping that that's not an indication of 47 00:01:45,600 --> 00:01:49,320 the Wii um so this is an image of going 48 00:01:49,320 --> 00:01:51,200 the wrong way through traffic right um 49 00:01:51,200 --> 00:01:54,560 so part of this for me is I don't think 50 00:01:54,560 --> 00:01:55,759 I've heard of anyone else taking a 51 00:01:55,759 --> 00:01:58,680 similar approach with this I think it's 52 00:01:58,680 --> 00:02:00,759 novel if anyone heard of a previous 53 00:02:00,759 --> 00:02:02,320 thing please tell me because if I'm just 54 00:02:02,320 --> 00:02:03,479 an idiot and I'm going the wrong way 55 00:02:03,479 --> 00:02:06,039 through traffic let me know but I think 56 00:02:06,039 --> 00:02:07,960 this may also be a really useful way of 57 00:02:07,960 --> 00:02:09,479 how we can actually quantify the 58 00:02:09,479 --> 00:02:12,599 likelihood of vulnerabilities um because 59 00:02:12,599 --> 00:02:13,840 I think at the moment everyone kind of 60 00:02:13,840 --> 00:02:15,319 agrees that vulnerability management is 61 00:02:15,319 --> 00:02:17,360 is broken in its current state right so 62 00:02:17,360 --> 00:02:20,160 software composition analysis is useful 63 00:02:20,160 --> 00:02:21,760 uh it's an important part of building 64 00:02:21,760 --> 00:02:24,840 software securely however the volume of 65 00:02:24,840 --> 00:02:26,760 crap that we get out of these right is 66 00:02:26,760 --> 00:02:28,440 is just it's it's ridiculous everyone's 67 00:02:28,440 --> 00:02:30,680 seen something that looks like this on 68 00:02:30,680 --> 00:02:32,280 incredibly low resolution this is 69 00:02:32,280 --> 00:02:34,879 amazing um let me see if the PDF has 70 00:02:34,879 --> 00:02:35,800 finished 71 00:02:35,800 --> 00:02:38,840 downloading what's that oh it literally 72 00:02:38,840 --> 00:02:40,599 got better um I also may have a 73 00:02:40,599 --> 00:02:42,000 downloaded PDF which I'm going to try 74 00:02:42,000 --> 00:02:45,239 and see if I can switch to that 1 minute 75 00:02:45,239 --> 00:02:47,280 left all right I'll uh I'll keep running 76 00:02:47,280 --> 00:02:50,239 with this uh before switching over um 77 00:02:50,239 --> 00:02:52,800 but if it continues to suck then my 78 00:02:52,800 --> 00:02:55,560 sincere apologies um and we'll switch 79 00:02:55,560 --> 00:02:56,920 the offline version when it's done 80 00:02:56,920 --> 00:03:00,319 halfway um cool so everyone's probably 81 00:03:00,319 --> 00:03:02,239 seen something like this right so you 82 00:03:02,239 --> 00:03:05,000 know 30,000 critical vulnerability yeah 83 00:03:05,000 --> 00:03:07,560 300 something this is a meaningless 84 00:03:07,560 --> 00:03:09,080 number right and this is from a a 85 00:03:09,080 --> 00:03:10,440 midsized 86 00:03:10,440 --> 00:03:12,599 organization um you all probably have 87 00:03:12,599 --> 00:03:14,519 seen something uh similar to this it's 88 00:03:14,519 --> 00:03:17,200 not even necessarily indicative of the 89 00:03:17,200 --> 00:03:18,560 actual risk that the thing presents it's 90 00:03:18,560 --> 00:03:20,280 just hey all this sea they're all 91 00:03:20,280 --> 00:03:21,720 criticals everything's on fire 92 00:03:21,720 --> 00:03:23,519 everything's high so your choice of meme 93 00:03:23,519 --> 00:03:25,799 you can either pick you know the number 94 00:03:25,799 --> 00:03:27,599 of vulnerabilities is way too damn high 95 00:03:27,599 --> 00:03:30,040 or over 9,000 depending on different 96 00:03:30,040 --> 00:03:33,080 vintage um of memes um and typically in 97 00:03:33,080 --> 00:03:34,560 a dashboard this is a mockup of 98 00:03:34,560 --> 00:03:35,599 something you probably have a system 99 00:03:35,599 --> 00:03:36,920 like this your task management thing 100 00:03:36,920 --> 00:03:39,159 everything's red it's over 9,000 and you 101 00:03:39,159 --> 00:03:40,280 know you're just wrestling to trying to 102 00:03:40,280 --> 00:03:41,840 figure out which ones to actually patch 103 00:03:41,840 --> 00:03:43,480 first and the reality is as security 104 00:03:43,480 --> 00:03:45,599 practitioners we're all really short on 105 00:03:45,599 --> 00:03:48,319 time we don't have the ability to go 106 00:03:48,319 --> 00:03:49,439 through and fix absolutely everything 107 00:03:49,439 --> 00:03:51,519 we'd love to with infinite resources but 108 00:03:51,519 --> 00:03:53,079 there's a judgment call that has to be 109 00:03:53,079 --> 00:03:54,840 made as to which ones actually matter to 110 00:03:54,840 --> 00:03:57,079 fix right um so there's a couple of 111 00:03:57,079 --> 00:03:58,519 things we'll go into around how we can 112 00:03:58,519 --> 00:04:00,360 actually go about this right right but 113 00:04:00,360 --> 00:04:01,959 as an industry we've kind of just looked 114 00:04:01,959 --> 00:04:05,159 at likelihood and Shrugged right impact 115 00:04:05,159 --> 00:04:06,640 is the criticality of the vulnerability 116 00:04:06,640 --> 00:04:09,200 sure but you know likely is it publicly 117 00:04:09,200 --> 00:04:10,720 accessible maybe it depends on the 118 00:04:10,720 --> 00:04:12,319 context of the business trug right we 119 00:04:12,319 --> 00:04:14,480 don't have an answer what if we actually 120 00:04:14,480 --> 00:04:17,000 had a scientific method of actually 121 00:04:17,000 --> 00:04:19,000 calculating that likelihood could be 122 00:04:19,000 --> 00:04:21,000 interesting maybe that's 123 00:04:21,000 --> 00:04:23,479 foreshadowing uh so a couple of 124 00:04:23,479 --> 00:04:26,360 background thing so continuous profiling 125 00:04:26,360 --> 00:04:28,520 is uh I won't read the words off the 126 00:04:28,520 --> 00:04:30,120 slides but it's a method by which we can 127 00:04:30,120 --> 00:04:32,680 analyze the performance of applications 128 00:04:32,680 --> 00:04:34,600 um in our context we really care about 129 00:04:34,600 --> 00:04:37,240 CPU uh that's really the only thing um 130 00:04:37,240 --> 00:04:41,800 but by background what is profiling uh 131 00:04:41,800 --> 00:04:44,120 I'm going to give this a second to see 132 00:04:44,120 --> 00:04:45,440 if that comes 133 00:04:45,440 --> 00:04:48,440 online but the image itself doesn't uh 134 00:04:48,440 --> 00:04:50,800 isn't too uh specific basically it's 135 00:04:50,800 --> 00:04:51,840 just all the different things within the 136 00:04:51,840 --> 00:04:54,400 Linux per events you can check out dis 137 00:04:54,400 --> 00:04:56,039 events you can check out Network you can 138 00:04:56,039 --> 00:04:58,120 check out a whole bunch of things CPU is 139 00:04:58,120 --> 00:04:59,120 the one that we care about in this 140 00:04:59,120 --> 00:05:01,400 particular cont text um and there is a 141 00:05:01,400 --> 00:05:03,080 whole book on BPF Performance Tools if 142 00:05:03,080 --> 00:05:04,320 you want to go deep into actual 143 00:05:04,320 --> 00:05:06,280 performance that's background reading 144 00:05:06,280 --> 00:05:08,479 great book it's a great book yes indeed 145 00:05:08,479 --> 00:05:13,400 it is yeah very chunky um uh but the uh 146 00:05:13,400 --> 00:05:15,400 yeah uh you don't need to go into that 147 00:05:15,400 --> 00:05:17,520 uh that far detailed into actually 148 00:05:17,520 --> 00:05:19,400 understanding it it's yeah it's a good 149 00:05:19,400 --> 00:05:20,840 book but really for this context we only 150 00:05:20,840 --> 00:05:24,600 care about CPU um there's a command like 151 00:05:24,600 --> 00:05:26,600 this yeah perf you know record 152 00:05:26,600 --> 00:05:28,479 particular events it's samples on a 153 00:05:28,479 --> 00:05:30,400 regular basis will'll tell you different 154 00:05:30,400 --> 00:05:31,680 things right so you can give it a 155 00:05:31,680 --> 00:05:33,000 specific command a process that's 156 00:05:33,000 --> 00:05:34,560 already running and it will dump out 157 00:05:34,560 --> 00:05:36,160 onto dis and some performance 158 00:05:36,160 --> 00:05:40,039 information um in this case this is a uh 159 00:05:40,039 --> 00:05:42,479 file IO uh structure but it dumps out 160 00:05:42,479 --> 00:05:45,000 some stuff like this 161 00:05:45,000 --> 00:05:47,800 um another image ear I'm going to give 162 00:05:47,800 --> 00:05:52,919 up on this and switch to slides hey hey 163 00:05:52,919 --> 00:05:55,919 okay and just full screen 164 00:05:55,919 --> 00:05:59,840 this sry I appreciate you dealing uh 165 00:05:59,840 --> 00:06:02,170 with this on the Fly hold on I 166 00:06:02,170 --> 00:06:04,520 [Music] 167 00:06:04,520 --> 00:06:08,520 will this and 168 00:06:08,520 --> 00:06:11,080 this 169 00:06:11,080 --> 00:06:14,080 and 170 00:06:15,319 --> 00:06:19,039 go jump back 171 00:06:20,240 --> 00:06:22,720 to here cool all right hopefully you can 172 00:06:22,720 --> 00:06:24,120 see that a bit and I we will share these 173 00:06:24,120 --> 00:06:25,319 slides afterwards as well so you can see 174 00:06:25,319 --> 00:06:28,039 it um but in the case of CPU it'll dump 175 00:06:28,039 --> 00:06:29,639 out an entire call stack which looks 176 00:06:29,639 --> 00:06:31,199 something like this which is pretty ugly 177 00:06:31,199 --> 00:06:33,400 and of itself but whenever you get that 178 00:06:33,400 --> 00:06:34,960 wall of text whenever your error comes 179 00:06:34,960 --> 00:06:36,240 out it's like ah something's broken you 180 00:06:36,240 --> 00:06:37,840 see the entire call stack the path of 181 00:06:37,840 --> 00:06:39,840 which codee's taken it it represents 182 00:06:39,840 --> 00:06:42,680 something like this um uh which is 183 00:06:42,680 --> 00:06:44,000 relevant in this context in terms of 184 00:06:44,000 --> 00:06:45,280 vulnerabilities which we'll get to it in 185 00:06:45,280 --> 00:06:46,479 a little bit because you know we want to 186 00:06:46,479 --> 00:06:47,919 know which vulnerable code path is of 187 00:06:47,919 --> 00:06:50,479 interest to us um there's a great 188 00:06:50,479 --> 00:06:52,560 visualization tool called Flame graphs 189 00:06:52,560 --> 00:06:53,680 which is this is also a bit of 190 00:06:53,680 --> 00:06:54,680 background knowledge that you need to 191 00:06:54,680 --> 00:06:56,560 know uh Brendan Greg has done a bunch of 192 00:06:56,560 --> 00:06:58,879 great work around this um but they look 193 00:06:58,879 --> 00:07:01,039 like this um at first glance they're 194 00:07:01,039 --> 00:07:03,800 pretty ugly but uh they contain a lot of 195 00:07:03,800 --> 00:07:05,440 information and they're really useful so 196 00:07:05,440 --> 00:07:07,919 basically uh if you imagine the process 197 00:07:07,919 --> 00:07:11,039 tree the tiny little tip uh at the very 198 00:07:11,039 --> 00:07:13,800 top that's just profiled and seen less 199 00:07:13,800 --> 00:07:15,720 frequently than something that's all the 200 00:07:15,720 --> 00:07:17,639 way down the bottom so you can infer the 201 00:07:17,639 --> 00:07:19,240 number of times a second that it gets 202 00:07:19,240 --> 00:07:21,479 sampled that that shows up more of the 203 00:07:21,479 --> 00:07:24,199 time um now this is useful in 204 00:07:24,199 --> 00:07:25,800 performance monitoring applications if 205 00:07:25,800 --> 00:07:27,319 you want to know hey what's taking a 206 00:07:27,319 --> 00:07:28,879 really long time in my application right 207 00:07:28,879 --> 00:07:31,160 is it a data base query is it a network 208 00:07:31,160 --> 00:07:33,440 call something's running slow I don't 209 00:07:33,440 --> 00:07:35,080 know what I'm going to look at the flame 210 00:07:35,080 --> 00:07:36,440 graph and figure out what actually goes 211 00:07:36,440 --> 00:07:38,960 on um so that's useful background 212 00:07:38,960 --> 00:07:42,800 information there um so we just do that 213 00:07:42,800 --> 00:07:44,560 continuously Bingo right and then that's 214 00:07:44,560 --> 00:07:47,319 continuous monitoring right well it's a 215 00:07:47,319 --> 00:07:49,159 little more complicated than that um 216 00:07:49,159 --> 00:07:52,080 unfortunately that can tank performance 217 00:07:52,080 --> 00:07:54,280 and grind things to a complete halt it's 218 00:07:54,280 --> 00:07:56,000 useful data but typically if you do that 219 00:07:56,000 --> 00:07:57,479 on everything well then you don't need 220 00:07:57,479 --> 00:07:59,199 the flame graph cuz things will run slow 221 00:07:59,199 --> 00:08:02,400 you just know that um enter uh Google 222 00:08:02,400 --> 00:08:04,919 wide profiling so this is 2010 um one of 223 00:08:04,919 --> 00:08:07,720 the key features of gwp uh was that they 224 00:08:07,720 --> 00:08:09,520 were able to do this with negligible 225 00:08:09,520 --> 00:08:12,800 overhead uh NE 226 00:08:12,800 --> 00:08:16,039 negligible that word thank you yes um I 227 00:08:16,039 --> 00:08:17,520 can usually get away with saying funky 228 00:08:17,520 --> 00:08:19,520 pronunciations is just an Australian ISM 229 00:08:19,520 --> 00:08:20,840 but there's Australians in the audience 230 00:08:20,840 --> 00:08:24,000 so I can't do that this time um but the 231 00:08:24,000 --> 00:08:26,039 useful thing here is uh yeah sampling 232 00:08:26,039 --> 00:08:27,360 based techniques and so they do this in 233 00:08:27,360 --> 00:08:29,840 a non-invasive way um very interesting 234 00:08:29,840 --> 00:08:31,319 foundational paper would recommend 235 00:08:31,319 --> 00:08:33,559 reading that as well 236 00:08:33,559 --> 00:08:36,958 um the data structure that the Google 237 00:08:36,958 --> 00:08:38,719 now supports is one called PPR right so 238 00:08:38,719 --> 00:08:40,599 there was the per data events there's 239 00:08:40,599 --> 00:08:42,839 now also PS which is a protuff uh so 240 00:08:42,839 --> 00:08:44,159 it's a more efficient data format as 241 00:08:44,159 --> 00:08:46,360 well this is a useful tool uh that's 242 00:08:46,360 --> 00:08:47,360 worth checking out if you're getting 243 00:08:47,360 --> 00:08:51,360 into profiling um and then to convert in 244 00:08:51,360 --> 00:08:52,440 between the two these are some of the 245 00:08:52,440 --> 00:08:53,880 other useful tools that I've uh have 246 00:08:53,880 --> 00:08:56,959 come across over the time um here's a 247 00:08:56,959 --> 00:08:58,320 bit of a history lesson so yeah that 248 00:08:58,320 --> 00:09:01,440 2010 uh case now there's a few other 249 00:09:01,440 --> 00:09:02,920 players in the uh out in the market this 250 00:09:02,920 --> 00:09:05,920 is from the cncf um uh the one we'll 251 00:09:05,920 --> 00:09:08,279 talk about specifically is uh is Parker 252 00:09:08,279 --> 00:09:09,519 it's an open source tool from Polar 253 00:09:09,519 --> 00:09:11,640 signals um but there's a bit of a 254 00:09:11,640 --> 00:09:12,839 history lesson a few other people 255 00:09:12,839 --> 00:09:14,600 pyroscope out there you know neur Relic 256 00:09:14,600 --> 00:09:15,920 and Amazon they all have their different 257 00:09:15,920 --> 00:09:19,360 variants but all of these tooling now 258 00:09:19,360 --> 00:09:20,560 give you the ability to do that 259 00:09:20,560 --> 00:09:22,320 performance monitoring in a continual 260 00:09:22,320 --> 00:09:23,720 basis this is well known within the 261 00:09:23,720 --> 00:09:25,839 observability world for the security 262 00:09:25,839 --> 00:09:27,480 world still kind of new as far as I'm 263 00:09:27,480 --> 00:09:29,920 aware unless there's some sres and in 264 00:09:29,920 --> 00:09:32,120 here um but we'll drill into Polar 265 00:09:32,120 --> 00:09:34,480 signals specifically oh uh worth giving 266 00:09:34,480 --> 00:09:35,880 a shout out to otel as well so otel is 267 00:09:35,880 --> 00:09:38,680 an open standard for this um uh elastic 268 00:09:38,680 --> 00:09:40,240 just released some tooling that does a 269 00:09:40,240 --> 00:09:42,880 lot of the similar stuff that uh we were 270 00:09:42,880 --> 00:09:44,600 doing internally uh and then they 271 00:09:44,600 --> 00:09:45,880 released it all you know months after 272 00:09:45,880 --> 00:09:46,800 we're already doing it so it would have 273 00:09:46,800 --> 00:09:48,200 been great to have that at the start but 274 00:09:48,200 --> 00:09:51,000 um yeah otel is a as a new standard um 275 00:09:51,000 --> 00:09:52,399 uh for multil language support around 276 00:09:52,399 --> 00:09:55,000 this stuff as well which is cool um and 277 00:09:55,000 --> 00:09:56,760 the way specifically that uh polar 278 00:09:56,760 --> 00:09:58,000 signals works is via something called 279 00:09:58,000 --> 00:10:00,040 evf um so bit of background if you're 280 00:10:00,040 --> 00:10:03,560 not familiar um they are small little 281 00:10:03,560 --> 00:10:05,519 applications that are compiled and run 282 00:10:05,519 --> 00:10:07,760 within kernel space so again coming back 283 00:10:07,760 --> 00:10:10,000 to that performance consideration when 284 00:10:10,000 --> 00:10:12,440 perf was prohibitively expensive evf is 285 00:10:12,440 --> 00:10:14,440 an enabling technology that lets us run 286 00:10:14,440 --> 00:10:16,399 these uh within the conal itself for a 287 00:10:16,399 --> 00:10:17,720 bunch of different applications right so 288 00:10:17,720 --> 00:10:19,839 you can check out networking calls in a 289 00:10:19,839 --> 00:10:21,320 high performant way you can do security 290 00:10:21,320 --> 00:10:23,120 things so you know for example intrusion 291 00:10:23,120 --> 00:10:26,240 detection systems or malware um uh you 292 00:10:26,240 --> 00:10:28,079 can have some uh highly performant ways 293 00:10:28,079 --> 00:10:29,440 to monitor that sort of stuff there's a 294 00:10:29,440 --> 00:10:31,800 bunch of tools there on the slide um to 295 00:10:31,800 --> 00:10:33,920 be specifically clear though we are not 296 00:10:33,920 --> 00:10:35,680 interested in the security use case of 297 00:10:35,680 --> 00:10:37,519 evf for this talk that is not a 298 00:10:37,519 --> 00:10:40,200 guarantee it is the observability side 299 00:10:40,200 --> 00:10:43,760 um and I'll go into reasons why later um 300 00:10:43,760 --> 00:10:45,360 but you don't actually need to be 301 00:10:45,360 --> 00:10:47,120 runting your own ebpf programs for this 302 00:10:47,120 --> 00:10:49,240 stuff Parker the tooling it you know if 303 00:10:49,240 --> 00:10:52,160 you want to you want welcome to uh but 304 00:10:52,160 --> 00:10:53,760 if you uh if you just want to take the 305 00:10:53,760 --> 00:10:54,959 tool and run it off the shelf that's 306 00:10:54,959 --> 00:10:57,120 also fine too um but yeah if you want to 307 00:10:57,120 --> 00:10:58,880 go and learn on the EF it's it's really 308 00:10:58,880 --> 00:11:00,440 cool stuff 309 00:11:00,440 --> 00:11:02,079 uh functionally why is it performant so 310 00:11:02,079 --> 00:11:03,600 this is the user space and kernel space 311 00:11:03,600 --> 00:11:05,399 kind of boundary um there is a high 312 00:11:05,399 --> 00:11:07,079 volume yeah that ring buffer in this 313 00:11:07,079 --> 00:11:08,320 case it's Cy because that's their 314 00:11:08,320 --> 00:11:10,120 documentation but yeah you can see the 315 00:11:10,120 --> 00:11:12,079 evf program running within the kernel 316 00:11:12,079 --> 00:11:14,360 boundary itself and there is a you a 317 00:11:14,360 --> 00:11:16,200 tight loop around that low volume data 318 00:11:16,200 --> 00:11:18,320 bouncing back and forth more detail than 319 00:11:18,320 --> 00:11:20,760 that you don't need to jump into so much 320 00:11:20,760 --> 00:11:24,320 deta detail for this talk uh Parker is 321 00:11:24,320 --> 00:11:25,880 the specific tool that I mentioned um it 322 00:11:25,880 --> 00:11:28,320 allows for continuous profiling via EF 323 00:11:28,320 --> 00:11:30,240 the reason why that is uh interesting as 324 00:11:30,240 --> 00:11:32,519 I mentioned is performance um uh and in 325 00:11:32,519 --> 00:11:36,440 our case we really just care about CPU 326 00:11:36,440 --> 00:11:39,040 um uh it also has broad language support 327 00:11:39,040 --> 00:11:41,040 which is pretty handy so a bunch of 328 00:11:41,040 --> 00:11:42,440 ahead of time so things that are 329 00:11:42,440 --> 00:11:45,720 compiled C C++ go and so on just intire 330 00:11:45,720 --> 00:11:48,600 CLE uh compiled languages um and then 331 00:11:48,600 --> 00:11:50,600 very excitingly uh interpreted languages 332 00:11:50,600 --> 00:11:51,959 this is really cool and I will not go 333 00:11:51,959 --> 00:11:53,959 down this rapbit hole for this talk but 334 00:11:53,959 --> 00:11:57,760 um uh how they have uh dwarf stack uh 335 00:11:57,760 --> 00:11:59,600 stack unwinding as part of that is 336 00:11:59,600 --> 00:12:02,279 pretty cool um 337 00:12:02,279 --> 00:12:04,720 so that's most of the that's all the 338 00:12:04,720 --> 00:12:06,120 background on continuous profiling of 339 00:12:06,120 --> 00:12:07,920 the stuff that you need there uh really 340 00:12:07,920 --> 00:12:09,160 all you need to know is that it gives us 341 00:12:09,160 --> 00:12:11,279 high performance language agnostic CPU 342 00:12:11,279 --> 00:12:14,600 Profiles In this case so you still with 343 00:12:14,600 --> 00:12:18,199 me good cool great all right concept 344 00:12:18,199 --> 00:12:20,720 number two reachability analysis right 345 00:12:20,720 --> 00:12:23,639 so the academic definition is uh it's a 346 00:12:23,639 --> 00:12:25,120 method used to determine whether a 347 00:12:25,120 --> 00:12:26,440 particular state or condition of system 348 00:12:26,440 --> 00:12:28,519 is reached from a given initial State 349 00:12:28,519 --> 00:12:30,880 that's a bit too for me I like referring 350 00:12:30,880 --> 00:12:33,600 to it as a library so imagine you want 351 00:12:33,600 --> 00:12:36,120 to give access to your child to a book 352 00:12:36,120 --> 00:12:37,920 but there swear words in books in the 353 00:12:37,920 --> 00:12:40,320 library somewhere um you obviously don't 354 00:12:40,320 --> 00:12:42,279 want your child to read those bad words 355 00:12:42,279 --> 00:12:43,720 so instead of saying hey I'm just going 356 00:12:43,720 --> 00:12:45,279 to block you from the whole Library you 357 00:12:45,279 --> 00:12:48,519 actually go to the Shelf go to the get 358 00:12:48,519 --> 00:12:50,519 the book read the the the chapter the 359 00:12:50,519 --> 00:12:52,680 page the sentence does that sentence 360 00:12:52,680 --> 00:12:55,880 actually contain the swear word no okay 361 00:12:55,880 --> 00:12:57,279 fine your child can read the sentence 362 00:12:57,279 --> 00:12:59,839 that's fine oh it does maybe don't read 363 00:12:59,839 --> 00:13:01,399 that page instead of just throwing out 364 00:13:01,399 --> 00:13:03,440 the whole Library so actually drilling 365 00:13:03,440 --> 00:13:06,279 into whether it's reachable or not is 366 00:13:06,279 --> 00:13:07,720 the best metaphor I've heard for 367 00:13:07,720 --> 00:13:10,320 reachability analysis um now tooling 368 00:13:10,320 --> 00:13:12,519 around this SRA is a is a very popular 369 00:13:12,519 --> 00:13:13,760 tool around this there's a couple other 370 00:13:13,760 --> 00:13:17,199 ones um I mention on other slides um but 371 00:13:17,199 --> 00:13:18,760 they just make it really easy in yaml 372 00:13:18,760 --> 00:13:20,199 that you write the rules around what's 373 00:13:20,199 --> 00:13:21,839 reachable right so exec in this 374 00:13:21,839 --> 00:13:24,079 particular case is a bad JavaScript 375 00:13:24,079 --> 00:13:25,320 pattern we don't want to allow that in 376 00:13:25,320 --> 00:13:27,880 our code base let's write a sem rule to 377 00:13:27,880 --> 00:13:32,760 block that great um now I was a little 378 00:13:32,760 --> 00:13:35,120 unfair when I said that V management is 379 00:13:35,120 --> 00:13:37,120 broken we can probably drill into this 380 00:13:37,120 --> 00:13:39,560 in a bit more detail of exactly the 381 00:13:39,560 --> 00:13:41,959 level of this and so at the at the base 382 00:13:41,959 --> 00:13:43,440 level manifest analysis right it just 383 00:13:43,440 --> 00:13:44,680 looks at you know what are the packages 384 00:13:44,680 --> 00:13:46,560 pulled in that's thrown out the library 385 00:13:46,560 --> 00:13:49,000 right that's not useful right where it 386 00:13:49,000 --> 00:13:51,079 just looks at the Manifest file and any 387 00:13:51,079 --> 00:13:53,360 open source just the library by name 388 00:13:53,360 --> 00:13:55,839 throw it out right lock file analysis is 389 00:13:55,839 --> 00:13:57,800 is an incremental step on top of that 390 00:13:57,800 --> 00:13:59,680 where it's hey it's it's the name of the 391 00:13:59,680 --> 00:14:02,079 package and the version and that's 392 00:14:02,079 --> 00:14:03,800 better because hey maybe there's a cve 393 00:14:03,800 --> 00:14:05,839 for that particular version and we don't 394 00:14:05,839 --> 00:14:06,880 you know if you've got a patch version 395 00:14:06,880 --> 00:14:08,920 you're fine but it's still too noisy 396 00:14:08,920 --> 00:14:10,920 right that's that's you know it was lock 397 00:14:10,920 --> 00:14:12,440 file analysis that was pulling up the 398 00:14:12,440 --> 00:14:15,680 30,000 before static analysis is is 399 00:14:15,680 --> 00:14:18,040 where that s level comes in reachability 400 00:14:18,040 --> 00:14:19,320 to actually do that you look at the 401 00:14:19,320 --> 00:14:20,759 codebase and you do that walk through 402 00:14:20,759 --> 00:14:23,519 the library but it's not quite far 403 00:14:23,519 --> 00:14:25,920 enough towards Dynamic analysis right 404 00:14:25,920 --> 00:14:26,959 where you actually look at the 405 00:14:26,959 --> 00:14:29,440 application during runtime Capt the real 406 00:14:29,440 --> 00:14:32,199 data on this dependencies interaction uh 407 00:14:32,199 --> 00:14:33,720 to give that you know most precise 408 00:14:33,720 --> 00:14:36,480 insights right so in this level right so 409 00:14:36,480 --> 00:14:38,600 you know number one way too damn noisy 410 00:14:38,600 --> 00:14:41,360 level two also over 9,000 level three is 411 00:14:41,360 --> 00:14:42,839 kind of where the best inclass tooling 412 00:14:42,839 --> 00:14:46,240 is today right some code ql uh OS depth 413 00:14:46,240 --> 00:14:48,959 scan a few different options there but 414 00:14:48,959 --> 00:14:50,800 it really only gives you a bullan thumbs 415 00:14:50,800 --> 00:14:52,759 up thumbs down is this thing reachable 416 00:14:52,759 --> 00:14:53,480 or 417 00:14:53,480 --> 00:14:57,639 not what if there was a better 418 00:14:57,639 --> 00:15:00,399 option cool so yeah it helps us with 419 00:15:00,399 --> 00:15:01,720 improving the signals noise of the over 420 00:15:01,720 --> 00:15:04,480 9,000 problem but it's still limited by 421 00:15:04,480 --> 00:15:06,600 Static analysis and that ballon 422 00:15:06,600 --> 00:15:09,279 approach 423 00:15:09,279 --> 00:15:12,560 so sorry I we get to the new stuff 424 00:15:12,560 --> 00:15:14,399 ear what 425 00:15:14,399 --> 00:15:17,079 if 1 426 00:15:17,079 --> 00:15:21,839 plus 2 ha look now I'm no mathologist 427 00:15:21,839 --> 00:15:24,800 but if we had an actual way that we 428 00:15:24,800 --> 00:15:28,000 could sample the running performance of 429 00:15:28,000 --> 00:15:30,720 applications to determine whether or how 430 00:15:30,720 --> 00:15:32,800 frequently that copath shows up with the 431 00:15:32,800 --> 00:15:34,399 knowledge of knowing whether or not that 432 00:15:34,399 --> 00:15:36,560 vulnerability is reachable that's a 433 00:15:36,560 --> 00:15:38,920 percentage that's a likelihood we could 434 00:15:38,920 --> 00:15:42,959 put a number on that Val um that would 435 00:15:42,959 --> 00:15:45,639 be runtime reachability right so how can 436 00:15:45,639 --> 00:15:48,839 we achieve that so in simple terms this 437 00:15:48,839 --> 00:15:50,360 flame graph right you can just look at 438 00:15:50,360 --> 00:15:52,720 like this one that's all the way up here 439 00:15:52,720 --> 00:15:54,519 that's less likely than something that's 440 00:15:54,519 --> 00:15:56,680 triggered a lot more of the time right 441 00:15:56,680 --> 00:15:59,079 um you know in a simplified version of 442 00:15:59,079 --> 00:16:00,720 right so here's a couple right the 443 00:16:00,720 --> 00:16:03,199 common cheap thing that doesn't have a a 444 00:16:03,199 --> 00:16:05,440 longer sleep or the rare expensive thing 445 00:16:05,440 --> 00:16:07,199 the analogy I like using here is like 446 00:16:07,199 --> 00:16:10,519 imagine this is a um you you go to the 447 00:16:10,519 --> 00:16:12,399 web web page and and every single 448 00:16:12,399 --> 00:16:14,000 request there's a pram there that's like 449 00:16:14,000 --> 00:16:16,079 hackable equals false and every single 450 00:16:16,079 --> 00:16:18,160 user hits that it's a matter of time 451 00:16:18,160 --> 00:16:20,519 before someone looks at that and goes 452 00:16:20,519 --> 00:16:23,199 hackable equals true versus something in 453 00:16:23,199 --> 00:16:25,199 a weird off exception Handler that's 454 00:16:25,199 --> 00:16:28,639 never triggered 00 1% of the time that's 455 00:16:28,639 --> 00:16:30,399 less likely than something that's really 456 00:16:30,399 --> 00:16:31,959 really visible and is actually triggered 457 00:16:31,959 --> 00:16:33,759 all the time um and also with the 458 00:16:33,759 --> 00:16:35,519 benefit of reachability analysis the 459 00:16:35,519 --> 00:16:37,399 stuff that's not vulnerable we don't 460 00:16:37,399 --> 00:16:38,800 have to care about that right we're only 461 00:16:38,800 --> 00:16:40,560 caring about things that are confirmed 462 00:16:40,560 --> 00:16:42,639 to be vulnerable um and there's a PE 463 00:16:42,639 --> 00:16:44,319 link to some actual samples that we we 464 00:16:44,319 --> 00:16:46,519 put up um people ear is from Parker it's 465 00:16:46,519 --> 00:16:49,279 a good visualization tool check it 466 00:16:49,279 --> 00:16:51,600 out uh and so here's here's the actual 467 00:16:51,600 --> 00:16:53,959 samples that we run right so you know uh 468 00:16:53,959 --> 00:16:56,360 in this case we can see you know 94.8% 469 00:16:56,360 --> 00:16:59,880 of the time versus 01 uh sorry 0 7% of 470 00:16:59,880 --> 00:17:01,839 the time right of those two assuming 471 00:17:01,839 --> 00:17:03,839 equal levels of criticality of the 472 00:17:03,839 --> 00:17:05,959 vulnerability of those two which one 473 00:17:05,959 --> 00:17:08,720 would you patch first right the 94% 474 00:17:08,720 --> 00:17:11,039 right that it just seems intuitive to me 475 00:17:11,039 --> 00:17:12,599 but this is what I want your feedback 476 00:17:12,599 --> 00:17:14,679 like you know come Heckle me afterwards 477 00:17:14,679 --> 00:17:16,199 tell me why I'm wrong please but this 478 00:17:16,199 --> 00:17:17,839 seems like a logical way that we should 479 00:17:17,839 --> 00:17:20,039 be trying to prioritize 480 00:17:20,039 --> 00:17:22,119 vulnerabilities um now the obvious 481 00:17:22,119 --> 00:17:23,880 question for those that might here where 482 00:17:23,880 --> 00:17:25,439 do we get these symbol information from 483 00:17:25,439 --> 00:17:27,000 right because you need to know what the 484 00:17:27,000 --> 00:17:30,240 vulnerable code path is right um well 485 00:17:30,240 --> 00:17:32,480 thankfully some ecosystems do thank you 486 00:17:32,480 --> 00:17:36,000 go go gives vable simple information uh 487 00:17:36,000 --> 00:17:37,160 right there and so you can say for this 488 00:17:37,160 --> 00:17:38,679 particular vulnerability which maps to a 489 00:17:38,679 --> 00:17:41,640 cve this is the specific function right 490 00:17:41,640 --> 00:17:44,039 it's not exploitability right it doesn't 491 00:17:44,039 --> 00:17:45,880 say hey here's the payload that you need 492 00:17:45,880 --> 00:17:47,760 to go in there but you can at least go 493 00:17:47,760 --> 00:17:50,520 look at that map it to a profile and say 494 00:17:50,520 --> 00:17:51,919 if that name is the same as the other 495 00:17:51,919 --> 00:17:54,640 one cool that's yeah that's reachable 496 00:17:54,640 --> 00:17:58,440 enough um but how do we do this for uh 497 00:17:58,440 --> 00:17:59,400 other 498 00:17:59,400 --> 00:18:01,960 ecosystems uh this is the fun challenge 499 00:18:01,960 --> 00:18:05,000 so uh osv is a is a data structure for 500 00:18:05,000 --> 00:18:06,799 open source vulnerabilities um it 501 00:18:06,799 --> 00:18:08,080 contains this information because 502 00:18:08,080 --> 00:18:10,240 there's you know there's goons there's 503 00:18:10,240 --> 00:18:12,159 you know GitHub security advisories 504 00:18:12,159 --> 00:18:13,880 there's cdes this is just a way that 505 00:18:13,880 --> 00:18:16,080 they all get aggregated into a Json data 506 00:18:16,080 --> 00:18:19,240 structure excuse me uh that uh is is 507 00:18:19,240 --> 00:18:21,200 easily wrang Wrangle and they have a 508 00:18:21,200 --> 00:18:23,080 field across you know all the different 509 00:18:23,080 --> 00:18:24,320 languages they have the field for 510 00:18:24,320 --> 00:18:27,640 symbols within go um and it looks like 511 00:18:27,640 --> 00:18:29,120 this right so in this particular Cas I 512 00:18:29,120 --> 00:18:30,400 trimed a little bit with the simple 513 00:18:30,400 --> 00:18:33,000 field post user login in this 514 00:18:33,000 --> 00:18:36,120 case now the magic of AI comes in very 515 00:18:36,120 --> 00:18:39,919 heavy at this point so I uh pre-trained 516 00:18:39,919 --> 00:18:41,200 a specific thing with a couple of 517 00:18:41,200 --> 00:18:43,240 prompts and yeah here you're yeah expert 518 00:18:43,240 --> 00:18:45,360 security uh uh sorry you're a security 519 00:18:45,360 --> 00:18:46,679 expert performing the task of enriching 520 00:18:46,679 --> 00:18:48,440 known vulnerability data from publicly 521 00:18:48,440 --> 00:18:50,000 available sources to assist software 522 00:18:50,000 --> 00:18:51,360 developers to better patch their 523 00:18:51,360 --> 00:18:52,960 applications I've also found that 524 00:18:52,960 --> 00:18:54,760 providing evocative language like it's 525 00:18:54,760 --> 00:18:56,640 it's you know really important that you 526 00:18:56,640 --> 00:18:58,919 do a good job uh improves the accuracy 527 00:18:58,919 --> 00:19:01,880 these things um I gave it that existing 528 00:19:01,880 --> 00:19:04,760 J go Json uh structure and said here's 529 00:19:04,760 --> 00:19:07,400 an example of this particular one and 530 00:19:07,400 --> 00:19:09,039 then uh you don't see it quite in the 531 00:19:09,039 --> 00:19:11,080 notes here but in the attachment I gave 532 00:19:11,080 --> 00:19:13,600 it a reference to a new cvd from Ruby 533 00:19:13,600 --> 00:19:15,039 which does not provide this simple 534 00:19:15,039 --> 00:19:18,640 information a link to the code base and 535 00:19:18,640 --> 00:19:21,200 said hey read the CV information natural 536 00:19:21,200 --> 00:19:23,880 language infer from that and the code 537 00:19:23,880 --> 00:19:26,400 base populate this field for simple 538 00:19:26,400 --> 00:19:29,679 information please um 539 00:19:29,679 --> 00:19:33,000 and it didn't the accuracy is okay it's 540 00:19:33,000 --> 00:19:34,840 certainly not completely automatable you 541 00:19:34,840 --> 00:19:36,440 still need a human in the loop to verify 542 00:19:36,440 --> 00:19:38,880 these things but it's at a point where 543 00:19:38,880 --> 00:19:40,360 um uh and definitely play around with 544 00:19:40,360 --> 00:19:41,640 the different models I found complexity 545 00:19:41,640 --> 00:19:45,080 to be the most accurate um uh the you 546 00:19:45,080 --> 00:19:46,320 know the information that you get out of 547 00:19:46,320 --> 00:19:48,520 these things is is um is is close enough 548 00:19:48,520 --> 00:19:49,880 where we can actually start possibly 549 00:19:49,880 --> 00:19:51,360 creating these forther languages which 550 00:19:51,360 --> 00:19:54,000 is exciting uh and yeah here you go so 551 00:19:54,000 --> 00:19:55,360 this is the the ones that are created 552 00:19:55,360 --> 00:19:56,840 for that particular CV that previously 553 00:19:56,840 --> 00:19:58,919 didn't have civil information so now now 554 00:19:58,919 --> 00:20:00,760 I'm getting osv structured documents 555 00:20:00,760 --> 00:20:02,280 with simple information for languages 556 00:20:02,280 --> 00:20:04,919 that don't provided by default for cves 557 00:20:04,919 --> 00:20:07,039 right okay so I've got simple 558 00:20:07,039 --> 00:20:09,200 information and I've got now possibly 559 00:20:09,200 --> 00:20:12,320 the ability to continuously profile some 560 00:20:12,320 --> 00:20:16,200 stuff cool uh please give it a crap so 561 00:20:16,200 --> 00:20:18,760 uh deploy Parker yourselves in clusters 562 00:20:18,760 --> 00:20:20,799 so Parker is very easy to deploy within 563 00:20:20,799 --> 00:20:22,840 kubernetes um uh they've got a bunch of 564 00:20:22,840 --> 00:20:24,240 Helm charts and stuff that you can Dey 565 00:20:24,240 --> 00:20:26,400 yourself um play around with you know 566 00:20:26,400 --> 00:20:29,440 complexity or whichever AI system you 567 00:20:29,440 --> 00:20:32,320 um and there's OS the. Dev simple 568 00:20:32,320 --> 00:20:34,039 information for generating that and then 569 00:20:34,039 --> 00:20:35,720 filter based off the percentage that 570 00:20:35,720 --> 00:20:37,960 makes sense to your organization which 571 00:20:37,960 --> 00:20:41,400 got trimmed off that slide um uh so for 572 00:20:41,400 --> 00:20:42,960 me the way that I imagined this would 573 00:20:42,960 --> 00:20:44,640 actually be showing out right so you've 574 00:20:44,640 --> 00:20:45,760 got something like this in your 575 00:20:45,760 --> 00:20:47,640 dashboard you've got this big toggle up 576 00:20:47,640 --> 00:20:49,080 the front and you go hey for our 577 00:20:49,080 --> 00:20:50,679 organization you know I need to 578 00:20:50,679 --> 00:20:52,000 prioritize my efforts I'm just going to 579 00:20:52,000 --> 00:20:54,880 start with things that are above 80% 580 00:20:54,880 --> 00:20:56,960 likely and then you just filter it down 581 00:20:56,960 --> 00:20:58,600 and then you have a list of more 582 00:20:58,600 --> 00:20:59,919 manageable things and then once you do 583 00:20:59,919 --> 00:21:02,080 that first pass okay cool maybe you can 584 00:21:02,080 --> 00:21:03,520 tackle it down right with infinite 585 00:21:03,520 --> 00:21:05,679 resources you'd love to patch everything 586 00:21:05,679 --> 00:21:08,640 but that's not reason um and so that's 587 00:21:08,640 --> 00:21:09,799 the thing that I want to call out is 588 00:21:09,799 --> 00:21:11,120 that this is absolutely not saying that 589 00:21:11,120 --> 00:21:12,440 we shouldn't patch the things right if 590 00:21:12,440 --> 00:21:14,320 we had infite resources absolutely right 591 00:21:14,320 --> 00:21:15,679 it's not to say that things that are 592 00:21:15,679 --> 00:21:17,600 less likely are not exploitable they 593 00:21:17,600 --> 00:21:19,960 still are you should try and Patch them 594 00:21:19,960 --> 00:21:22,000 however we're all constrainted in terms 595 00:21:22,000 --> 00:21:24,279 of our resources and so we need a 596 00:21:24,279 --> 00:21:27,480 ability to uh yeah determine which ones 597 00:21:27,480 --> 00:21:29,360 actually make sense and so okay well 598 00:21:29,360 --> 00:21:30,400 this one's more likely I'm going to 599 00:21:30,400 --> 00:21:34,039 prioritize those ones first um yeah uh 600 00:21:34,039 --> 00:21:36,720 that's that's the concept of it um yeah 601 00:21:36,720 --> 00:21:38,159 by the way I'm hiring uh pretty much 602 00:21:38,159 --> 00:21:40,679 across the board um uh this is kind of a 603 00:21:40,679 --> 00:21:42,960 more of a research project um but uh 604 00:21:42,960 --> 00:21:45,520 yeah apps in for DNR um if you're 605 00:21:45,520 --> 00:21:47,320 interested in stuff please come have a 606 00:21:47,320 --> 00:21:49,559 chat that's the speed round of the talk 607 00:21:49,559 --> 00:21:52,000 uh I believe we've got heaps of time uh 608 00:21:52,000 --> 00:21:53,720 cuz I absolutely spred around that and 609 00:21:53,720 --> 00:21:56,279 had way too much coffee um but hopefully 610 00:21:56,279 --> 00:21:58,039 that was interesting uh I can hang 611 00:21:58,039 --> 00:21:59,880 around for Q Anda afterwards thank you 612 00:21:59,880 --> 00:22:00,690 so 613 00:22:00,690 --> 00:22:07,320 [Applause] 614 00:22:07,320 --> 00:22:09,880 much one thing I forgot to mention it's 615 00:22:09,880 --> 00:22:12,120 actually Frenchie's birthday today we 616 00:22:12,120 --> 00:22:14,919 should all give him a round of applause 617 00:22:14,919 --> 00:22:15,840 thanks 618 00:22:15,840 --> 00:22:19,879 bu for a great talk