WEBVTT

00:18.480 --> 00:19.420
We'll see.

00:19.420 --> 00:20.580
Let's try this again.

00:20.580 --> 00:20.980
Yes.

00:20.980 --> 00:23.040
Oh, I think we're audible.

00:23.040 --> 00:24.020
Oh, nice.

00:24.020 --> 00:25.120
Hello everybody.

00:25.580 --> 00:26.720
It's been crazy.

00:26.720 --> 00:28.060
This has been a crazy day.

00:28.280 --> 00:29.020
Welcome.

00:29.060 --> 00:30.300
I'm CypherTX.

00:30.300 --> 00:31.500
I'm here with Carl.

00:31.500 --> 00:32.260
Hello.

00:32.680 --> 00:34.380
We have we've had a busy day.

00:34.380 --> 00:35.820
Yeah, yeah.

00:36.160 --> 00:37.240
But now we're here.

00:37.240 --> 00:40.300
We're here and we'll find out shortly whether the challenges are here.

00:40.300 --> 00:43.440
We've got four competitors in the back.

00:44.980 --> 00:46.640
The challenges are tested.

00:46.640 --> 00:48.880
So I think we're ready to count it in.

00:48.920 --> 00:55.520
Let's just do a really quick introduction of kind of what the format is this year and what teams we have and how this is going to work.

00:55.520 --> 00:55.740
Right.

00:55.740 --> 00:57.020
We will talk more about this.

00:57.020 --> 01:02.080
But the very short thing is we have a head-to-head, two players, one challenge.

01:02.080 --> 01:04.160
First one to solve it wins.

01:04.160 --> 01:05.520
Two matches running in parallel.

01:05.520 --> 01:07.820
We will be casting and commentating one of them.

01:08.020 --> 01:12.040
If you really want to watch the other one or the live feed from the players, it's available.

01:12.640 --> 01:14.100
And I think that's it for now.

01:14.100 --> 01:15.580
We will talk more about it later.

01:15.600 --> 01:24.780
We're going to get the teams started and then we can, you know, talk about the challenge and all that.

01:24.780 --> 01:30.460
So I'm just going to, you know, look over to production and say that we are ready to go.

01:30.680 --> 01:31.120
I'm ready.

01:31.160 --> 01:32.240
Countdown.

01:32.420 --> 01:36.980
Five, four, three, two, one.

01:36.980 --> 01:37.540
Go.

01:37.540 --> 01:38.620
Let them go.

01:39.780 --> 01:40.680
All right.

01:40.680 --> 01:41.980
So we should be going.

01:41.980 --> 01:42.400
Yep.

01:42.400 --> 01:48.200
And let's switch over to one of our competitors here.

01:48.200 --> 01:49.600
Full screen terminal already.

01:49.600 --> 01:50.660
Yep.

01:50.660 --> 01:58.920
So the way this is going to work, both of the players, they are given a challenge, the same challenge.

01:58.980 --> 02:08.240
It is a pwnable challenge of binary exploitation, you know, memory corruption, vulnerabilities and exploits that we're looking at here.

02:08.240 --> 02:21.880
The goal of this is to take this program, this binary, find a vulnerability, develop an exploit, test it locally and then exploit this on a remote server.

02:21.880 --> 02:27.120
Once you do that, you will eventually manage to get code execution on this server.

02:27.540 --> 02:29.700
And that's when then you're basically done.

02:29.700 --> 02:35.540
And then to prove that you're done, you will run the command on the server, which, yeah.

02:35.540 --> 02:38.960
But this year, unlike last year, we're a double elimination tournament.

02:38.960 --> 02:43.280
So last time it was as soon as you lost, you were out.

02:43.280 --> 02:45.440
But this time you have to lose twice before you're out.

02:45.440 --> 02:51.000
So that gives teams one a little bit more of a buffer, which is great, but also increases the complexity a fair amount.

02:51.000 --> 02:51.160
Yeah.

02:51.160 --> 02:53.720
We've got a bunch more streams, a bunch more captures.

02:54.100 --> 02:58.240
We've got a whole lot that we're trying to juggle here.

02:58.260 --> 03:06.800
So we've got the two teams that we're going to be looking at here are going to be Pigbuttsad and then they're playing against mHackeroni.

03:06.800 --> 03:10.260
So those are our two teams that we're eyeballing.

03:10.260 --> 03:12.140
We don't have the overlay text.

03:12.140 --> 03:16.180
We're a little bit... we'll get that added as we move forward.

03:16.180 --> 03:16.580
Yes.

03:16.580 --> 03:19.040
But we're currently looking at mHackeroni.

03:19.040 --> 03:19.540
Right.

03:19.540 --> 03:29.260
So they are here in IDA, one of the popular reverse engineering platforms, the disassembly compiler.

03:29.260 --> 03:43.200
You can see the player here looking at the code, you know, renaming variables because, you know, they only get these... they get this decompilation, which is very nice, but you still have, you know, no variable names and so on.

03:43.200 --> 03:49.900
So they're trying to like clean up the code here to be able to understand what's going on.

03:49.900 --> 03:54.100
So it's kind of as you can see, because we've got the... we're currently in the overlay view.

03:54.100 --> 03:58.080
It was very convenient these two teams to choose dark and light themes for us.

03:58.080 --> 04:03.580
So it's really obvious when we're in... when we're looking at mHackeroni, they're going to be the dark IDA.

04:03.580 --> 04:07.720
And when we're looking at PigButSAD, they're going to be over there in the light IDA.

04:07.720 --> 04:12.280
And we can flip back and forth and take a look at kind of each one in a little more detail.

04:12.280 --> 04:15.100
So let's switch over to PigButSAD.

04:15.600 --> 04:18.520
You can see they're looking at essentially the same piece of code.

04:18.520 --> 04:21.960
This is kind of the core functionality of this program.

04:21.960 --> 04:28.480
You can see that they are trying to create some structures here to figure out what is going on.

04:28.480 --> 04:28.860
So this...

04:28.860 --> 04:30.040
And I saw that it had a name.

04:30.040 --> 04:32.340
So that function name was called interpreter, right?

04:32.340 --> 04:36.180
So do we have symbols in these binaries, or did they already name that?

04:36.440 --> 04:37.120
Let's see.

04:37.120 --> 04:40.480
I think... I think this one does have symbols.

04:41.120 --> 04:44.180
Yeah, this varies from... no, I'm looking over here.

04:44.180 --> 04:47.140
No, we... yes, yes, we do have... we do have symbols in this one.

04:47.140 --> 04:59.900
So we have function names to help them out a little bit, because, you know, we want... so these challenges... so we want to make these challenges, you know, easy enough that we can do this kind of like high-speed format here.

05:00.240 --> 05:09.440
So that's... sometimes we do give them some, you know, things to grab onto, like the function names and so on.

05:09.440 --> 05:09.560
Yeah.

05:09.980 --> 05:15.020
Sometimes we decide to strip them out if that makes more sense in the context of the challenge.

05:15.020 --> 05:16.100
Yeah, but these are...

05:16.100 --> 05:20.820
so these matches that we've got, normally we're scheduled for about an hour each match.

05:20.920 --> 05:24.280
And if things go to plan, we want them to be solved in like 40 minutes, right?

05:24.280 --> 05:27.460
The goal is actually 40 minutes after the challenge starts.

05:27.800 --> 05:31.480
They should be at that point already done, because we do go to a sudden death.

05:31.480 --> 05:35.520
So if it's taking them more than 50, we're going to go to a sudden death mode.

05:35.520 --> 05:41.700
And at that point, we give them a new challenge that is like as simple as it can be.

05:41.700 --> 05:43.880
It's meant to be very, very basic.

05:43.880 --> 05:47.000
And that's a truly painful race at that point.

05:47.000 --> 05:47.540
Yep.

