1 00:00:00,390 --> 00:00:03,510 [Music] 2 00:00:04,640 --> 00:00:06,399 my name is Sierra hes I'm one of the 3 00:00:06,399 --> 00:00:09,000 challenge project designers for are the 4 00:00:09,000 --> 00:00:13,480 AAG CC I'm part of the Java team and we 5 00:00:13,480 --> 00:00:15,519 implemented a number of vulnerabilities 6 00:00:15,519 --> 00:00:17,640 into our challenge project of Jenkins we 7 00:00:17,640 --> 00:00:19,279 chose Jenkins as one of the most 8 00:00:19,279 --> 00:00:21,640 commonly used automation sources on the 9 00:00:21,640 --> 00:00:24,439 Internet it's seen as the standard defao 10 00:00:24,439 --> 00:00:26,679 way of doing open source stops this 11 00:00:26,679 --> 00:00:28,199 piece of software has thousands of 12 00:00:28,199 --> 00:00:30,279 plugins and has grown organically for 13 00:00:30,279 --> 00:00:33,360 years from the community securing and 14 00:00:33,360 --> 00:00:35,559 enabling more trust in the 15 00:00:35,559 --> 00:00:37,440 community-based plugins is something 16 00:00:37,440 --> 00:00:38,840 that would really help the internet out 17 00:00:38,840 --> 00:00:39,960 this is one of those fundamental 18 00:00:39,960 --> 00:00:42,559 building blocks of how software is even 19 00:00:42,559 --> 00:00:45,160 developed and pushed out we've chosen 20 00:00:45,160 --> 00:00:47,719 two plugins the git extension plugin 21 00:00:47,719 --> 00:00:51,280 which is used to 95% of all installs and 22 00:00:51,280 --> 00:00:53,800 then the email extension plugin which is 23 00:00:53,800 --> 00:00:55,960 used around 85% both of these come 24 00:00:55,960 --> 00:00:57,480 enabled by default some people have 25 00:00:57,480 --> 00:00:59,239 chosen that TR them off they're some of 26 00:00:59,239 --> 00:01:01,480 the most popular plugins in use on 27 00:01:01,480 --> 00:01:03,480 GitHub and so their complexity that they 28 00:01:03,480 --> 00:01:06,119 kind of encapsulate really will test 29 00:01:06,119 --> 00:01:08,680 crs's and their ability to find for 30 00:01:08,680 --> 00:01:10,920 abilities in thousands of other plugins 31 00:01:10,920 --> 00:01:11,880 within that 32 00:01:11,880 --> 00:01:14,640 ecosystem in these challenges the uh 33 00:01:14,640 --> 00:01:16,640 crs's are going to be faced with having 34 00:01:16,640 --> 00:01:18,960 to manipulate a state machine this is a 35 00:01:18,960 --> 00:01:21,720 common programming Paradigm for a lot of 36 00:01:21,720 --> 00:01:24,840 uh event driven systems and so we see 37 00:01:24,840 --> 00:01:26,920 this pattern throughout plugins in 38 00:01:26,920 --> 00:01:30,000 Jenkins ecosystem emulating this really 39 00:01:30,000 --> 00:01:33,280 put crs's to the test in terms of they 40 00:01:33,280 --> 00:01:35,079 need to have an extreme attention to 41 00:01:35,079 --> 00:01:37,759 detail but then also manipulate the 42 00:01:37,759 --> 00:01:39,399 state machine to actually reach the 43 00:01:39,399 --> 00:01:41,600 vulnerability is is also quite 44 00:01:41,600 --> 00:01:44,360 complicated I expect that several crss 45 00:01:44,360 --> 00:01:45,719 are going to find the bugs but not know 46 00:01:45,719 --> 00:01:48,200 how to get to them Jenkins is is a 47 00:01:48,200 --> 00:01:50,560 massive massive challenge project to 48 00:01:50,560 --> 00:01:52,439 encapsulate and so the team spent a lot 49 00:01:52,439 --> 00:01:55,759 of time wrapping and building Jenkins in 50 00:01:55,759 --> 00:01:58,680 a way that will enable crss to easily 51 00:01:58,680 --> 00:02:00,880 Harse the build structure as well as the 52 00:02:00,880 --> 00:02:03,479 plugins cuz it is definitely challenging 53 00:02:03,479 --> 00:02:06,079 it really will test how much memory they 54 00:02:06,079 --> 00:02:08,399 have and how many rules of the system 55 00:02:08,399 --> 00:02:10,840 that they can analyze develop or 56 00:02:10,840 --> 00:02:13,599 enumerate so this is the DAT machine 57 00:02:13,599 --> 00:02:15,800 that we have integrated into Jenkin and 58 00:02:15,800 --> 00:02:18,319 injected vulnerabilities in so starting 59 00:02:18,319 --> 00:02:20,319 with the email plugin the first 60 00:02:20,319 --> 00:02:21,720 vulnerability that is present in the 61 00:02:21,720 --> 00:02:24,480 system is that an assumption made by the 62 00:02:24,480 --> 00:02:26,000 programmer is that we will always 63 00:02:26,000 --> 00:02:28,360 progress forward in time and we will 64 00:02:28,360 --> 00:02:30,560 never try and jump back in time 65 00:02:30,560 --> 00:02:32,879 this check right here says look we need 66 00:02:32,879 --> 00:02:36,480 to make sure that we will never go over 67 00:02:36,480 --> 00:02:38,239 the maximum states that we have in the 68 00:02:38,239 --> 00:02:40,680 system and crash but there's no check to 69 00:02:40,680 --> 00:02:42,599 see like are we going backwards the 70 00:02:42,599 --> 00:02:44,800 expected flow from the programmer was 71 00:02:44,800 --> 00:02:46,400 okay they're going to send me state zero 72 00:02:46,400 --> 00:02:48,680 I'm going to do my construction case one 73 00:02:48,680 --> 00:02:50,959 I'm going to set some values I'm going 74 00:02:50,959 --> 00:02:53,319 to configure things I'm going to mark it 75 00:02:53,319 --> 00:02:55,680 as okay for publishing want to do some 76 00:02:55,680 --> 00:02:58,720 Tiding up and then finally I am going to 77 00:02:58,720 --> 00:03:00,920 close this whole system come down and 78 00:03:00,920 --> 00:03:02,319 that's kind of the flow that a 79 00:03:02,319 --> 00:03:05,560 programmer designed this around but 80 00:03:05,560 --> 00:03:08,319 there's always a flaw in complex systems 81 00:03:08,319 --> 00:03:10,879 like this and it's due to assumptions 82 00:03:10,879 --> 00:03:12,879 that a programmer makes so now that we 83 00:03:12,879 --> 00:03:14,879 can move backwards there is an implicit 84 00:03:14,879 --> 00:03:17,000 assumption inside of some of these 85 00:03:17,000 --> 00:03:19,519 functions that these values will be Sav 86 00:03:19,519 --> 00:03:21,480 and here we set an email address in the 87 00:03:21,480 --> 00:03:25,080 system that is used as a reflective call 88 00:03:25,080 --> 00:03:27,440 inside of the Constructor and the 89 00:03:27,440 --> 00:03:29,120 programmer figured this was safe because 90 00:03:29,120 --> 00:03:31,000 you know if if no one moves backward in 91 00:03:31,000 --> 00:03:32,239 time they're not going to do anything 92 00:03:32,239 --> 00:03:35,000 bad with this but now that we can do 93 00:03:35,000 --> 00:03:37,480 that a CRS should be able to find okay 94 00:03:37,480 --> 00:03:39,239 if I move forward to the the state a 95 00:03:39,239 --> 00:03:40,640 certain amount and then I go back in 96 00:03:40,640 --> 00:03:42,280 time a little bit and I change this 97 00:03:42,280 --> 00:03:45,799 value here and then I set my state to 98 00:03:45,799 --> 00:03:47,760 zero again all of a sudden I'm able to 99 00:03:47,760 --> 00:03:49,560 call arbitrary code and this is called 100 00:03:49,560 --> 00:03:52,319 reflective code injection the idea of 101 00:03:52,319 --> 00:03:55,439 progressing forward in time jumping 102 00:03:55,439 --> 00:03:57,120 backwards going forward again and then 103 00:03:57,120 --> 00:03:58,480 jumping backwards it might seem like 104 00:03:58,480 --> 00:04:00,680 time travel but it's a common 105 00:04:00,680 --> 00:04:03,079 programming Paradigm that people use but 106 00:04:03,079 --> 00:04:05,799 you can visualize this system as a maze 107 00:04:05,799 --> 00:04:07,760 uh and the CRS has to figure out which 108 00:04:07,760 --> 00:04:09,360 state to go through and how to get 109 00:04:09,360 --> 00:04:11,519 through the Maze and each level of 110 00:04:11,519 --> 00:04:13,599 difficulty drastically increases the 111 00:04:13,599 --> 00:04:17,160 amount of pathing that a CRS will need 112 00:04:17,160 --> 00:04:19,639 to take in order to find and expl this 113 00:04:19,639 --> 00:04:22,000 vulnerability hatching bugs is very 114 00:04:22,000 --> 00:04:24,199 difficult not only do you have to 115 00:04:24,199 --> 00:04:25,720 maintain the functionality of the 116 00:04:25,720 --> 00:04:28,120 program like if I if I went through and 117 00:04:28,120 --> 00:04:30,680 I just deleted this entire chunk of code 118 00:04:30,680 --> 00:04:33,080 the vulnerability is gone yeah great but 119 00:04:33,080 --> 00:04:35,960 also the functionality is is gone and we 120 00:04:35,960 --> 00:04:38,360 can't access that anymore and kind of 121 00:04:38,360 --> 00:04:41,160 the point of this project is to find and 122 00:04:41,160 --> 00:04:44,280 discover bugs in systems but also patch 123 00:04:44,280 --> 00:04:46,280 them patch them in a way that correctly 124 00:04:46,280 --> 00:04:48,639 fixes and addresses the vulnerability 125 00:04:48,639 --> 00:04:50,080 without affecting the functionality of 126 00:04:50,080 --> 00:04:51,680 the plugins we want to get this 127 00:04:51,680 --> 00:04:53,720 automatically across thousands thousands 128 00:04:53,720 --> 00:04:55,880 of 129 00:04:58,639 --> 00:05:02,680 plugins e