start	end	text
5280	13200	Jenkins originated as the Hudson build server and is one of the foundations of the modern concept of continuous integration, or CI, services.
13380	20560	It's a large Java application with a web component, agents that run jobs, and a huge ecosystem of plugins.
20820	27640	We picked Jenkins as a challenge project because it represents an important class of tool when building software that runs the world.
27680	30280	Remote code execution as a service.
30740	35340	Jenkins is interesting because of its size and the way complexity is managed using plugins.
35580	39440	Let's take a very common task for continuous integration systems.
39480	43060	Getting information from a Git version control repository.
43120	47780	Jenkins predates Git and comes from an era when there is no clear version control winner.
47780	51480	So each different version control system is supported by a plugin.
51480	58120	These plugins may pull in other libraries as dependencies, gluing Jenkins interfaces to generic modules.
58120	61720	This gives us a lot of flexibility in how we add vulnerabilities.
61840	70600	We have the Jenkins core itself, the massive library of plugins, and the ability to create new plugins that create new high-level functionality too.
70600	76680	This stands in contrast to many of the other challenge projects which address much more limited sets of problems.
76960	82780	The difficulties in making Jenkins into a challenge project are entirely related to what makes it interesting.
82780	86520	The complexity and variety of existing code that it integrates with.
86520	96460	This made it difficult for us to identify specific parts to focus on and introduced a lot of engineering problems getting integrated in a way for a CRS to even be able to process it.
96460	101560	The vulnerabilities I'm most interested in are the pipeline utility backdoor series of vulnerabilities.
101560	107460	We created a plugin called the pipeline utility that allows administrators to run arbitrary code.
107720	117460	We test for this functionality to make sure that administrators are in fact allowed to do this and users without any authentication are not allowed to do whatever they want.
117680	127220	This plugin also includes a set of different backdoors that allow an unauthenticated user that knows a secret code to go in through the backdoor.
127220	131440	At line 136, we look for the header x evil backdoor.
131920	141100	If that header exists, we get the value of that header, we take the same SHA-256, and then we check to see if the two hashes are equal.
141100	151040	If they are, we take this command sequence that was provided and execute it the same way that we would have if the user had the administrator permissions.
151260	152900	And that's vulnerability 13.
153080	166280	It's the second easiest in the series and it's sort of a control to see if a regular fuzzer might not get this, but a fuzzer that can read strings of the code can check source code and find strings and source code may be able to.
166280	169040	Next up is vulnerability 33.
169040	174340	This is very similar to vulnerability 13, except we don't do any hashing.
174480	184200	We look for the x evil backdoor header and then if that header exists, we just compare it with the string that came out of a password generator.
184640	194700	Once we've done that, we set that we are allowed to execute the code and then run the same create utils thing that we would if we were an administrator normally.
194780	198120	Next is vulnerability 34.
198180	201440	We look for the request header x cold storage.
201440	208100	I started changing up the header names just to see how much that affects a CRS's ability to guess that this is a header name.
208100	209360	It should be pretty easy.
209360	223900	If that header exists, we have our precalculated SHA-256, but above it, in a comment, we have a string that isn't going to be guessed, but is the input to this SHA-256 value.
224020	234200	Next, we take our candidate that came in from the request header, and if it's equal, we decide we are allowed to execute this code as if we were an administrator.
234460	241140	35 is where we start asking it to make a jump to information that it doesn't necessarily have.
241140	247640	This is the one where we don't provide any information about what the input to SHA-256 is.
247740	250980	We grab our backdoor candidate from this header.
250980	257040	If it exists, we compare the SHA-256 with this just bag of bytes.
257220	268020	And this bag of bytes, chat-gpt, if you encode this as hexadecimal, chat-gpt will tell you this is the SHA-256 of the string password.
268020	270400	All lowercase, no spaces.
270400	275320	This is not something that you can make a jump to computationally without knowing it beforehand.
275320	291900	And I think that this is, to me, one of the most interesting things about AIXCC in general, is this knowledge base coupling it with other aspects of the cyber reasoning systems that we've seen over the last 10 years.
291900	295940	The final version, vulnerability 41, is a lot trickier.
295940	311240	What we do is we check to see, this is interesting because set-cookie is a valid and very, very common HTTP response header, but it doesn't show up in requests normally.
311240	315380	So it looks like it might be a benign string, but it's being used in a weird way.
315440	325020	We update 41 magic with our current user agent and set our count to 1 and return false and say, no, this isn't 41.
325020	334640	However, if the user agent is equal to the last time we called this function with set-cookie there, we increment that 41 count by 1.
334840	338020	And the 41 count persists between requests.
338160	353600	So what we're doing is we're basically taking this value, storing it, and we add a second aspect to checking to see if the request is valid, where they made this request 41 times in a row, over and over and over again.
353600	356760	So if our count isn't 41, we return false.
356760	365400	So here, if our count is 41, now is when we actually check to see if our magic value is equal to this random string.
365400	368080	If it's not equal, we return false.
368080	370520	If it is equal, we return true.
370520	373660	Come back here, and this sets is-allowed to true.
373840	379380	And if is-allowed is true, that's when we actually do the backdoor.
379380	385360	The attacker that has made 41 requests with this secret value in the set-cookie header.
386040	387480	And that's when we let them in.
387580	395060	Part of what we're doing for semifinals is we're saying, this is what we expect a CRS to be able to do.
395060	401040	All these challenges are designed in a way that a CRS can reason its way through these and possibly land these.
401060	410920	Because after semifinals, all these CRS teams are going to get these challenges, they're understand how they work, and they're going to build their system to succeed.