05:47.660 --> 06:02.580
And we can see here on the Piglet side reversing that they are still working on... you can see there they named one of the fields of the structure PC, typically for a program counter.

06:03.000 --> 06:05.440
And we did tell them the category in advance, right?

06:05.440 --> 06:12.300
So we try to tell teams the architecture, whether it's a reversing challenge, a pwnable challenge, a little bit of information about it.

06:12.660 --> 06:14.380
Primarily because we want them to send their best person.

06:14.380 --> 06:16.360
Different teammates will have different skills.

06:16.780 --> 06:26.080
And so in fact, for example, one of the the organizers came up and said, well, you've listed us for a challenge that says Linux Pwn, but is it Linux Kernel or Linux Userland?

06:26.080 --> 06:26.400
Right.

06:26.460 --> 06:28.780
Because they're like, it's a different guy we send for each one of those.

06:28.900 --> 06:32.280
And so we do try to, you know, try to give them a little information.

06:32.280 --> 06:35.180
And for this particular challenge, which by the way, anyone can see.

06:35.180 --> 06:45.500
If you go to the challenge.com, we have the full bracket there.

06:45.500 --> 06:46.040
You can see it.

06:46.040 --> 06:52.580
But if you actually go to the raw challenge page as well, there's details for every one of those matches.

06:52.580 --> 06:55.540
And so it not only links to the streams where you can see it.

06:55.540 --> 06:57.480
So again, these are just the two of the players we've got.

06:57.480 --> 07:02.040
And we've also got Hypeboy and TWN playing at the same time on the same challenge.

07:02.040 --> 07:06.680
And it's entirely possible that the fastest solve actually comes on one of those feeds.

07:06.780 --> 07:07.240
So , right.

07:07.240 --> 07:14.700
And I want to switch over here to Hackeroni because they are writing a part of their exploit script here, which I think is really cool.

07:14.700 --> 07:18.620
So they are writing this in Python using Pwn tools.

07:18.620 --> 07:24.280
And you can see that at the top of their script there, you can see that they had written out a couple of functions.

07:24.280 --> 07:33.560
So they have small like, you could always call them like macros, helper functions with short names that you can quickly just, you know, plug in there.

07:34.060 --> 07:50.000
They are, you can see that they're building up a kind of payload here where they're using the cyclic function in Pwn tools, which is a very handy tool where, let's say you have some kind of overflow and you gain control of some value that you're in, like,

07:50.000 --> 07:52.400
for example, the return address or some register or so on.

07:52.400 --> 07:57.760
But you're unsure exactly which part of your payload ends up in that location.

07:57.760 --> 08:11.260
You can use this cyclic function to generate a pattern, send it, look in the debugger, and then immediately deduce... Those four bytes or eight bytes are exactly a unique offset into that buffer.

08:11.260 --> 08:11.520
Right.

08:11.520 --> 08:14.560
So there's like DeBruin sequence generators, the other, you know, name for you.

08:14.560 --> 08:15.080
Somebody else will hear that.

08:15.080 --> 08:15.860
Exactly.

08:15.940 --> 08:30.600
So the, instead of trying to like calculate this by looking at the various offsets and like figuring out how much of the stack will be popped and so on, you just like dump this in, look in the debugger, and then you like calculate backwards to get the index.

08:30.600 --> 08:37.400
This was not a common technique when I started, so I remember putting just a bunch of A's and then B's and trying to like binary search it, just trying to figure out where it was.

08:37.400 --> 08:40.500
And this is like the sophisticated version of that.

08:40.500 --> 08:44.040
It's also much, much faster too, which is good for a live CTF.

08:44.040 --> 08:44.520
Yeah.

08:45.800 --> 09:04.060
So this leads me to believe that they have kind of found the vulnerability, but you know, they're now kind of exploring it to see exactly how and what they control, which is like good progress there.

09:04.180 --> 09:15.340
We have seen people too, though, in the past, sometimes they start their PwnScript immediately, even as they're just exploring the service and interacting with it, or they want to use it to generate things in a debugger just to kind of see what the behavior is.

09:15.340 --> 09:18.300
But yeah, usually you would think that they've got the exploit there.

09:18.300 --> 09:19.600
They may or may not.

09:20.160 --> 09:25.620
We are seeing in PigButtSAD, they've now also switched over a little bit to debugger, which went back to...

09:25.620 --> 09:25.960
Right.

09:25.960 --> 09:27.280
Let's go over to their screen.

09:27.280 --> 09:27.940
There we go.

09:27.940 --> 09:28.340
Yeah.

09:28.680 --> 09:29.220
Yeah.

09:29.220 --> 09:33.140
Some exploit here also using Python with PwnTools, also some helper functions.

09:33.140 --> 09:34.320
The same helper, like the same... Yeah.

09:34.320 --> 09:39.640
Maybe, I wonder if there's like, you know, now they're slightly different, but it's, you know, similar contents.

09:39.640 --> 09:39.840
Very , very similar.

09:39.840 --> 09:40.400
Yeah.

09:41.680 --> 09:44.200
So also running some debugger.

09:45.560 --> 09:46.280
Yeah.

09:46.340 --> 09:49.160
I did not see quite what they were sending in.

09:50.080 --> 09:52.560
I think maybe they're just also exploring...

09:52.560 --> 09:55.020
Oh , there was a breakpoint on OXDeadBeef.

09:55.360 --> 09:56.260
So I don't know if it's... Okay.

09:56.260 --> 09:56.900
They're just coming out right now.

09:56.900 --> 09:58.420
That was like leftover maybe.

09:58.420 --> 09:58.540
Yeah.

09:58.540 --> 09:59.840
Maybe just setting up their environment.

09:59.840 --> 10:02.480
I was like, they already have control of EIP.

10:02.480 --> 10:02.940
No, no, no.

10:02.940 --> 10:09.500
I think it's, you know, they're just setting up the GDB scripting and then making sure that, you know, they have their stuff in order.

10:10.360 --> 10:26.720
So, I mean, this is a very nice... PwnTools has a lot of nice features like this, where you can start your program, attach a debugger, run the GDB script, for example, set up some breakpoints, like all of these things to help you do this iterative process of developing the exploit.

10:26.720 --> 10:33.500
So minimize the number of manual commands you have to type in each time you test your exploits.

10:33.500 --> 10:34.520
So I don't think... Did the teams...

10:36.420 --> 10:39.800
We gave them the binary name, correct, when they downloaded this?

10:40.020 --> 10:42.000
Or did we just call it something generic?

10:42.200 --> 10:51.440
No, they do get... So the archive that they download is called PushPop Automaton, which is the name of this challenge.

10:51.820 --> 11:02.100
And, yeah, it's a stack-based virtual machine, which has a... I bet it has a push and a pop.

11:02.100 --> 11:03.320
Yeah, yeah, yeah.

11:03.320 --> 11:06.280
Very few operations, including a push and a pop.

11:06.280 --> 11:23.200
So you can, like, grow and shrink this stack structure, which, you know, if one would just take a guess at what the vulnerability could be, you know, maybe this pushing and popping, it does not properly respect the bounds of this.

11:23.200 --> 11:23.200
What ?

11:23.200 --> 11:25.660
A CTF challenge that doesn't have bounds checking?

11:25.660 --> 11:26.740
That's shocking.

11:26.740 --> 11:27.860
Shocking, yeah.

11:27.980 --> 11:29.000
So we can see here some...

11:31.180 --> 11:34.600
On the Macaroni's side, they're looking in the debugger.

11:34.600 --> 11:46.180
We see that they're dumping some memory, trying to figure out exactly what, you know, what things are in the memory at a certain point in time.

11:46.180 --> 11:48.840
I'm not sure what this point in time is.

11:49.780 --> 11:57.760
But, yeah, it's hard to tell exactly how far their progress is right now.

11:57.760 --> 12:00.380
Like, the exploit script was still pretty bare bones.

