1 00:00:04,500 --> 00:00:05,920 My name is Sierra Hicks. 2 00:00:05,920 --> 00:00:10,340 I'm one of the challenge project designers for the AIXCC. 3 00:00:10,340 --> 00:00:17,560 I'm part of the Java team and we implemented a number of vulnerabilities into our challenge project of Jenkins. 4 00:00:17,560 --> 00:00:22,140 We chose Jenkins as one of the most commonly used automation sources on the internet. 5 00:00:22,320 --> 00:00:26,360 It's seen as the standard de facto way of doing open source DevOps. 6 00:00:26,360 --> 00:00:38,940 This piece of software has thousands of plugins and has grown organically for years from the community, securing and enabling more trust in the community-based plugins is something that would really help the internet out. 7 00:00:38,940 --> 00:00:44,380 This is one of those fundamental building blocks of how software is even developed and pushed out. 8 00:00:44,380 --> 00:00:46,440 We've chosen two plugins. 9 00:00:46,440 --> 00:00:55,140 The git extension plugin which is used in 95% of all installs and then the email extension plugin which is used around 85%. 10 00:00:55,140 --> 00:00:57,140 Both of these come enabled by default. 11 00:00:57,140 --> 00:00:58,960 Some people have chosen to turn them off. 12 00:00:58,960 --> 00:01:12,440 They're some of the most popular plugins in use on GitHub and so their complexity that they kind of encapsulate really will test CRSs in their ability to find vulnerabilities in thousands of other plugins within that ecosystem. 13 00:01:12,440 --> 00:01:18,700 In these challenges, the CRSs are going to be faced with having to manipulate a state machine. 14 00:01:18,700 --> 00:01:28,400 This is a common programming paradigm for a lot of event-driven systems and so we see this pattern throughout plugins in Jenkins ecosystem. 15 00:01:28,400 --> 00:01:42,540 Emulating this really puts CRSs to the test in terms of they need to have an extreme attention to detail but then also manipulate the state machine to actually reach the vulnerability is also quite complicated. 16 00:01:42,540 --> 00:01:47,000 I expect that several CRSs are going to find the bugs but not know how to get to them. 17 00:01:47,000 --> 00:02:03,480 Jenkins is a massive, massive challenge project to encapsulate and so the team spent a lot of time wrapping and building Jenkins in a way that will enable CRSs to easily parse the build structure as well as plugins because it is definitely challenging. 18 00:02:03,480 --> 00:02:11,700 It really will test how much memory they have and how many rules of the system that they can analyze, develop, or enumerate. 19 00:02:11,700 --> 00:02:17,520 So this is the state machine that we have integrated into Jenkins and injected vulnerabilities in. 20 00:02:17,520 --> 00:02:30,280 So starting with the email plugin, the first vulnerability that is present in the system is that an assumption made by the programmer is that we will always progress forward in time and we will never try and jump back in time. 21 00:02:30,280 --> 00:02:42,360 This check right here says look we need to make sure that we will never go over the maximum states that we have in the system and crash but there's no check to see like are we going backwards. 22 00:02:42,360 --> 00:02:56,440 The expected flow from the programmer was okay they're going to send me state zero, I'm going to do my construction, case one I'm going to set some values, I'm going to configure things, I'm going to mark it as okay for publishing, I'm going to do some tidying up, 23 00:02:56,440 --> 00:03:04,460 and then finally I am going to close this whole system down and that's kind of the flow that the programmer designed this around. 24 00:03:04,520 --> 00:03:12,140 But there's always a flaw in complex systems like this and it's due to assumptions that a programmer makes. 25 00:03:12,140 --> 00:03:19,480 So now that we can move backwards there is an implicit assumption inside of some of these functions that these values will be safe. 26 00:03:19,480 --> 00:03:33,340 And here we set an email address in the system that is used as a reflective call inside of the constructor and the programmer figured this was safe because you know if if no one moves backward in time they're not going to do anything bad with this. 27 00:03:33,360 --> 00:03:51,180 But now that we can do that a CRS should be able to find okay I move forward of this the state a certain amount and then I go back in time a little bit and I change this value here and then I set my state to zero again all of a sudden I'm able to call arbitrary code and this is called reflective code injection. 28 00:03:51,200 --> 00:04:02,980 The idea of progressing forward in time, jumping backwards, going forward again, and then jumping backwards it might seem like time travel but it's a common programming paradigm that people use. 29 00:04:02,980 --> 00:04:10,480 But you can visualize this system as a maze and the CRS has to figure out which state to go through and how to get through the maze. 30 00:04:10,480 --> 00:04:20,540 And each level of difficulty drastically increases the amount of pathing that a CRS will need to take in order to find and exploit this vulnerability. 31 00:04:20,720 --> 00:04:22,500 Patching bugs is very difficult. 32 00:04:22,500 --> 00:04:44,940 Not only do you have to maintain the functionality of the program like if I if I went through and I just deleted this entire chunk of code the vulnerability is gone yeah great but also the functionality is is gone and we can't access that anymore and kind of the point of this project is to find and discover bugs in systems but also patch them. 33 00:04:44,940 --> 00:04:51,140 Patch them in a way that correctly fixes and addresses the vulnerability without affecting the functionality of the plugins. 34 00:04:51,140 --> 00:04:54,580 We want to do this automatically across thousands and thousands of plugins.