start	end	text
10060	14560	Alright, we're still getting that challenge ready. I want to go ahead and give everybody an update of just kind of where we're at.
14560	21200	Again, this is the final round. We've got MMM and we've got Hypeboy. We had just the closest match.
21200	25820	They were both running locally, but the payloads weren't working remotely.
25820	28280	We're not sure why exactly that, we're going to have to go back and look at it.
28280	31960	We did have one, our test solver script, we were running at the same time.
31960	37080	We were running that remotely on the same server at the same time, just to verify it was still solvable.
37220	42100	That was still working, so we're pretty confident that the challenge wasn't broken, but we're hitting our time limit.
42100	47000	And unfortunately, because we have a hard stop that we have to attend to and we want to have consistent rules,
47000	49840	we had to pull that challenge back at the 50-minute mark.
49840	52940	Every challenge in live CTF this year only runs for 50 minutes.
53220	56960	And so we've got our sudden death challenge in, which is even easier.
57780	61680	We sure hope. This one should be really, really fast. All the sudden death ones are very, very quick.
61680	66680	It's just even more nerve-wracking. I feel awful for the players. I know how stressful that can be.
66720	70800	We're preparing that right now. We're getting it in the system.
71420	74340	And hopefully we'll be prepared for that soon.
78980	82460	They're getting the config as real. They're letting the competitors know.
82820	84280	So we'll be back shortly.
85280	86860	What a nail-biter.
87520	90360	So I'm going to pull up the chat again and see if we've missed anything.
91600	94920	So the question in chat that I saw was,
94920	99600	because this is a double elimination tournament, if MMM wins, will there be another round?
99600	102520	And unfortunately, no. This is the last round.
102520	105660	The rules that we published and gave to all the teams several days ago,
105660	110260	we basically said the competition is double elimination until the very, very end.
110260	115420	So if you actually look at the livectf.com bracket that's been posted,
115420	119660	there is no other match. This is the last match. Win or lose, this is it.
119800	122820	It would be a bummer if Hypeboy doesn't get a second chance,
122820	125260	but we didn't have enough time on the schedule.
125260	128660	We didn't have enough ability to run that in.
128660	133180	Also, this is a way that you sometimes run double elimination matches.
133260	136520	It sounds like we're ready, so let's go ahead and queue up the competitors.
136520	140300	Let them know that they should be on the page, and we'll do the countdown.
140300	145300	Looks like they're both there right now, so let's go ahead and put this in.
145560	150580	5, 4, 3, 2, 1, go!
150580	151100	And here we go.
151100	153180	And we have the Sudden Death Challenge started.
153180	154560	And this is going to decide...
154560	156540	I know nothing about this challenge. Do you know?
156540	159880	I know a little bit of this challenge. This challenge is called Hopscotch.
160980	163980	So they made some changes to it throughout the development,
163980	168960	but the basic idea is that you write shellcode, but you control, I think,
168960	172840	you control four bytes, and then there are four bytes that you don't control,
172840	174720	and so on, repeating.
174780	178920	So basically two bytes of shellcode payload plus a two-byte jump over the next four,
178920	179640	and you can arrange anything you want.
179980	185740	As I said, I might not have the latest version of the challenge in my mind,
185740	187080	but I think it's something like this.
187500	192460	Just like you said, a two-byte useful, two-byte relative jump, and you continue like that.
192460	196440	I've had a very real-world thing similar to that, actually, many years ago,
196440	197640	where I had to write a similar payload.
197640	201300	I got real good at knowing all the one- and two-byte opcodes in the manual.
201320	204580	So Hypeboy went to the debugger very, very quickly as the first thing that they did.
205120	210120	MMM, I saw they pulled it up in IDA earlier, and they're back now.
210120	213380	They're already copying in the remote address, by the way, this time.
213440	218240	In a lot of the matches, we've seen the players not do that until they're actually throwing it against the remote,
218240	224100	but now they got it immediately there just to have it so that there's nothing once they have the solution.
224280	226500	It is appropriate that, again, this is another shellcoding.
226500	231480	This is our sudden-death shellcoding challenge, which makes it appropriate for this particular one.
232120	233220	Here it is.
233240	236340	And, yes, the challenges will be all in GitHub like last year.
236340	240500	So we will publish all of the solutions, all of the challenges, all of our solutions anyways.
240500	242380	The teams are welcome to publish theirs as well.
243560	250020	So I see here, and I remember the shell script, their export script was that they were just throwing shellcode immediately.
250240	253740	I mean, this is sudden death. It's an easy challenge, but it's not that easy.
254180	255500	It's a little more than that.
255500	259600	So maybe they just did that without even... they just tried it.
259600	261680	Like, I don't know, just in case or something.
262580	263780	Without even seeing it.
263780	265680	Yeah, it's very nice.
265680	270060	But I want to switch over to Hypevoid because here we have some actual debugging and stuff going on.
270060	274060	And if they're looking at this stream, the awesome stream, you can see what was written out.
274060	277580	So they're looking at what bytes were changed, how things have been modified.
277660	284060	Now, are the bytes in between actually totally rewritten, or are they just randomized?
284060	285800	Do we know what happens to those bytes?
285800	288180	So I actually don't remember that part.
288220	291100	But if I remember, I think it's a specific byte.
291100	294640	It's a specific byte value that just gets placed there.
294640	295300	Written each time.
295300	295900	Yeah.
297080	300360	But, you know, don't quote me on that.
300440	303180	And we're seeing Hypevoid have that same kind of workflow as before, right?
303180	305560	They're still using that same online assembler, disassembler.
305560	307220	They use that to kind of go back and forth.
307340	307880	It is interesting.
307880	311800	Some people end up using, like, a little command line tool.
311800	319020	Like, you know, I had, like, dis.sh or, you know, asm.sh or a little REPL that they'll put something like Capstan into.
319400	322320	And then, actually, over there on MMM, what's going on over there?
322320	322600	Right.
322600	327080	So it looks like they're putting together a shellcode.
329160	332540	And maybe they are going to attempt something like what you did.
332540	334620	It looks like they're just getting the instructions there.
334620	343120	Maybe they will, you know, do the assembly to get the various bytes and then try to maybe piece this together with some jumps or something else.
343120	346220	So we'll see how that goes.
346220	350340	You see one function there just called remap page as read and executable.
350980	356680	And then the, yeah.
356680	359880	So we have the export script there with what they are trying to do.
360380	365040	Over on Hypeboy, what I've seen, you can see the writing there, again, the hand-coded assembly.
365040	366280	So they're doing a similar kind of approach.
366280	372460	We've got these two-byte opcodes of the moves, single XOR reg reg.
374260	381740	Oh, so if I understand correctly, they are doing the, you see they add some NOPs there?
381740	381940	Yes.
381940	386020	So they are kind of emulating the, like, the modified bytes.
386020	387440	Is it only a single byte that's being written?
387440	389540	So this is where I might have been wrong.
389540	393160	It might have been, like, you had a few bytes then or something like this.
394080	396600	If it's only a single byte that's being written, then I really like that approach.
396600	397120	There's no jumps needed.
397120	398220	You know what it could be?
398220	405760	It could be that they are just adding those NOPs as kind of, like, delimiters to know how to cut up the byte string afterwards.
405780	406400	That's a good point, too.
406400	408040	They could be then reassembling it later.
408040	409700	So, like, you assemble.
409840	412480	Because if you just assemble your shellcode, you would just get a string of bytes.
412480	417680	And you don't know, like, what bytes correspond to what instructions unless you're using some specific tooling for that.
417680	423220	So, like, an easy and hacky way of doing that is to just put that NOP instruction in between each instruction.
423220	425980	Then you can easily see these bytes are...
425980	429480	It would be kind of, like, similar, like, to just assembling one instruction at a time.
429480	431460	But you're doing it in one go, maybe.
432700	433360	Here we go.
433360	436120	So you notice they've got that sleep in there.
436860	439620	I think we're seeing the sleep over on Hypeboy's payload.
439620	442700	Because I think they're a little cautious about, like, the network socket, the remote.
442700	445120	It may be in their head.
445400	447240	They want to run up on something.
447380	448740	Are we possibly this close?
448740	450180	Are we still just looking at how it's working?
450560	452260	It's hard to tell.
452260	455720	Like, you know, when they're running these debuggings, you start to see, you know, is it...
456300	458600	So they've got a full payload now.
458960	461040	And they're going to write that payload into the buffer.
461060	463520	Right. So they do a staged approach to this one as well.
463520	464620	So they think their stager is working.
464620	467400	They're going to go ahead and test it and see if it works.
467760	468440	But they might still be...
468440	469900	So they're still looking at the payload.
469900	470600	They want to watch it run.
470600	471800	They're going to check their registers.
471800	472340	Yeah.
472580	473300	And then...
473300	476340	Well, I think there was almost working, but there was this...
476340	478280	There's something...
478280	480280	I think there's something that's off.
481420	482600	It's encircling our assignment.
482600	483080	Yeah.
483080	487120	Some, you know, a little bit of, you know, frustration or thinking about that.
489140	489940	But it's...
489940	493040	It seems like they have most of what they need.
493040	493280	Yeah.
493280	496800	Is it the REX instruction that it's being inserted in between?
496800	500680	Well, I don't think I even know what that instruction does.
500680	502380	Well, the REX is right on 64-bit, right?
502380	503660	Isn't that what puts it in?
504360	508260	It's a prefix specifically if it's for...
508260	510020	Oh, right. Yes.
510220	511280	64-bit or 32-bit.
511280	511880	It was part of...
511880	513780	Most of my shellcoding days were all 32-bit.
513780	514940	I'm just that ancient.
515460	517020	But I believe the REX prefix is...
517020	520000	So how will that modify or how will that change the behavior of...
520000	521180	No, the trick is you just don't want...
521180	522380	You want to avoid it entirely, right?
522380	524320	The answer is your payload should just work around it.
524320	524640	Right.
524640	528600	And in this case, I was just thinking about why...
529180	533560	How did their shellcode behave differently due to those REX bytes?
535380	537620	We're dividing a pointer.
537620	538420	This is interesting.
538420	541660	So what's...
541660	544420	Yeah, I'm wondering how much...
544420	545500	Because, again, there's a lot of ways you could do this.
545500	550140	You could try to account for the bytes that are being written by working them into a working functional command.
550680	557420	We've seen the pop immediate 8-bit, for example, would be one way you could eat a single byte afterwards.
557640	557820	Right.
557820	558720	Or pop...
558720	561740	And now we have the jump approach here going on.
561840	562720	We will see it here.
562720	565860	You can see a push, jump, and they're adding the labels.
565980	570300	And they're just doing the relative jumps to this.
570660	574360	So this, I think, is definitely the way to go, right?
574820	575600	Well, sort of.
575600	577620	Except that push zero, we don't have a size on it.
577620	582620	So depending on if you've got a push zero and it's like a 32-bit immediate, you're going to write five bytes.
583000	584720	So A is actually...
584720	585060	Yeah, but I think...
585060	586020	Right? That's not going to be...
586020	588600	No, so let's see. Push...
588600	592340	I would have just done four nops under that A label if I wanted to skip over the A label.
592340	594060	In fact, actually, I would have used another label.
594440	597420	I just would have put the label after and jumped straight to the label, right?
597420	600020	And then have my garbage there.
601480	607700	Oh, you're saying you put your jump instruction and you put four nops or something.
607700	607980	Exactly.
607980	609240	Like fake nops.
609240	610080	Just put anything you want to get rid of.
610080	612820	And then you do the label instead of doing the label plus an offset.
612840	614240	I feel like you're just setting yourself up for it.
617900	620060	I actually think that push zero is a bad idea.
620060	621760	Because I think it's going to default to five bytes.
621760	622700	It's going to be a...
622700	623680	Was it 68?
623680	627020	Right, because there is no immediate...
628360	633380	Is there no 16-bit push immediate instruction?
633380	634720	No, it's only 8 and 64.
634720	644020	Right, so you would have to do something like XOR racks, racks, push racks instead to get that.
645820	647140	Or something like this.
647140	648340	Let's see.
649260	654240	They're jumping over the A1, but I feel like I still don't see...
654240	656740	If the bytes that are being written, if those are multiple bytes,
656740	660900	I would expect to see multiple bytes of just not padding or something, right?
660940	661040	Yeah.
661040	662900	Just put a DB.
663540	664120	Right.
664120	666800	But I mean, this is kind of going in the right direction.
666800	672480	But I guess it takes a little while to wrap your head around this way of thinking with the shellcode
672480	674060	and do that in an efficient way.
674200	675420	Let's check back in with...
675420	675620	Hi, boy.
675620	676220	It's been a little bit.
676220	677360	So we've got a whole bunch of A's.
677460	679120	Always a good sign.
679240	679660	Yeah.
681100	682580	It's a buffer overflow.
683060	684700	So a push 44.
688060	688420	So...
688420	690700	And they're verifying that value.
690800	691480	What have we got here?
691480	692220	Okay, so I do...
692220	695480	Okay, now we do see two byte NOPs here.
695480	698040	So we've got two NOPs, or actually more than that in a row.
698040	698960	We've got three.
700540	705840	Okay, so they're doing an interesting pattern.
705840	709440	So it may be that the bytes that are being overwritten are not necessarily contiguous, too.
709440	710480	So if they've...
710480	713340	I think actually one thing it would have been to do is just write in a bunch of nulls.
713340	719960	It probably would have been easier to write a whole bunch of nulls if you could send those and then just see what bytes it ended up at.
719960	721740	It might have been an easier hint.
721740	727420	It certainly would have helped us poor presenters as we tried to do it as we were watching them solve it.
727420	734680	But I'm more confident, at least right now, in the way Hypeboy's payload is looking.
734880	738440	Just looking at it as it has those NOPs kind of built in.
738440	740220	There's a syscall and a read there.
741280	743020	NOPREX, NOPREX, PUSH.
743020	746440	Yeah, but I really thought I saw a...
747900	750000	Okay, so they're checking the register value.
750120	750960	Yeah.
751340	752580	And RCX is not good.
752580	753720	So they're going to need another...
753720	755440	Yeah, so they're working on...
760660	761920	Shift left.
762360	763900	Okay, interesting.
764340	767200	You probably need RCX if it's the whole width measure.
767200	769660	That'll encode more efficiently instead of like the CL.
771540	773060	No, no, but it's shifting...
773060	775460	Because they had a small number and they wanted a larger number.
775460	781160	I think they didn't care about the specific value, right?
781160	783680	Maybe they just wanted a larger number or...
784680	785800	They're trying to...
785800	791640	It seems like they're trying to piece this together from these small instructions.
792480	796560	Oh, is it possible that they are like doing...
797780	801520	Basically making the REX a prefix of the NOP instruction?
801520	802500	Yeah, they've done it several times.
802500	803600	You can actually see them stepping through it.
803600	804420	Right, right.
804420	808360	So you effectively then get three bytes of useful...
808360	809380	You do like...
809380	814160	In each four byte block, you do NOP and then your three bytes of whatever useful stuff,
814160	819360	which is actually more efficient than the two bytes plus the relative jump that we were talking about,
819360	821380	which MMM is doing.
821380	822580	So this is actually...
822580	823160	I didn't...
823160	827220	So now I'm starting to understand what the NOP idea actually is.
827220	829320	Okay, this makes now complete sense to me.
829320	830500	And I think this is...
830500	834100	I think it's both easier to write and more efficient.
834100	835500	Absolutely, because you're going to get...
835500	838880	For every sort of chunk of unobfuscated stuff, you're going to get three...
838880	845320	And you don't need to fiddle with the labels and stuff when you're writing your assembly.
845460	848260	As long as you put your NOPs...
848260	852500	And you do have to be a little careful, because some of those prefixes can do weird things.
853060	854760	But again, they're stepping through it in the debugger.
854760	856340	As long as the debugger doesn't change the behavior...
856340	858120	Okay, that's off the end.
858560	859980	Where are we at now?
860260	865500	Okay, so now it looks like they're just doing them basically one instruction at a time, inserting it.
865500	867280	So you get the three byte instruction there.
867320	868760	We've seen this pretty consistently.
868760	869060	Right.
869060	870700	It really doesn't do a lot of...
871180	875800	So I would say that this approach is marching steadily towards the answer.
875800	876180	Yes.
876180	877840	And it will work.
877840	880260	The question is, will MMM catch up?
880260	883940	Let's go ahead and take a look back at MMM and see what they're up to as well.
883940	887140	So again, if they've got a full solution, although...
887140	888880	Yeah, so we're still seeing the NOPs, right?
888880	891280	We're seeing single instructions and then jumps and then...
891280	894140	But you can see there at the top, you don't have the push anymore.
894140	896900	You have a XOR AX AX.
897840	903060	So you don't have the push with the immediate, which you pointed out would be an issue.
904660	905620	Was that a solution?
905620	907600	That is...
907600	910360	That is there. Is that it?
910380	911720	Let me get a...
912380	916160	That's it. We have a winner. Congratulations, MMM.
918080	918940	Oh my God.
918940	919720	Clearly it works.
919720	920520	Yeah, it works.
920520	921040	Clearly it works.
921040	922580	It can't argue with success.
922580	925640	Yeah, that's really cool.
925980	926840	That was...
926840	927880	Oh my God.
928140	930520	Congratulations first to both of our finalists.
930520	931280	Yeah, that was...
931280	932200	They're both unbelievable.
932200	932820	They're both fantastic.
932820	933560	Really well played.
934520	935440	Best of luck.
935440	938820	I'm sorry, Hypeboy, we don't have another round for you to be able to try one more time.
939180	940680	But that was fantastic.
940680	944720	We have to get all the scores over to Nautilus.
944720	945620	We got to get the scoreboard.
945620	948140	All the teams are going to go to the final awards ceremony.
948140	948640	Yeah.
948720	953520	And we want to also bring out the live CTF team here too.
953520	953820	Right.
953820	955740	We've had a lot of folks that you haven't seen on camera.
955740	956120	Right.
956120	959940	So basically, just to give a very short recap.
959940	966220	So over these three days, we have run this knockout tournament that's been running as a sub-event of the DEFCON CTF.
966220	974580	We've had all the 12 teams of the DEFCON CTF finals participating in this double elimination, one-on-one bracket, where they each send one person to play.
974580	976260	First one to solve goes on.
976260	978680	The other person, you know, loses.
980040	985080	And yeah, we will, you know, we're going to wrap it up here very soon.
985280	990920	And we will be, we will have recordings of all the matches that we have casted.
990920	998560	We will be publishing all the challenges on our GitHub together with some information about which team played in which match and links to the vaults and everything.
998560	1000500	So, you know, if you missed anything, you can go back and watch.
1000500	1001960	You can try the challenges yourself.
1001960	1004440	I think we will try to get the solve times as well.
1004440	1007820	So you can try to like, you know, try to benchmark yourself against those players.
1007820	1011120	We do know, for example, that we had also some network issues on one of the days.
1011120	1013540	So we're going to make sure we upload, like, the full quality videos.
1013540	1014880	So we'll do separate matches.
1015400	1017360	And you can, yeah, we want to see some races.
1017360	1019520	Maybe in the future we'll let you race live.
1019520	1022040	We'll list your challenges as the competitors see it too.
1022040	1023860	And you and the audience.
1023960	1026840	Let's get the rest of our live CTF crew up here.
1027460	1030960	Thanks to all of everybody that was a part of this.
1031820	1033600	That's what Zoom is for. We'll Zoom out.
1033600	1038600	So we've had a bunch of us.
1039260	1044880	Okay, we have a lot of us people here who have been contributing to this.
1045260	1050780	We've had multiple commentators including Josh and Mark here.
1050780	1052600	Thanks to Gamoza for coming out.
1053340	1054740	And this one is on the team.
1055580	1056720	That's all right.
1057560	1058960	Do you want to join us?
1059860	1061060	Do you want to come on camera?
1061900	1063400	Do you want to come on camera?
1064520	1065580	All right.
1065580	1067460	So we'll get the last one. We'll get everybody out here.
1067460	1071380	Yeah, just trying to get everyone here to close out this thing.
1071480	1077900	That last race challenge was actually a last-minute surprise for Kat who joined us.
1078080	1079860	So awesome.
1079880	1081480	All right, we got everybody. That's it.
1081480	1084360	I guess that's it for everyone. We'll say goodbye.
1084360	1084960	Say goodbye.
1085220	1086020	Bye.