12:00.760 --> 12:02.660
Now, is this one that you playtested?

12:02.680 --> 12:05.580
I know that this was a challenge Glenn wrote.

12:05.580 --> 12:06.020
Yep.

12:06.020 --> 12:09.360
But this is one you've solved before, so you've at least got a solution.

12:09.360 --> 12:14.320
Although, as is the case for us in a lot of our challenges, we don't know if we'll see the same solution.

12:14.320 --> 12:14.620
Right.

12:14.620 --> 12:18.080
There may very well be multiple ways to solve it.

12:18.080 --> 12:18.520
Yep.

12:19.060 --> 12:20.440
I did solve it.

12:20.440 --> 12:25.660
It was probably one of the first ones I did in our whole development process.

12:25.660 --> 12:27.460
So it was a couple of weeks ago.

12:30.280 --> 12:36.380
But it is, I mean, so it is pretty straightforward.

12:36.720 --> 12:49.920
But you also have the added, you know, stress of this format, the live CTF format with, you know, it's this one-on-one, you have no help from your teammates.

12:50.040 --> 12:58.960
Oh, and yeah, the time pressure alone, just knowing that there's one person you're racing and that the first to solve it is like, you know, the victor with all the points.

12:59.260 --> 13:00.600
It's stressful.

13:00.600 --> 13:01.360
It really is.

13:01.360 --> 13:01.780
Yeah.

13:01.820 --> 13:05.120
And we are, I mean, we are running a double elimination this year, right?

13:05.120 --> 13:12.400
So, you know, you're not out immediately, but it's still like, you know, this is one of your two chances, right?

13:12.620 --> 13:18.440
And so let's talk about the points and the scoring and how this kind of factors into the overall DEF CON CTF, right?

13:18.440 --> 13:21.940
So that we are in the middle of DEF CON here in Las Vegas.

13:22.400 --> 13:25.420
And there's 12 teams here at the final event.

13:25.640 --> 13:30.040
Each of the 12 teams sends an individual for a round of live CTF.

13:30.040 --> 13:33.080
And those individuals don't have to be the same.

13:33.080 --> 13:37.980
So if they play multiple rounds, they could actually choose to send a different person.

13:37.980 --> 13:40.360
That's again, also why we tell them the category.

13:40.360 --> 13:40.660
Yeah.

13:40.660 --> 13:41.760
So they know who they can send.

13:41.760 --> 13:44.860
I want to just bring attention here to PigBetSav.

13:44.860 --> 13:50.860
You can see that there were a bunch of memory leaking out there on their screen that we have up.

13:50.860 --> 13:52.760
You can see here the memory dump in PwnTool.

13:52.760 --> 13:56.780
So they're doing some kind of leak here.

13:57.700 --> 14:00.460
This is a good step.

14:00.760 --> 14:02.820
Yeah, that would be step one of this exploit.

14:02.820 --> 14:04.540
Almost certainly would be some kind of leak.

14:04.540 --> 14:07.400
Any modern binary, you've got to have a leak kind of built into it.

14:07.400 --> 14:17.080
So if I remember correctly, basically you use the pop feature to read memory.

14:17.460 --> 14:19.400
You go further than you were supposed to.

14:19.400 --> 14:22.640
And then you use the push feature to modify those things.

14:24.320 --> 14:28.600
And so that gives you both a read and a write primitive on the stack.

14:28.600 --> 14:28.820
Yeah.

14:28.820 --> 14:40.840
And then there are a couple of things you need to keep in mind, because since you're going like backwards and forwards, you need to keep track of the order, because you're writing things in the opposite order of what you were reading.

14:41.800 --> 14:45.440
So there are details to keep in mind there.

14:45.440 --> 14:48.140
And that's the hardest when there's the time pressure.

14:48.140 --> 14:51.480
It's the kind of thing where if you were casually doing it, you wouldn't even be fine.

14:51.480 --> 14:53.860
But when you're in a hurry, it's easy to miss that.

14:53.860 --> 15:01.740
And then off by one things, like the push thing, does it write first and then increment the pointer?

15:01.760 --> 15:08.020
Is the pointer pointing to the current empty slots or the top of the stack?

15:08.020 --> 15:11.280
And you can easily get an off by one issue there.

15:11.280 --> 15:16.160
I think both teams did exactly the right thing, though, because debugging will help you answer a lot of those questions, right?

15:16.160 --> 15:17.520
You want to have your script.

15:17.980 --> 15:23.220
There are people that I know who can one-shot this, and they just muddle it in their head, and then they solve it, and they write it, and they're done.

15:23.220 --> 15:24.160
And they're fun to watch.

15:24.160 --> 15:27.200
But certainly, I would be using a debugger as well.

15:27.200 --> 15:27.440
Yeah.

15:27.440 --> 15:29.960
I want to go over to Macaroni again and bring attention here.

15:29.960 --> 15:45.840
You can see that they're writing this leak equals, and then they are... So they've already got a leak, and now we're going to... So they're just... And then using the debug printing here to validate, yeah, you can see that they printed out an address.

15:45.900 --> 15:47.220
What does it look like?

15:47.220 --> 15:48.580
Code address, though.

15:48.580 --> 15:50.180
I'm not sure what they're trying to leak.

15:50.580 --> 15:52.740
It seems like it's off.

15:53.280 --> 15:58.560
Like the 55 is usually like a good... Oh, that one, though, looks like... There we go.

15:58.560 --> 15:59.760
You can see this 7F thing.

15:59.760 --> 16:00.040
Yeah.

16:00.040 --> 16:04.380
Looks very much like a library address, right?

16:04.380 --> 16:04.860
Yeah, library.

16:04.860 --> 16:05.400
Yeah.

16:05.400 --> 16:08.240
Well, I bet they're going to see what they do.

16:08.940 --> 16:11.480
And they're checking... Yeah.

16:11.480 --> 16:15.340
So they're copying the leak over, or they were copying the leak over.

16:15.380 --> 16:16.300
Let's see.

16:16.300 --> 16:17.380
They have a leak.

16:17.380 --> 16:18.400
Copy it.

16:18.400 --> 16:26.200
Are they going to check in like via map or... So they're checking this is in... Yeah.

16:26.200 --> 16:27.320
So they got the... Okay.

16:27.320 --> 16:27.600
Yeah.

16:27.600 --> 16:35.440
So there was an in the offset, and you can see they use this feature in GDB to take this address.

16:35.440 --> 16:41.580
This is an absolute address, but the GDB plugins convert this into an offset within the library.

16:41.580 --> 16:54.300
So now they can then bring this back into their exploit script, and you can see that they subtract this offset from the leak to get the base address of libc, bring this back into the script, and now they can easily calculate any addresses within libc that they are...

16:54.300 --> 16:57.960
They'll look for one gadget or whatever other function pointers they want to call.

16:57.960 --> 17:07.560
Although this is complete overkill for this challenge because you have a win function, but... Oh, I don't know if we saw anyone look at the win function there.

17:07.560 --> 17:11.560
So I saw that the function list was open, and there's... You can see... Oh, yeah.

17:11.560 --> 17:13.180
You saw it there very briefly.

17:13.180 --> 17:13.260
Yeah.

17:13.260 --> 17:13.500
Yeah.

17:13.500 --> 17:13.580
Yeah.

17:13.580 --> 17:15.280
And especially because we gave them the symbols, right?

17:15.280 --> 17:16.900
Because they've got the symbols for function names.

17:16.900 --> 17:27.700
But this is so easy to miss because like, okay, this is maybe not a super common thing to have in modern challenges.

17:27.700 --> 17:32.480
We've kind of evolved past that in the CTF community, in the CTF challenges.

17:32.480 --> 17:41.640
But again, since we want this to be very fast, very... Well, compared to a lot of pwnable challenges, easy to solve.

17:41.720 --> 17:43.080
I'm not saying it's easy.

