WEBVTT

00:04.500 --> 00:05.920
My name is Sierra Hicks.

00:05.920 --> 00:10.340
I'm one of the challenge project designers for the AIXCC.

00:10.340 --> 00:17.560
I'm part of the Java team and we implemented a number of vulnerabilities into our challenge project of Jenkins.

00:17.560 --> 00:22.140
We chose Jenkins as one of the most commonly used automation sources on the internet.

00:22.320 --> 00:26.360
It's seen as the standard de facto way of doing open source DevOps.

00:26.360 --> 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.

00:38.940 --> 00:44.380
This is one of those fundamental building blocks of how software is even developed and pushed out.

00:44.380 --> 00:46.440
We've chosen two plugins.

00:46.440 --> 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%.

00:55.140 --> 00:57.140
Both of these come enabled by default.

00:57.140 --> 00:58.960
Some people have chosen to turn them off.

00:58.960 --> 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.

01:12.440 --> 01:18.700
In these challenges, the CRSs are going to be faced with having to manipulate a state machine.

01:18.700 --> 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.

01:28.400 --> 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.

01:42.540 --> 01:47.000
I expect that several CRSs are going to find the bugs but not know how to get to them.

01:47.000 --> 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.

02:03.480 --> 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.

02:11.700 --> 02:17.520
So this is the state machine that we have integrated into Jenkins and injected vulnerabilities in.

02:17.520 --> 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.

02:30.280 --> 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.

02:42.360 --> 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,

02:56.440 --> 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.

03:04.520 --> 03:12.140
But there's always a flaw in complex systems like this and it's due to assumptions that a programmer makes.

03:12.140 --> 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.

03:19.480 --> 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.

03:33.360 --> 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.

03:51.200 --> 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.

04:02.980 --> 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.

04:10.480 --> 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.

04:20.720 --> 04:22.500
Patching bugs is very difficult.

04:22.500 --> 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.

04:44.940 --> 04:51.140
Patch them in a way that correctly fixes and addresses the vulnerability without affecting the functionality of the plugins.

04:51.140 --> 04:54.580
We want to do this automatically across thousands and thousands of plugins.

