1 00:00:00,390 --> 00:00:03,510 [Music] 2 00:00:05,400 --> 00:00:07,000 so Sirus can interact with the challenge 3 00:00:07,000 --> 00:00:08,400 project in many different ways 4 00:00:08,400 --> 00:00:10,519 everything from just reading the text of 5 00:00:10,519 --> 00:00:12,440 the source code all the way to 6 00:00:12,440 --> 00:00:15,280 exercising and running the code itself 7 00:00:15,280 --> 00:00:18,279 now in aicc in order to score a CS has 8 00:00:18,279 --> 00:00:20,560 to be able to find a vulnerability and 9 00:00:20,560 --> 00:00:23,400 exercise it via a harness harness is a 10 00:00:23,400 --> 00:00:26,080 special program that allows an input to 11 00:00:26,080 --> 00:00:28,320 be received and then exercise a 12 00:00:28,320 --> 00:00:30,359 particular part of the the challenge 13 00:00:30,359 --> 00:00:33,200 project code on that input so if we were 14 00:00:33,200 --> 00:00:35,000 to look at the challenge project Al 15 00:00:35,000 --> 00:00:37,040 together in this visual we have all of 16 00:00:37,040 --> 00:00:39,079 these green nodes around 11,000 17 00:00:39,079 --> 00:00:41,320 functions that make up the tika 18 00:00:41,320 --> 00:00:43,600 challenge project and so this graph 19 00:00:43,600 --> 00:00:45,280 shows you all the connections between 20 00:00:45,280 --> 00:00:47,399 these functions as in one function can 21 00:00:47,399 --> 00:00:49,280 call another and how you can reach all 22 00:00:49,280 --> 00:00:51,840 of these different nodes so a harness is 23 00:00:51,840 --> 00:00:53,280 going to expose part of this 24 00:00:53,280 --> 00:00:56,840 functionality about 1,000 of the 11,000 25 00:00:56,840 --> 00:00:58,879 total nodes are reachable from this one 26 00:00:58,879 --> 00:01:00,399 particular 27 00:01:00,399 --> 00:01:03,480 and so a CRS has to generate an input 28 00:01:03,480 --> 00:01:05,519 that when it's fed to the harness will 29 00:01:05,519 --> 00:01:07,560 reach the vulnerable location and 30 00:01:07,560 --> 00:01:09,680 exercise that vulnerability so if we 31 00:01:09,680 --> 00:01:12,000 were to look at that going from the 32 00:01:12,000 --> 00:01:14,040 entry point of the harness all the way 33 00:01:14,040 --> 00:01:16,439 to where a vulnerability is exercise 34 00:01:16,439 --> 00:01:17,799 that's going to be highlighted in red 35 00:01:17,799 --> 00:01:20,799 here and so this shows visually a path 36 00:01:20,799 --> 00:01:23,360 from the entry point on the left through 37 00:01:23,360 --> 00:01:25,439 the code all the way to the point where 38 00:01:25,439 --> 00:01:28,280 the vulnerability triers sanitizer the 39 00:01:28,280 --> 00:01:30,119 sanitizer is special instrumentation 40 00:01:30,119 --> 00:01:31,520 that detects when particular things 41 00:01:31,520 --> 00:01:35,040 happen like a buffer overflow or a 42 00:01:35,040 --> 00:01:36,920 memory access out of bounds and so 43 00:01:36,920 --> 00:01:38,960 triggering a sanitizer is a proof of 44 00:01:38,960 --> 00:01:41,920 vulnerability just part of what a CRS 45 00:01:41,920 --> 00:01:44,960 needs in order to score one of the ways 46 00:01:44,960 --> 00:01:47,719 that things can go wrong with a CRS is 47 00:01:47,719 --> 00:01:48,920 that it might be able to find a 48 00:01:48,920 --> 00:01:51,280 vulnerability in terms of I think this 49 00:01:51,280 --> 00:01:52,759 line of code is vulnerable but it 50 00:01:52,759 --> 00:01:55,079 doesn't know how to get there or it 51 00:01:55,079 --> 00:01:57,640 sends input but the input reaches that 52 00:01:57,640 --> 00:01:59,039 location it doesn't trigger the 53 00:01:59,039 --> 00:02:01,920 vulnerability now the crs's should be 54 00:02:01,920 --> 00:02:04,079 able to run the coat themselves and see 55 00:02:04,079 --> 00:02:06,880 the sanitizer is triggering or not but 56 00:02:06,880 --> 00:02:08,560 there's often a lot of difficulty in 57 00:02:08,560 --> 00:02:10,160 just figuring out how to reach the 58 00:02:10,160 --> 00:02:13,120 vulnerable location from the entry point 59 00:02:13,120 --> 00:02:14,519 there's a number of techniques that 60 00:02:14,519 --> 00:02:17,040 sosus can use to discover these pths to 61 00:02:17,040 --> 00:02:18,319 the vulnerable location and try to 62 00:02:18,319 --> 00:02:20,879 trigger the vulnerable location but one 63 00:02:20,879 --> 00:02:22,280 of the things that's interesting about 64 00:02:22,280 --> 00:02:25,200 ascc is it's not just about generating 65 00:02:25,200 --> 00:02:28,160 input that triggers a crou or a 66 00:02:28,160 --> 00:02:30,879 sanitizer but they also have to identify 67 00:02:30,879 --> 00:02:34,280 that line of code and in the history the 68 00:02:34,280 --> 00:02:35,920 commit history of all the changes that 69 00:02:35,920 --> 00:02:37,400 have been made they have to be able to 70 00:02:37,400 --> 00:02:39,920 identify when that vulnerability was 71 00:02:39,920 --> 00:02:43,280 introduced so in the case of Tikka here 72 00:02:43,280 --> 00:02:46,640 there's something on the order of 1500 73 00:02:46,640 --> 00:02:49,920 files uh source code files in Tika and 74 00:02:49,920 --> 00:02:51,599 if you were to look at the regular 75 00:02:51,599 --> 00:02:53,800 version of Tika on the internet there's 76 00:02:53,800 --> 00:02:56,200 something like 8,000 commits 8,000 77 00:02:56,200 --> 00:02:58,640 changes that stacked up to create the 78 00:02:58,640 --> 00:03:01,480 current version of that code so this 79 00:03:01,480 --> 00:03:02,959 version that we're looking at has all 80 00:03:02,959 --> 00:03:05,480 these vulnerabilities the question is 81 00:03:05,480 --> 00:03:07,159 not just how do you trigger it but when 82 00:03:07,159 --> 00:03:08,040 was it 83 00:03:08,040 --> 00:03:10,000 introduced so on the other hand if we 84 00:03:10,000 --> 00:03:12,239 think about how humans think about code 85 00:03:12,239 --> 00:03:15,040 we read it top to bottom and if we scan 86 00:03:15,040 --> 00:03:17,040 this piece of code here looking at these 87 00:03:17,040 --> 00:03:18,840 words that are highlighted in green you 88 00:03:18,840 --> 00:03:21,360 can see that this artist function talked 89 00:03:21,360 --> 00:03:24,599 about PA's other function and this is 90 00:03:24,599 --> 00:03:26,920 how the input is going to flow through 91 00:03:26,920 --> 00:03:28,439 and reach these other interesting parts 92 00:03:28,439 --> 00:03:31,959 of the code some these functions like 93 00:03:31,959 --> 00:03:34,239 said netlink packet are going to be 94 00:03:34,239 --> 00:03:36,720 interesting so if we go to where it's 95 00:03:36,720 --> 00:03:39,959 defined we can read this code now that 96 00:03:39,959 --> 00:03:41,799 jump that we just made from one to the 97 00:03:41,799 --> 00:03:43,480 next that's what's being shown in the 98 00:03:43,480 --> 00:03:45,239 call graph so the call graph gives us 99 00:03:45,239 --> 00:03:47,239 that top level view it's really 100 00:03:47,239 --> 00:03:49,480 interesting because CRS is don't think 101 00:03:49,480 --> 00:03:51,439 about code the way that human does they 102 00:03:51,439 --> 00:03:53,519 can process it and exercise it but 103 00:03:53,519 --> 00:03:56,239 really how they go from this starting 104 00:03:56,239 --> 00:03:57,920 point to finding the vulnerabilities is 105 00:03:57,920 --> 00:03:58,959 going to be one of the coolest parts of 106 00:03:58,959 --> 00:04:01,720 aicc