17:43.080 --> 17:44.200
It's easier.

17:44.860 --> 17:46.440
And that's why we put this in.

17:46.440 --> 17:46.960
Don't feel bad.

17:46.960 --> 17:50.340
It's certainly... I wouldn't be able to solve this in an hour or as fast as these teams were.

17:50.340 --> 17:56.980
So don't feel bad if you're doing this and thinking, wow, you call this easy, but it took me, you know, like several hours.

17:56.980 --> 18:01.720
Like this is just relatively speaking to sort of the state of the art in pwnable challenges now.

18:01.760 --> 18:03.540
So yeah, it is a little more unusual.

18:03.540 --> 18:12.020
And you know, I would have expected to see... Although actually they would need a leak to the program itself, right?

18:12.020 --> 18:12.280
Right.

18:12.280 --> 18:12.400
Right.

18:12.400 --> 18:12.580
Right.

18:12.580 --> 18:12.700
Right.

18:12.700 --> 18:13.860
So, I mean, this is a different approach.

18:13.860 --> 18:17.720
Maybe it's, you know... It may have been the first pointer they grabbed was a libc and good enough.

18:17.720 --> 18:18.900
They can get system out of that.

18:18.900 --> 18:19.060
Right.

18:19.060 --> 18:22.360
So I want to bring back attention here now to PigBetSAD.

18:22.360 --> 18:26.020
You can see a little bit more of their exploit script there.

18:26.020 --> 18:28.100
You have some...

18:30.340 --> 18:31.480
They are... Okay.

18:31.480 --> 18:36.660
They're reading until they can see these specific bytes.

18:36.700 --> 18:39.520
So they're also looking at some leak here.

18:39.520 --> 18:41.120
You can see some memory dump.

18:41.500 --> 18:44.920
I'm trying to like orient myself here at what they're doing.

18:44.920 --> 18:49.100
It is interesting that they're building their GDB into their same script as well.

18:49.100 --> 18:53.400
As opposed to we saw earlier in Hackeroni had a separate session that they were debugging it with.

18:55.320 --> 18:56.120
Yeah.

18:56.300 --> 18:56.800
So, yeah.

18:56.800 --> 18:58.280
Are they getting back a pointer?

18:58.280 --> 19:03.660
Are they... Here we can see... I mean, there's a bunch of memory being dumped out.

19:03.660 --> 19:03.760
Yeah.

19:03.760 --> 19:05.260
They looked like environment variables.

19:05.260 --> 19:05.460
Yeah.

19:05.460 --> 19:06.320
Environment from stack.

19:06.320 --> 19:06.600
Yeah.

19:06.600 --> 19:07.220
Yep.

19:07.360 --> 19:08.080
Absolutely.

19:08.080 --> 19:08.140
Right.

19:08.140 --> 19:08.300
Right.

19:08.300 --> 19:10.540
Right on the stack prior to your... Right.

19:10.540 --> 19:11.440
Your main.

19:13.120 --> 19:24.640
I... Actually, let's leave them there for a moment and go back to Macaroni because I think there's some pretty good stuff coming up here.

19:24.640 --> 19:28.920
I saw that... You can see that they're trying to put together a ROP chain.

19:30.720 --> 19:31.160
Let me see.

19:31.160 --> 19:39.220
This is... You know, it's a little bit difficult to follow now because they're jumping very quickly back and forth between the export script and the debugger.

19:39.220 --> 19:43.540
You know, they're making small changes, trying it and doing like very quick iterations.

19:43.540 --> 19:47.240
You can see them like fiddling with like some offsets here and there.

19:47.240 --> 19:48.440
This is exactly what I'm talking about.

19:48.440 --> 19:51.500
These things are... Very fiddly.

19:51.500 --> 19:51.820
Yeah.

19:51.820 --> 19:52.260
Yeah.

19:52.860 --> 20:01.060
And can be so frustrating because like you feel like you should have this, like I know what's going on and that something is like not adding up.

20:01.060 --> 20:03.360
Like you forget some detail.

20:04.040 --> 20:05.840
Extremely frustrating.

20:05.840 --> 20:06.020
Yeah.

20:06.020 --> 20:12.380
It looks like they're actually changing... They had a libc leak clearly earlier, but now they've gone back and they're changing it again.

20:12.380 --> 20:15.920
Did they... Did they... The environment... Did something change or what?

20:15.920 --> 20:21.120
I'm wondering what they're doing that's causing them to undo the progress they felt like they've made earlier.

20:21.440 --> 20:23.020
And I'll keep an eye out.

20:23.020 --> 20:28.200
I don't see Pigbuttsad having successfully gotten... Oh, they do think they have a leak now.

20:28.200 --> 20:28.640
Let's see.

20:29.000 --> 20:29.360
They're...

20:29.360 --> 20:29.560
Yeah.

20:29.560 --> 20:31.940
Well, let's switch over to them and look at that.

20:31.940 --> 20:33.500
I think they might have... Yeah.

20:33.500 --> 20:38.020
So it looks like they're dumping... Oh, so we've now dumped some... Right.

20:38.020 --> 20:39.520
And there they're also calculating.

20:39.560 --> 20:52.760
You can see they didn't use as fancy features there, but you can see that they're calculating an offset by subtracting those two absolute addresses there in the exploit script, those 7F addresses.

20:52.760 --> 20:53.040
Yeah.

20:53.040 --> 21:03.960
This will give them... So you see they take the values in the specific instance, take the difference, get the offset, and then use that to calculate the base there.

21:03.960 --> 21:07.600
Slightly longer version of the same thing that we saw in Macaroni... Yeah.

21:08.100 --> 21:10.180
That we just copy and paste.

21:10.180 --> 21:10.680
Yeah.

21:12.460 --> 21:14.080
It's... Right.

21:14.360 --> 21:19.540
So, yeah, they're back in the disassembler.

21:20.180 --> 21:27.240
You know, I think this is interesting because we had quite a, you know, a period here of them, like, mostly looking at the exploit script and the debugger.

21:27.240 --> 21:27.940
Yeah.

21:28.100 --> 21:37.900
And now they're coming back into the disassembler, maybe double checking some... Maybe they were just looking at the size of this buffer or the stack thing.

21:38.880 --> 21:39.620
Yeah.

21:39.620 --> 21:48.360
It looks like their structure offset they were using to determine... Oh, we had, by the way, a solve on our other stream.

21:48.360 --> 21:49.580
Oh, my God.

21:49.580 --> 21:51.080
Check out our other stream.

21:51.220 --> 21:52.660
Congratulations to Hypeboi.

21:52.660 --> 21:53.140
Yeah.

21:53.140 --> 21:55.540
So, really great job.

21:55.840 --> 22:00.460
Hyperboi win... They win their first live CTF match here.

22:00.460 --> 22:03.240
So, as I said, we are running two matches in parallel.

22:03.240 --> 22:07.360
We are casting one of them, but then there's another match going on in the background.

22:07.360 --> 22:11.720
And that match just finished with Hyperboi... Hypeboi.

22:11.720 --> 22:11.900
Hypeboi.

22:11.940 --> 22:15.780
Hypeboi winning against... Which team was the other one?

22:15.780 --> 22:19.120
Hypeboi was playing in this match... TWN48.

22:19.120 --> 22:19.760
Right.

22:19.760 --> 22:23.820
So, TWN48 against Hypeboi and Hypeboi did win that match.

22:23.820 --> 22:27.360
I can't wait to go watch the VOD on that one because that was a blazing fast.

22:27.360 --> 22:34.900
I'm just knowing, like, the progress that they must have, like, quickly know what to do and then landed that.

22:34.900 --> 22:35.440
Really cool.

22:35.440 --> 22:35.940
Good for them.

22:35.940 --> 22:37.120
Really cool to see.

22:37.640 --> 22:41.560
But we are still going strong here in this match.

22:41.860 --> 22:49.340
A little bit of a sigh of relief as an organizer for your full solve coming through because, I mean, you know it's solvable, you're pretty sure, but just to see somebody do it... Yeah.

22:49.340 --> 22:50.320
That's a good feeling.

22:50.320 --> 22:52.260
And, oh, my God, the issues we've had today.

22:52.680 --> 22:53.940
Today was cursed.

22:53.940 --> 22:59.020
Everything that conceivably could break, broke and a few more things.

22:59.400 --> 23:03.020
Yeah, so we had multiple hardware failures on laptops.

23:03.020 --> 23:05.400
So the machine that we're streaming to you on now died.

23:05.400 --> 23:07.700
The machine that's running the game infrastructure died.

23:07.700 --> 23:07.900
Yeah.

23:07.900 --> 23:10.020
We're on, like, secondary machines for all of that.

23:10.540 --> 23:13.760
We had our mixer board, as we came on the stream just at the very beginning.

23:13.760 --> 23:14.140
Right.

23:14.140 --> 23:16.680
Isn't connecting for some reason on the new machine we swapped out.

23:16.680 --> 23:17.940
So we switched audio inputs.

23:17.940 --> 23:19.000
It's been... Yeah.

23:19.000 --> 23:21.120
It's been a lot of craziness, but... Right.

23:21.320 --> 23:26.300
So, high five for our first... Yeah, really, really nice to see.

23:26.560 --> 23:32.260
And, yeah, I mean, we will also be talking a bit more throughout these days.

23:32.260 --> 23:35.540
We will be talking a little bit about, you know, the production, the behind the scenes and stuff.

23:35.540 --> 23:38.120
But, you know, we will come back to that.

23:38.120 --> 23:41.860
We can talk a little bit more about... So now we want to get back on schedule and get things going.

23:41.860 --> 23:42.420
Right.

23:42.420 --> 23:46.220
So let's check out Macaroni again.

23:46.920 --> 23:50.940
You can see here, it feels like they're trying to...

23:50.940 --> 23:53.840
Looks like some indices and values.

23:53.840 --> 23:57.060
They're trying to figure out some kind of offset, maybe.

23:57.420 --> 24:03.540
You could see there was a big list of various offsets, and I guess it was the corresponding value or something.

24:03.540 --> 24:12.540
And I think they're trying to, again, fiddle around a little bit with the exact offsets of these exploits.

24:12.700 --> 24:12.960
Yeah.

24:13.060 --> 24:19.640
I don't feel either team is necessarily stuck, but I also don't feel like they're confidently going to the next step yet, either.

24:19.640 --> 24:24.140
They're still, I think, tweaking and trying to figure out.

24:24.140 --> 24:41.100
But it's like, you know, you can see here, like you have the ROP chain with the system call with the shell, like they have pieces there and now they're just trying to debug their exploit script and trying to find, like, where is this not doing what they think it should do?

24:41.100 --> 24:51.160
It actually reminds me of the first match we had last year in the finals, which you can go watch on YouTube or on livectf.com, because it was the same thing that you're tweaking and fiddling with.

24:51.160 --> 24:55.520
And then the team we weren't watching snuck in and actually solved it just off screen.

24:55.520 --> 25:02.720
Because it's hard to know, like if for one of them to suddenly figure it out exactly, it could go down in just a few seconds.

25:03.360 --> 25:07.660
But I do still see a lot over here on Pigbuttsad.

25:07.660 --> 25:09.080
Oops, wrong one.

25:09.700 --> 25:14.060
If we bring up Pigbuttsad, that one there.

25:14.320 --> 25:15.200
We can go ahead.

25:15.360 --> 25:18.300
They really haven't, they just, yeah, they hop back down to Vita, but they've been here for a lot.

25:18.300 --> 25:20.000
They're really still looking at their offsets.

25:20.000 --> 25:24.120
I think this, to me, still feels like in their head, they're still working out what they want to do.

25:24.120 --> 25:26.640
They don't have exactly the sizes figured out.

25:26.640 --> 25:29.780
They don't have a goal necessarily figured out.

25:30.460 --> 25:37.580
Because I don't, I think if you understand what the virtual machine is doing at this point, there shouldn't be a whole lot you would need to look at.

25:37.580 --> 25:44.820
Even things like offsets, for example, dynamically just pulling that out of your running session seems like it might have been a little easier.

25:45.720 --> 25:51.920
And they are, yeah, they're looking at the interpreter code.

25:52.460 --> 25:57.340
I mean, this is a time where you really wish you could, like, read the minds of the players.

25:57.800 --> 25:58.900
Yeah, yeah.

26:01.460 --> 26:09.780
Because, you know, they are clearly staring at this code and, you know, there's something they're trying to, like, wrap their head around.

26:10.760 --> 26:13.620
You're just not exactly sure what it is, right?

26:15.540 --> 26:24.680
See if that macaroni has got more momentum now or if they're still stuck with their leak being a little bit like, oh, okay, so that's the same offset value dump.

26:24.680 --> 26:27.100
So they're just dumping out a bunch of stack values, essentially.

26:27.100 --> 26:27.620
Right.

26:27.660 --> 26:32.180
Trying to figure out... You can see that they're looking at these, like, 7F value.

26:32.180 --> 26:34.520
They're probably interested in that one.

26:34.580 --> 26:36.740
Looking at the corresponding offset.

26:38.100 --> 26:38.780
Yeah.

26:39.000 --> 26:43.520
You can see here the AAC offset copying this, I guess.

26:45.020 --> 26:47.160
And it looks like they already had that there.

26:47.160 --> 26:51.000
So it's like, yeah, maybe they wonder, like, why is this not doing the thing?

26:51.000 --> 26:53.600
And, you know, are they going the wrong direction, like, up or down?

26:53.600 --> 26:56.620
You gotta remember, like, which stack goes one way, but the bytes go the other way.

26:56.620 --> 26:58.480
And that can be tricky.

26:58.580 --> 26:59.100
Right.

27:01.060 --> 27:06.620
And then... This challenge definitely gives you all the tools, though, that you need to solve it.

27:06.620 --> 27:09.460
It's just a matter of, like, wiring them up the right way.

27:12.420 --> 27:16.520
So, yeah, it didn't even send in eight bytes on that unpack.

27:17.500 --> 27:18.000
Right.

27:18.000 --> 27:31.480
Adding an interactive call, which is a nice feature in PwnTools, where, like, you can do some automation and then, like, take over with manual... Which works really well on a service like this, where it's the sort of text-based interactive thing.

27:31.480 --> 27:31.480
Right.

27:31.480 --> 27:36.660
And so maybe they want to just try to, like, leak a few more things or change what they're doing on the fly.

27:36.660 --> 27:37.220
Yeah.

27:38.440 --> 27:44.880
And so I'm trying to, like, read, you know, the different things.

27:44.880 --> 27:53.800
Basically, it seems like, basically, you know, they are using the payload to leak an address, use this address to calculate the base address.

27:53.800 --> 28:00.480
From this, they can construct a ROP chain, and then they are inserting this ROP chain.

28:00.780 --> 28:04.380
I do think we're coming up on first hint time as well.

28:04.420 --> 28:05.180
So we should...

28:05.180 --> 28:05.800
Right.

28:05.860 --> 28:08.400
We should talk about... Why don't you talk about how that process works.

28:08.400 --> 28:08.820
Right.

28:12.040 --> 28:14.080
So... So they did get the hint.

28:14.080 --> 28:16.180
Do they know to check the page?

28:16.180 --> 28:18.720
Why don't we go on over there and remind them about the hint schedule?

28:18.900 --> 28:22.120
So... I don't think we told them the hint schedule, so someone should go tell them.

28:23.040 --> 28:23.620
Right.

28:23.620 --> 28:31.760
So the way we do this is after 20 minutes of game time, we release a hint.

28:31.760 --> 28:33.800
On the same web page they downloaded the challenge on.

28:33.800 --> 28:33.800
Right.

28:33.800 --> 28:45.040
And then after another 15 minutes, we release a second hint, which I... Honestly, for this challenge, I don't think the hints... I'm not sure if it's going to help them.

28:45.040 --> 28:45.300
Yeah.

28:45.300 --> 28:46.040
Yeah.

28:46.080 --> 28:49.800
I don't think it's... it's helpful because I think they've already figured that part out.

28:49.800 --> 28:49.940
Right.

28:49.940 --> 28:55.660
I think they're now just fiddling around with, like, the offsets and, yeah, those parts.

28:56.380 --> 28:56.860
Yeah, I agree.

28:56.860 --> 28:59.400
I think we've seen that in the past, some of the challenges.

28:59.400 --> 29:00.380
Did we lose?

29:00.380 --> 29:01.320
No, we're still going.

29:01.440 --> 29:05.140
I've seen in the past in some challenges, the hints aren't really going to help you.

29:05.140 --> 29:09.220
You understand you've got all the right tools in the tool shop, but you're still having trouble building the chair.

29:09.220 --> 29:11.560
You've still got to, like, kind of put it together.

29:11.720 --> 29:12.500
So... Right.

29:12.560 --> 29:13.160
And here's interesting.

29:13.160 --> 29:17.720
We can see adding a, like, a red sled to their ROP chain.

29:17.720 --> 29:31.360
So, if you're familiar with, like, old school shell coding, you know, you sometimes could add, like, a NOP sled to, like, you know, if you didn't know exactly where your code was located, you would jump into this kind of long sequence of NOP instructions that would,

29:31.360 --> 29:35.960
like, then slide you all the way... No matter where you hit, they would all hit NOP and you would go to the very very end.

29:35.960 --> 29:35.960
Right.

29:35.960 --> 29:36.340
Yeah.

29:36.340 --> 29:38.620
Instead of trying to find the exact offset.

29:38.640 --> 29:51.840
And a red sled is, like, kind of the equivalent thing, but for a ROP chain, where if you don't know exactly how your ROP chain is going to offset on the stack, you just have a sequence of RET instructions that just progresses the ROP chain further without making any state changes .

29:51.840 --> 29:57.100
Or specifically a pointer to a return instruction from something you know at a fixed location .

29:57.100 --> 29:57.280
Yeah.

29:57.280 --> 30:04.260
And all those pointers in a row, so that no matter where you hit in a return, you'll just keep returning until you get to your next gadget that you want.

30:04.260 --> 30:04.840
Yep.

30:05.640 --> 30:08.840
Let's go back to PigBetSAD.

30:08.980 --> 30:16.600
We can see that they are... feels like they're still messing around with, like, the initial payload.

30:16.760 --> 30:25.080
Kind of this program that you are submitting to the automaton, to the VM.

30:25.820 --> 30:40.220
Maybe they're, you know, trying around a little bit with how long the various sequences of push and pop instructions need to be for this to all work the way they have, you know, they expect it.

30:41.140 --> 30:44.880
Now I do see, let's talk, there's U, O, and H.

30:44.920 --> 30:49.200
We saw those, and they've even labeled the O as output.

30:49.200 --> 30:56.840
So presumably this is going to be, these are like text instructions that we're sending into the virtual machine, and that's going to be what does our pushing or popping?

30:56.840 --> 31:10.300
Yeah, so each, you send a sequence of commands, each of them is like one character, and then followed potentially by some input or outputs that you get back.

31:11.380 --> 31:15.680
So we can actually see... Ah, there we go, they just refreshed for the hints.

31:17.020 --> 31:18.740
Yeah, and they saw the hint.

31:18.740 --> 31:20.660
It was too quick, it was keep popping something something.

31:20.660 --> 31:28.380
Right, keep popping beyond the bounds or something, which as I said, they figured that out a long time ago.

31:30.400 --> 31:45.260
So yeah, you know, not very helpful in this case, which is like, you know, good and bad, because it means that, you know, they have had some progress, and they have another 25-30 minutes, basically.

31:45.300 --> 31:48.000
Total time, I think, yeah, we have still another...

31:48.000 --> 31:53.660
Right, well, until the sudden death, we have to actually, we have to go back and look at and turn over the exact start time.

31:53.660 --> 31:55.040
So yeah, somebody wrote that down.

31:56.420 --> 32:01.440
So yes, we definitely got started late, and the being late was definitely our fault and not theirs.

32:01.440 --> 32:02.620
They were all here on time.

32:02.620 --> 32:08.580
That was just us, as you heard or saw us getting our, fixing our microphones and fixing all sorts of fun stuff.

32:08.580 --> 32:10.300
It was a mess, but we are here.

32:10.300 --> 32:14.580
It's working, so far it's working, and we already got one solved, and hopefully we'll see another one soon.

32:14.580 --> 32:23.580
Yep, yep, and yeah, big but sad, still messing around with, like, the payload structure here.

32:23.580 --> 32:29.940
The, you know, they're padding out there with these O instructions to a fixed size payload.

32:30.160 --> 32:32.740
Oh, I saw something interesting there.

32:32.740 --> 32:34.700
I want to go back to Macaroni.

32:34.700 --> 32:38.380
They were doing some more leaking there, I think.

32:38.380 --> 32:42.640
I saw some sequence of bytes popping out.

32:42.660 --> 32:44.940
Could have been interesting.

32:47.080 --> 33:00.740
Like, they, let's see, they go back here to this, to the, yeah, you know, they changed the size of the, you know, the code that they're sending, or the the length of these.

33:00.740 --> 33:02.000
The total, total payload.

33:02.000 --> 33:10.960
Yeah, and then, oh, this seems like they kind of, you know, they've subtracted eight in one place, and maybe they're compensating down here as well.

33:11.720 --> 33:25.200
I don't know exactly what these various offsets are, but it's, it's so weird, because we saw that libc leak real early on, and then I feel like we have kind of gotten stalled.

33:25.200 --> 33:27.560
We haven't really made it anything past that.

33:28.140 --> 33:39.060
So, yeah, it's, I'm really, you know, like, rooting for these teams to succeed with these things.

33:39.060 --> 33:45.440
I know how, like, frustrating it can be when you are, you know, trying to solve one of these challenges.

33:45.440 --> 33:48.080
And when we were testing this, we don't have the time pressure, too, right?

33:48.080 --> 33:57.280
So, like, we definitely had it easier that we could, yeah, put it down and walk away, think, get some fresh ideas, come back later, and think, oh, I bet I was messing up that, you know, go sleep on it, or whatever.

33:57.280 --> 34:06.920
Yeah, I was, like, you know, I was solving the challenge on one screen, and, like, watching some Twitch stream on the other screen, and, I mean, obviously that, you know, I didn't solve it in 45 minutes then.

34:06.920 --> 34:07.720
Yeah, for sure.

34:07.720 --> 34:10.020
Or even the 25 or whatever, the 20 minute one.

34:10.020 --> 34:11.240
Oh, no, no, no.

34:11.240 --> 34:12.980
From Hypeboy, that was great.

34:12.980 --> 34:15.780
Really, really impressive work there.

34:16.840 --> 34:18.560
So, yeah.

34:18.560 --> 34:32.920
I think the kind of benchmark we had throughout the development process was that, like, if we can solve it within, like, two hours in, like, a relaxed setting, then... Because, one, these players are all better than us.

34:32.920 --> 34:33.260
Yes.

34:33.260 --> 34:36.500
And every one of them are better than every one of us, I think, is probably fairly safe to say.

34:36.500 --> 34:36.900
Yeah.

34:36.900 --> 34:42.520
And then, two, again, we weren't kind of in a hurry, we were taking our time, and then not feeling rushed.

34:42.520 --> 34:44.220
Although, it works conversely, too.

34:44.220 --> 34:45.120
The opposite also works.

34:45.120 --> 34:51.160
The fact that we were not time pressured sometimes means that you had less stress in doing it, so.

34:51.580 --> 34:52.160
Yeah.

34:54.660 --> 35:07.960
I'm going to switch over again here to PigButSad, and... It does crack me up every time I see a bunch of, like, uuuh... How do you pronounce that exactly?

35:10.940 --> 35:11.620
Yeah.

35:11.660 --> 35:17.540
They're, again, like, messing with the various sizes of the parts of the payloads.

35:19.000 --> 35:34.100
Yeah, look, and you can see there, that's the address of the... when they call the interpreter, so it's setting a breakpoint when going into the interpreter to, you know, investigate exactly what's going on there.

35:35.520 --> 35:46.180
Yeah, it's still... I mean, if I were to, you know, bet at this point, I'm a little bit with Macaroni.

35:46.180 --> 35:46.600
Yeah.

35:46.600 --> 35:49.180
Yeah, I mean, it certainly had progress early on.

35:49.180 --> 35:55.820
I don't think we've yet to see a successful, like, libc leak out of PigButSad, unfortunately, yet.

35:55.820 --> 35:56.380
Yeah.

35:56.480 --> 35:58.120
Although, it could have happened, we just missed it, too.

35:58.120 --> 35:59.020
That happens a lot, as well.

35:59.020 --> 36:00.480
It's hard to track everything.

36:02.820 --> 36:14.200
But with, you know, the nature of these challenges is that, you know, if one team gets stuck, the other one can definitely catch up and, you know, cruise through and steal the win.

36:14.200 --> 36:15.400
So, you know...

36:15.400 --> 36:17.220
It is still anyone's game, for sure.

36:17.220 --> 36:17.720
Yeah , yeah , yeah, for sure.

36:17.720 --> 36:20.200
Just getting progress here from either one.

36:22.340 --> 36:39.060
Yeah, and this definitely lends itself to, I feel like, a more dynamic approach, this type of challenge, where you've got this primitives that you can just poke at and see what they do, see what you get on the stack, and just try a write and then go look at the stack after you've done your write.

36:39.960 --> 36:46.460
So, I remember, I think, what I did was, like, you know, I read the code and got, like, a rough sense of it.

36:46.460 --> 36:50.320
Like, you get that rough... the size of the buffer is, like, hex 800 or something.

36:50.320 --> 36:57.160
So, I started out with that as, like, a base thing, did something, then looked in the debugger, and then made adjustments.

36:57.160 --> 37:02.040
It's very similar to what I feel like the players are doing here.

37:03.200 --> 37:06.480
But, yeah, it's gonna be...

37:06.480 --> 37:07.180
So, that was interesting.

37:07.180 --> 37:12.840
We saw that, like, I mean, times 100 makes sense if we're pushing or popping eight bytes at a time, right?

37:12.920 --> 37:14.600
If it's an eight byte stack.

37:14.780 --> 37:18.480
But we had three use in a row times 100.

37:19.260 --> 37:23.500
So, I'm not sure if that was just, you know, do more just to...

37:25.280 --> 37:26.480
Yeah, I'm not sure about that.

37:26.480 --> 37:29.320
Like, three seems like a bit of an odd number.

37:29.780 --> 37:30.960
Three times hex 100.

37:30.960 --> 37:34.240
Yeah, like, if it was two or four, maybe.

37:34.240 --> 37:38.460
But, yeah, I don't know about that one.

37:43.250 --> 37:43.730
It's...

37:44.830 --> 37:48.830
You can tell the teams are a little bit ready for live CTF, though.

37:48.830 --> 37:54.630
We saw them come in with, like, this starter shell scripts with their alias macros or whatever.

37:54.630 --> 38:02.350
We've got two people very familiar with PwnTools and with even the interactor.

38:02.350 --> 38:05.090
Now, is the interactive prompt, is that Jeff or...

38:05.810 --> 38:06.990
No, that's PwnTools.

38:06.990 --> 38:08.750
PwnTools has its own kind of interactive...

38:08.750 --> 38:09.390
Yeah, yeah, yeah.

38:09.390 --> 38:11.850
...GDB session that has all the same kind of...

38:11.850 --> 38:12.310
Oh, no, no, no.

38:12.310 --> 38:14.370
The interactive is just, you know...

38:14.370 --> 38:14.790
Well, no, no.

38:14.790 --> 38:21.170
So, I know the PwnTools interactive, but on the right side, for example, on Macaroni now, they're looking at the debugging session, right?

38:21.170 --> 38:21.390
Right.

38:21.390 --> 38:31.910
So, here you can see that they're running PwnDebug, which adds all of these, like, nice colorings and extra plugins and stuff to GDB.

38:31.910 --> 38:40.890
So, I think there are, I would say, currently two big GDB kind of add-ons for exploit development.

38:40.910 --> 38:50.730
PwnDebug being one of them, and then Jeff, G-E-F, being the other one, both, you know, with their pros and cons and popular within the CTF community.

38:50.730 --> 38:57.470
So, they have a bunch of modules adding these, like , trying to interpret addresses.

38:57.470 --> 39:04.350
You can see these, like, various pointers with different colors, like, whether it's in the text segment or, you know, the stack and so on.

39:04.350 --> 39:13.730
Yeah, it definitely is easier to read when you can see those highlights, as well as even just seeing the register from the stack, as opposed to the default GDB interface, which is empty.

39:13.790 --> 39:19.210
Now, you will see these, like, stack printouts, where it will also, like, dereference the pointer.

39:19.210 --> 39:27.510
Like, it will say, like, this is a pointer to, you know, the heap, and it's pointing to this value, and things like this.

39:27.970 --> 39:30.050
And it can even do that, like, multiple times.

39:30.050 --> 39:40.210
Like, this is a pointer to the heap, pointing to another pointer to the heap, and so on, which can be very helpful in these situations when you're playing.

39:40.210 --> 39:44.110
So, I've been watching a thing about SAD, and it looks like they've changed their league.

39:44.110 --> 39:57.070
So, now they're trying to offset in... they've changed that hard-coded hex 100 to a hex 80, and they're using 80 U's, then, to look at it.

39:57.070 --> 39:58.930
Okay, so now we've got a whole bunch of...

40:00.250 --> 40:03.490
is that 5.7 or 7.5 on the stack?

40:03.550 --> 40:05.650
Oh, these are probably ASCII U's.

40:05.650 --> 40:10.350
So, I've probably seen their own payload on the stack, I think.

40:10.350 --> 40:14.450
So, if you look at whatever hex 75 is... yeah, lowercase u.

40:14.450 --> 40:16.610
So, you can see it right there.

40:16.790 --> 40:21.250
So, that is indeed them reaching their own buffer.

40:24.790 --> 40:33.650
And there are definitely, like, the sort of, like, finding your own buffer in, you know, in the memories is oftentimes a component of an exploit, right?

40:33.650 --> 40:45.130
We've got to, like... maybe you want to remove an old pointer from your thing so it can go further, or you want to write some... maybe you want to write bytes into your buffer that weren't writable in the original input, but you could do it with a virtual machine,

40:45.130 --> 40:48.010
or maybe you wanted to write some other metadata around your buffer.

40:48.010 --> 40:52.190
You know, there's a lot of things you could do by sort of, you know, finding that data.

40:52.190 --> 40:55.170
I think we're so used to, like, Git code execution.

40:55.270 --> 40:55.770
Right.

40:55.990 --> 40:59.950
But ultimately, the goal is, like, you know, there could be other steps along the way.

41:00.410 --> 41:03.470
And I want to switch back over to Macaroni here.

41:03.470 --> 41:07.510
We can see if they do it again, because I saw one thing they did, like, down there.

41:07.510 --> 41:11.250
You can see the ROP chain, and they have also, like, some A's appended to the ROP chain.

41:11.290 --> 41:13.670
And I saw that they were looking for that in the debugger.

41:13.670 --> 41:17.990
They pre-appended it as well with some A's, and ran it in the debugger, and they showed up.

41:17.990 --> 41:26.050
Let's see if this happens again, or if they, you know, were done with that particular step of their analysis.

41:26.050 --> 41:30.470
But I think it can be a pretty nice educational moment.

41:30.470 --> 41:32.450
You can see here, they're changing around the offset again.

41:32.450 --> 41:39.610
I think they maybe got something out from the thing that I just described, where they pre-appended it, they saw, like, the offset, and now they're making adjustments.

41:39.810 --> 41:41.770
So let's see here if we can see this.

41:43.790 --> 41:45.730
Okay, they quit out immediately.

41:45.730 --> 41:49.210
Okay, they forgot they had this dumper section, right?

41:50.090 --> 41:57.830
And they, you know, they, you know, have... this can also be, like, you know, a thing where you you start messing around with your exploit script.

41:57.830 --> 42:01.670
You put in various scaffolding, and then you remove it, or you forget to remove it.

42:01.670 --> 42:05.510
Yeah, you get worse off before you realize you've actually left something in.

42:05.510 --> 42:07.570
You've got to go back and, yeah, fix up.

42:07.670 --> 42:12.030
I definitely did that several times when playtesting my challenge.

42:15.980 --> 42:31.080
Well, so again, adjusting... I think we're actually past second hint time as well, although, again, I don't know if... I don't think there's anything we can tell them that they don't know about the binary in terms of how it works.

42:31.200 --> 42:41.940
It's really just a question of who's going to actually get the mechanics, iron out all the kinks, and I would be much more worried if we hadn't seen one solve already.

42:41.940 --> 42:46.540
But we do know, like, yeah, getting that one solve in is reassuring as an author.

42:46.540 --> 42:47.540
It is doable.

42:47.860 --> 42:54.580
We know it got done, but let's see if we end up needing a sudden death challenge for this one or not.

42:54.580 --> 42:58.920
So I think they're going back to remind the team, so we might see them pull up that hit page again.

42:59.100 --> 43:04.000
They're going to let them know that, hey, that you have gone past that 35-minute timer.

43:04.640 --> 43:09.340
Yeah, and I mean, I really want to see the teams succeed.

43:09.340 --> 43:10.080
Oh, we all do, yeah.

43:10.100 --> 43:18.260
And we also would prefer to not have to use one of our sudden death challenges.

43:18.400 --> 43:23.500
Let's say we have not prepared the challenges enough for sudden deaths for every match.

43:23.500 --> 43:28.040
No, no, but we also have done horribly wrong if we have to use it.

43:28.040 --> 43:29.640
Oh, I just saw a very interesting thing.

43:29.640 --> 43:31.720
You can see they're changing their thing here.

43:31.720 --> 43:33.220
They're changing the whole thing.

43:33.220 --> 43:39.980
They found the win function, and they were getting rid of the libc stuff.

43:39.980 --> 43:42.700
They were leaking the program base.

43:42.700 --> 43:46.740
They're changing it, and now let's see if they actually manage to do it.

43:47.040 --> 43:53.000
I think PigButt said it's going to be very sad if they just missed the win function, and that's the difference here.

43:53.000 --> 43:55.220
Yeah, let's see here.

43:55.220 --> 44:03.700
They are still having some kind of... oh, right, they forgot to rename the variable in one place.

44:03.880 --> 44:04.820
Is that a shell?

44:04.980 --> 44:10.640
No, it's a breakpoint in the GDB, so we'll see here.

44:10.820 --> 44:30.840
It could be so close, but they're having... it's the stress that causes tiny mistakes, and it's frustrating, but it feels like I can almost see the stress in the way the cursor moves.

44:30.840 --> 44:31.700
It's regenerating.

44:31.700 --> 44:37.300
Yeah, and they're thinking in their head, my opponent's seconds ahead of me.

44:37.300 --> 44:41.540
Right, and especially once you find something that's... It makes it easier.

44:41.540 --> 44:43.400
Really, it's like, oh no, I missed this.

44:44.380 --> 44:47.820
Obviously, the other team, they know about this.

44:47.820 --> 44:49.920
And yet, every indication is they do not.

44:49.920 --> 44:52.820
You get to see PigButt sad, honing in on that.

44:52.820 --> 44:53.660
But they don't know that.

44:53.680 --> 45:04.400
Ironically, given that they've spent the most time in IDA, I think, looking at it, they were really looking around that main loop and around the interpreter loop, so we haven't seen them.

45:05.520 --> 45:15.840
Yeah, you can see now they're just extending like spamming the win function, adding ref instructions, just trying to get this to work.

45:18.260 --> 45:20.680
Yeah, I feel... Oh, they have the shell.

45:20.680 --> 45:21.460
There's a shell.

45:22.240 --> 45:23.760
There's a shell for macaroni.

45:23.960 --> 45:27.540
So now they need to connect to that.

45:27.540 --> 45:28.720
Oh, they're going to throw it remotely.

45:29.140 --> 45:31.700
So now let's see if we have... This is looking like it.

45:31.700 --> 45:32.980
Copy pasting the address.

45:32.980 --> 45:34.140
They're doing remote.

45:34.880 --> 45:35.940
They have a shell.

45:36.080 --> 45:36.760
They do.

45:36.760 --> 45:37.940
Submitter.

45:37.940 --> 45:39.160
And then...

45:39.160 --> 45:40.200
Yep, that's it.

45:40.200 --> 45:42.680
Congratulations to Macaroni.

45:42.680 --> 45:43.840
Great job.

45:43.840 --> 45:44.620
Very nice.

45:44.620 --> 45:46.380
Very nice, Macaroni.

45:47.060 --> 45:48.040
Yeah, let's...

45:49.980 --> 45:53.280
If I can pull up the right sheet.

45:53.280 --> 45:54.500
There we go.

45:54.500 --> 46:04.120
So that was our first round of matches here at the live CPF from the DEF CON CPF finals.

46:05.840 --> 46:08.240
And yeah, I think maybe we didn't mention this.

46:08.240 --> 46:18.180
So live CPF is part of the DEF CON CPF, where you have 12 of the best CPF teams across the world playing in like a big attack-defense competition against each other.

46:18.180 --> 46:20.520
And it's like a sub-event within this.

46:21.220 --> 46:30.220
They play this live CPF, like a one-on-one competition, where the results from this will then give them points that feed into the main event.

46:30.220 --> 46:39.980
So the total points they're going to get are going to range from about 1,337 the elite point range in the first place, all the way down to 500 points for the last place team.

46:39.980 --> 46:42.540
So every team who participates gets points.

46:42.540 --> 46:46.040
That way nobody can skip out and not send somebody to try to play.

46:46.040 --> 46:54.860
We wanted... I'm glad Nautilus Institute, who are the organizers of the main CTF, encouraged teams to participate by... there is a participation award for even doing this.

46:54.860 --> 46:56.240
Because it is brave.

46:56.240 --> 47:00.540
It is stressful to get up and be willing to let people talk about what you're doing.

47:00.540 --> 47:02.960
So yeah, we're glad that they did that.

47:03.060 --> 47:06.720
We're going to go ahead and get set up for the next match, which is going to be coming shortly.

47:07.220 --> 47:12.060
Yeah, because we are... since we are a little bit behind the schedule, we will get this going as soon as possible.

47:12.060 --> 47:12.980
We'll go to...

47:12.980 --> 47:15.300
we'll bring up some like intermission slides.

47:16.200 --> 47:18.300
And yeah, we will be right back.

47:18.500 --> 47:19.200
Don't go anywhere.

47:19.200 --> 47:19.920
As soon as we get ready.

47:19.920 --> 47:20.300
Take care.

47:20.300 --> 47:20.840
See ya.

