Hello, everybody, and welcome back. It is Jordan, CipherTex, and... Gamozo! We're here! Okay, so we have another round of live CTF. Neither one of us has been back today yet. This is our first stream of the day. I love that we've got a lot of new casters who've been joining us. We're preparing for a new round. They're doing the introduction kind of behind us. We've got, actually, we can see on their screens as we're looking at them, four teams ready for this match. We are going to be casting Macaroni... Do you say M-Hackaroni or Macaroni? I'm going to say Macaroni. Macaroni? Just because I love it. I think it sounds better. Yeah. I always thought it was M-Hackaroni, and then I finally heard somebody say Macaroni. Macaroni? Oh, no, no, that's way better. Macaroni and Hypeboy. We're going to see on this stream. But we also have Maple Mallard Magistrates, the other name of PPP, and Straw Hat in the non-cast. We're not commenting on them, but you can see their feeds as well in our alternate streams. So who's been crushing it so far on the brackets? I mean, in general, all of these teams are in the winner's bracket. So every team we're casting right now has never lost. This is the undefeated bracket. So this is a great one. So we're going to see some very quick matches. I think so. Hypeboy has just been destroying it so far. They may have sent up somebody different, though. Because one thing that's different is this is the first challenge that we told them was not opponable. This one is actually more... We told them it was a Crack Me, so more reverse engineering Crack Me style challenge. Oh, all right. So I might see some IDA today. Wait, Binary Ninja, I'm sorry. You know what? I wish that were true. However, we've actually only seen them. All right. Are we about ready for the countdown? So it looks like we're about ready to go live. So let's go ahead and let our... We're going to count it in. Five, four, three, two, one. Let's go. All right. So we're going to see both teams hop on in and get going. Who do you want to go with first? Ah, this is really tough to say. No Binja that we can pick from? I know. Because that would have been the first pick. That would have been the obvious one. Let's go ahead and go to Hypeboy first, because Hypeboy has been just the fastest. The matches they've won have been incredibly fast so far. So I've been very impressed. Although, again, I don't know if they're going to send somebody different if it's not the same person who's doing punnables. Now, did you know that every single time I've cast this, it's gone to sudden death? Oh, no. Are you cursed? Did you curse my challenge? So, yeah, for full disclosure, this is my challenge. This is one of the ones I wrote. And it's actually not something I normally would have done because I'm not kind of an RE person necessarily. Was that a drag-and-drop? What is... Drag-and-drop. Drag-and-drop into... What is this application over here? It's just VS Code. It's just VS Code with a terminal on the bottom. Oh, okay. So there... Although, I think I love the shell. So I'm guessing... Because it looked like this was a Mac, right? So it's a Mac that's got a VM probably that they're actually running their VS Code in. Because I think the... So they've got their IDA. Oh, that was... Did you notice that it was 7.7, I think, was the version of IDA? Ooh, is that the most recent one that was leaked or what? No, no, I'm not going to accuse anyone of that. I'm just saying it's not the latest actual IDA. So, like, the analysis might be... Oh, no, voiceover. Did they hit too many accessibility keys too quickly? Is that like sticky keys but on Mac? I think that's my guess. I think that's what they got. Oh, I'm really excited to see a little crack me here. All right, so they're dumping our source code out. So, okay, that's a very different approach. Now let's go ahead and actually look over on the other hand at... If I can hit the right one here. We've got Macaroni on the other hand still in IDA, right? So they're still just kind of statically analyzing this. Is that an SRAN zero? I don't think that's how you're supposed to seed your random number generator. So I had a debate. I had a debate when I made this challenge of how hard I wanted to make it. And I originally had an SRAN time on it. And then I thought, no, let's just make it a little bit easier. During playtesting, it was like, look, we want this to be solved. So it's a very not random random. Interesting. I mean, it looks like there were 40 iterations of RAN. So at that point, the seed has been very randomized. But you are going to get the same order with the same count of items here. Yeah. So, yeah, they are going to get sort of a fixed order. But it's not, like, intuitively obvious from static analysis here. This is interesting. To figure out this order, you really want to do that dynamically or just kind of run it. And either with a breakpoint, like, dump them out. Or, yeah, so actually over here on the other side. So HypeBoy, again, the first thing that they did, it's really interesting to me. They heard CrackMe. So they immediately decompiled, dumped it to text. And now they're cleaning it up because they want to actually get this buildable. There we go. Really? This is very clean. I love the way they're doing this. So all of the functions are very simple mathematical transformations, right? You can see it right there. They've got plus, minus, division, multiplication. And so they're pulling out the constant. So the plus and minus are just very large constants. The division is always a smaller number because otherwise you end up with just, like, zeroing out. You lose all the bits that were kind of there. Now, did you make this manually or did you obfuscate it? I had a generator. So it's pseudo manually generated. The version that we're running is not, like, auto-generated each time. There is one fixed copy that it worked on. And so, okay. Oh, actually, hold on. Back on the other side. Did we miss it? Simulation manager. What's that? Yeah, I don't know, but I saw that. Okay. So, again, there's a couple different ways you can solve this. You could throw it, like, into a solver, like a Z3. You could throw it into some sort of, like, you know, I'm here, go here. And, like, one of the tools, like, auto path finds might be able to actually, like, brute force your paths. So I'm really curious if we're going to see a mix of, like, so they're looking for a congrats. Are they going to drive it towards execution of the congratulations? Yeah. So, you know, my solution, I just pulled out all the constants, pulled out it all, put it all into Z3, and then, you know, let it go. Yeah. But... Do you think we're going to see Z3 here today or any sort of solver? We haven't yet. Okay. So I'm curious. And we don't necessarily have to either. And some of these are, you know, trivially reversible transformations, right? Right. And so there's definitely going to be alternate approaches. I kind of would like to see a different one. Yeah. But certainly I know it's at least solvable with the Z3 approach. So with SRAN, way back in the day, I'm pretty sure the entropy or, like, the state space of RAND was, like, 16 bits or 32 bits or something quite small. Is this a brutable problem? Is this a 2 to the 32 sort of thing? It's not. And the reason why, I think, is because the thing that's being randomized is the order of the functions. So the functions each have all these different transformations. I see. So the only thing that's going to be random here is, like, we're going to call a function 10 first or 20, you know. So that order is, like, sort of fixed random. It's not just obvious in the code what orders can be called because that has involved the random. But you could, again, with GDB, you can dump that out. You could rewrite. Actually, you could recompile it. Right. The source decompiles cleanly. Pull it out. Rerun it. And then print out the order before you run it. And we got Z3 already over here on hackaroni. So we do have a Z3. So that's exactly. And they've got, you know, the array here. Are we pulling out constants? Or I wonder what we're looking at in that array. So we've got the 8, 4. Okay. That actually, the array is almost certainly going to be the order of the functions. Right. Right. So they're saying that's the order of the functions called. And now they're going to. Are they just going to do this manually? It looks like it. No way. No way. Listen. The name of this challenge is actually John Henry. Okay. Okay. And this is sort of like the John Henry was the railroad man. Like, you know, hammering all day. Yeah. And, like, is he going to beat the railroad machine or whatever? Right. So this is kind of. And this is fantastic. Because I really thought, like, are people going to write some sort of, like, fully automated extraction? Yeah. Or are they just going to, like, copy-paste values to pull it out? This is terrifying to me. Because Z3 is, and Python in general, is not very generous if you make a mistake. It's not. If one of those slashes is not a two slash and it's a one slash. Exactly. You lost the whole thing. And it might take a long time to figure out where that very, very small error is. Yeah. And spoiler alert. Minor spoiler alert. I believe the second hint on this challenge tells them that, like, UDIV is not the same as div. If you actually look at the division operations in Z3. Oh, no. There is a difference in signed and unsigned division. Oh, and if you're looking through here, it would be very hard to catch the difference between a uint and an int when it comes to just popping through an IDA. Like, right there, that's an int. Well, and that may or may not be right, too. Because, again, the division operation that you're going to get, like, it's implicit a lot of the time. And so, yeah, it doesn't stand out at all. Oh, that's really tricky. So, it wasn't an intentional part of it. Yeah. But it very well could be. And we did know that might bite people, which is why I said that is the second hint that's queued up. Yeah. Specifically says, like, yo, go look at these things. Because that's the operation that's going to... And what we'll see is, if they try to do this in Z3 without the correct division... Right. It'll just be, it'll just turn away, unable to satisfy, right? Okay. So, it just kind of, like, times out, which is frustrating. But honestly convenient. It's better than... I mean, getting that time out is like, yeah. Finding a false answer. Seeing unsat is like, okay, I know that something is wrong. I have to do something. Yeah, yeah. Well, it can also, the other failure case, sometimes it can just, like, turn. Yeah. And just spin, and you don't know if you did it wrong. Hopefully they realize, again, this is a speed competition. Right. I didn't give them something that would take 10 minutes to run in Z3. That's not the design. So, if you hit that... Yeah. Something has gone wrong. So, hopefully they'll be, like... The nice thing is, once they get it, they can run it. Yeah. And then go off and do other things. That's one of the really interesting parts about a CTF and using a solver is, like, if I'm working on something in the wild and I'm bringing in a solver, I don't really know if it's satisfiable or not. Absolutely, yeah. And in a CTF, you know it's going to be satisfiable. It's going to be solvable. Or maybe the Z3 is the wrong tool. But, like, you know there is a solution. And, again, this particular challenge, these live CTF challenges are meant to be fast. They're meant to be really... Right. So, we want to showcase the sort of traditional, basic, like, archetypal... Yeah. ...challenges. So, what would your threshold be? When you get approached with a challenge like this and you see that there's, like, a switch statement with a bunch of different functions, when would you go immediately to automation or some regex or something to process this versus this very manual approach, which, honestly, I think is very clean if all the functions are tiny and it's only 20. But if you get surprised and you get to a later function and it's big, you might really regret it. Yeah, 40 of these functions was meant to... I did it by hand, certainly, but I also had, you know, the lack of pressure and stress when I was writing my solution. I wasn't timed. I designed it so that I thought it would be faster to... Although, again, I'm a Binja dev, so, of course, in Binja, it was, like, four lines of Python... Right. ...to dump out each function and each operation... Oh, you wrote a script for it. So, I wrote a script that... Okay. ...dynamically, like, pulled out all those contents. Have we seen anyone write a script for Ida or Binja or Ghidra? No. Okay. I don't think we've seen, so far, anyways. Although, I haven't caught all of the matches that have been doing... Yeah. ...other things around it. But, so far... And I think that's just because most of the people are focusing on the fast... Yeah, for sure. It looks like they already have the code extracted in the way that they want. Yes. So, now... They pulled out those... Because, again, remember, they just dumped the text from Ida... Right. ...and then copied and pasted, which I think is definitely a faster approach. Yeah, which is... Yeah, I definitely think HypeBoy is ahead at this point. And I like seeing that Macaroni made that transition into using lambdas. They were doing, like, def, making the full functions... ...and then they're, like, lambda, lambda, lambda, lambda. Yep. So, now it looks like we have very similar things on both sides, except Macaroni is still manually extracting those, and it looks like HypeBoy is already kind of approaching the problem here. Yeah, so they've got the big vector. They know the size of that. Yep. They have created this value at the end where they know that there's this final check. It must be equal to this value. Yeah. So, it's definitely on track. The question is going to be, again, on their division. So, you notice they're actually doing just a single division here... Right. ...on their operations. And this really is going to need to be the UDIV inside. Right. If you're going to use E3 on this, which, again, both are so far. Is there a way that you can set that on the variable and, say, just make everything unsigned or something on this variable... That's a good question. ...where you could just do a one-pass change all of them? Well, I would probably, honestly, do it with a text replacement at this point, like multi-cursor or something. Right. Yeah. Which is an interesting note that that's basically the fact that they did a text replacement. They took it out of IDA, deleted a bunch of lines... ...and then manually, like, did multi-cursor to replace it. I think that's a sort of in-between, like, a full-fledged, I've written a script to fully automate it... Right. ...or I'm doing it line at a time by copying and pasting the way we're seeing with Macaroni. Now, are they going to have to go in reverse RAND? Oh, there we go. We just saw the double division. Oh, there it is. So, they did just... Okay. They did just... It's closer. It's now... Yeah. It's what Macaroni is, but there's still neither one is going to get the right answer until they can realize that that's not quite the same division. So, I was... Right. I was afraid this is going to be a sticking point for teams... Yeah. ...which, again, worst case, they're going to get that hint. They will get that after 35 minutes into this round. Right. They're going to get notice of that. Huh. That's really tricky. So... Oh, no. Wait a minute. This is interesting. So, it looks like they're commenting out the actual Z3 components now. Okay. Are we trying to brute force? That's a good question. Brute forcing a 64-bit value is going to be... Impossible. ...a little tricky. Yeah. I don't think they have the compute... Especially in Python. Yeah. I don't think a 32-bit is going to be possible with arrays and stuff in Python, especially with, like, dynamic dispatch of functions. So, the arrays... Yeah, the array, look up for your functions. Yeah. Well, the function order... Yeah, yeah, yeah. What you really should do at that point is just put them all into the same function... Right. ...not call them as functions and do them... Right. ...do them straight through. Yeah. That would be the... If you really wanted to brute force it. So, let's see, though. Do you know if there are many solutions? There are. Like, are there many... There are multiple solutions. Because you say it's 64-bit, but what's the actual space? I don't know. Actually, that's a great point. Like, what if there's a very convenient one, very shallow? It's possible. And what I simply did was when I tested it, I got a single solution. I tested it. It worked. And then I went and tried a few other ones. Yeah. I would, you know, specify not that, not that, just to get a few more. Right. So, I know there's more than one, but I never actually characterized and tried to figure it out. That would be really fun. So, it is possible that there's maybe a lot of this and actually just random... I don't think there are. Okay. In fact, earlier versions there were. So, again, remember I mentioned that I tweaked those constants? Yeah. So that, like, the plus and minus are just large random constants, and then there's a much smaller on the division. Because if you have a very, very large division, you'll end up with, like, zero or one. Right. Exactly. Yeah. I see. And then everything on throughout it, you've sort of lost all those bits in there. So, by having the smaller, less than a byte-sized division... Yeah. I think you're keeping most of the bits of entropy up in there, or at least most of the bits are kind of floating through. I think it really depends on what ends at the end of that expression and where everything wraps up. So, if someone was watching from home right now and was interested in tackling this problem, is there a way for them to get those challenges? Not yet. Not yet. Okay. We will be publishing at the end of the competition, assuming we're still awake and concurrent. Okay. We have a GitHub. We'll be putting all of the challenges. Perfect. We have thought about trying to do it kind of live so people can play along as soon as the round ends. But, you know, even throughout, you know, it wouldn't be a huge deal because the teams could certainly like remotely connect to another team's box and pull the binaries off. It's a secret. Once the binary is out, the binary is out. Exactly, yeah. That would be fun for us. Okay, here we go. Crypto.util.number. Interesting. I'm very curious about this alternate approach that we're seeing. So, I haven't had much time to look at the IDA disassembly. What does the random factor? And I guess since it's seeded with the same thing, you always get the same ordering of the functions. Exactly. So, what is the controlled value? Like the scanf that prompted for that LLU. You were asked to put the very first value in that is multiplied or added, like that goes through all these transformations. I see, okay. So, you give it that single 64-bit value. Okay. And then it's going to call function 8, function 4, whatever the order of the function is. So, that random is just a very slight option. And again, this is one of those things where the challenge could have been easier or harder based on how we tuned that. But, you know, we could have, for example, like made every five minutes a different random order. Yes, yes. So, you have to get your solution under that time, and that would sort of hint that you knew it would be solvable in less than that. Huh. This is going to be really interesting. So, switching back over, it looks like, yeah, where are we on macaroni? They've got their mixture. We've got Python errors right now. Oh, no, yeah. I have seen a couple of... Which is not a good sign. What is this? Unsupported operand type for bitvectoref and int. Oh, you're going to need to convert those raw constants, aren't you? No, you shouldn't have to if you... There's like two different bitvector things in Z3, and I think one of them you can just do straight up like Python things, and one you can't. I never remember which is which. The other one is, again, that... What happened here? Oh, yeah. So, again, we're trying to do kind of text replacements. Oh, now we're back to signed division. We're back to floating point division in Python, which is just not even close to right. Is that allowed on Bitvex at all? Do you get an error when you do that? They're going to get that error, yeah. Okay. That's exactly what they're going to run. Oh, it's solving. Is it? Did they actually get that? It said it's solving. I don't... It does say it's solving. Okay. Oh, again. So, if it's working, it's... Again, I don't think they're going to get the right answer. I think it's going to run. I think they're going to run into that situation where it's just going to, like, spin forever because they don't have the right division. I could be wrong. I'm not an expert in Z3. Well, with that SRAN, the functions aren't running 0 through 20 in order, are they? No, they're not. They're not. And it looks like this is kind of assuming that they are? Well, so they have the R at the beginning. Oh, did they run through and get the values? Let's keep an eye out on whether the... Oh, here we go. Hold on. What did they... Oh, they just changed... Oh, so I think they're inverting. Yeah. So, now they're just trying to invert all the operations. And this is something that I didn't actually try, but it might be a valid solution. You may very well literally just be able to, like, invert all the operations. Although, you'll notice they didn't change the order. So, if you're dividing one way, do you multiply... It's actually in my head. Like, does it... Maybe it doesn't matter? Or, like, I forget the... I don't know if it works directly like that, but I'm also not some math genius. Oh, I did just see Macaroni do a really smart thing. Oh, and actually, we just saw the same thing from Hypeboy. Checking the scoreboard. Checking for hints. Because the hints do come in at 20 minutes and ends. I think we're not quite there yet, but we may be close. Very close, yeah. So, that was really... You can tell, I think, in the beginning rounds, teams were still figuring that out. Yeah. It is cool to see that they're remembering that. And, again, if we talk about, like, the hints, the first hint, I don't think we'll tell them anything. It's just kind of more of a generic, like, you know, use the solve or something like that. I forget the exact details of the hint, but that second hint is going to be the one that gives them, like, hey, division's important. Look at UDIV. Right. Because, again, I think that's going to be something that's going to block them. So, that would give them, like, 15 more minutes to solve that before we run into a serious situation. Yeah, now it looks like we're doing some Vim Regex replacement here to, I guess, do some sort of transform on the code. But this is kind of scary. I wonder if there is a saved copy of the original form of these operators. Because if there isn't, are you just relying on your undo buffer? What if you lose those? Because Macaroni did all of these manually. So, if they lose this, that's another 10 minutes of data entry, basically. And I think they opened themselves up to just copy pasta errors or to, like, typos way more than what we saw. That's very dangerous. Especially, like, when you're copying from Ida, you have, like, the C syntax, right? You have the ULL and stuff. So, you have to, like, make sure you're not copying the U. And it's very easy to grab the U, double backspace, remove one digit, and then you're just toast. So, let's see. We're looking into... Okay, so now they're just taking each of the functions. Oh, are they going to transform it so they get the order and they just have everything in order? Because it looks like they're going to try and do some sort of a transform on the code itself. Oh, they're trying to use Python to do the regex. And now you've got two problems, right? Yeah. When you use a regex, now you have two problems. If you think your problem is solved with a regex expression. So, they're changing... This is really scary. Like, when I see this, I see very high chance of risk. Ooh. That's not what they wanted. I don't think that's what they wanted at all. Multiply, minus, plus... Divide. I mean... Oh, wait, hold on. Are they doing a single, like, character right now? That's just... This is an interesting approach. I'm not sure what's going on with that. I'm not sure either. Let's go ahead and take a look back at... Not us. Let's go ahead and take a look back at Hypeware, rather. Alright. Oh, we're in it. Okay, init debugger. Interesting. So, like I said, I kind of expected... I wondered if people were going to pull the debugger to get the array order out. And is this 64-bit? It is. 64-bit x86. Yep, exactly. Oh, we're looking at this straight assembly, which is always a sign that maybe you're not confident in the information that you're getting directly from the decompiler. Well, and again, that's actually really wise on that division in particular. Right. Because that might be a way... It jogs your memory, and you don't just think about the abstraction level at the C layer. Exactly, yeah. But you start thinking about what's actually happening. Okay, so where are they breakpointing? They're breakpointing on... Yeah, this is really interesting. I'm kind of surprised no one has a symbolic engine that allows them to just run this very simple main function and just get the symbolic expression. I wondered about that. We did think somebody could just auto-pwn this with the right automation. Yeah, I think it'd be a one-minute solve because I didn't see any modulo operators, so it should be quite easy. Exactly, exactly. And yeah, that's kind of interesting. Do you know how long it takes for Z3 to solve this when you have the right expression? So at least on my hardware, it took, I think, less than a minute. In fact, at one point, I had made it up to 50 functions, and it was starting to take three or four minutes to solve. So I intentionally dropped it back down to 40 because I wanted it to be less than a minute. I wanted it to be fairly clear. I didn't want people guessing, like, well, is it taking too long because I've done something wrong or because... Yeah. So the correct solution should take about a minute to run, which I think is hopefully right. Did you symbolically simplify the expression or mathematically simplify it? No, no, no. I literally just copied and pasted, put in all those constraints, and let it go. Yeah, okay. So there's a chance that someone could probably get it even faster if they reduced... Because right now they're doing this whole lambda function thing, which will be a pretty bloated expression, and I'm sure it reduces down. Oh, yeah, yeah. But that's always a tough thing in C3 is, like, is it faster to do a simplification pass? Or I've had it where, like, doing a couple functions, simplifying, adding a couple more functions, simplifying has been faster than putting the whole thing in. But I've also had the opposite. I'm sure if you've worked a lot more with it, you kind of have a good feel for which way to do that. I have not, ironically. So for me, this was actually one of the very first... I mean, I've done a couple other challenges involving Z3 over the years, but actually partly I wrote this as an excuse to explore this more and to try it out. Yeah. And also because, like, as I said earlier, the goal of a lot of these live CTF challenges are, like, what's the core element behind some of these common challenges that we run into? Yeah. And so I thought, like, just, oh, like a basic crack me where you use Z3, you pull out some formula, and you run it through. And again, knowing that, like, okay, with these transformations, there's probably other approaches, which I think they've both abandoned Z3. It seems to me, like, that neither one is really using a Z3. Yeah. So we're not seeing Z3 at all. Yeah. They're really actually just trying to, like, do the bit shifting and inversion. Right. Which quite possibly worked. You haven't tried it. I haven't tried it. So it might run, it might not. Yeah. There may be other reasons why it wouldn't. That could be quite difficult. I think it really depends on, like, how these operators overflow and everything. I don't necessarily know. Making sure that you model things the same way. Yes. Exactly. Yeah. Huh. So I am going to be very curious. What do we have over here? Why do we have multiple things on Hype Boy? So base is not invertible for the given modulus. So whatever inversion function they're trying to do. Wow. That's interesting. I've never actually seen that. Apparently the Cryptolibrary has, like, an inversion where you can say just invert this math operation. Yeah. Or, no, no, no. Is that bit inversion? I'm not sure what that inverse function is, actually. Right. I'll definitely be looking that one up. I see the shift in mask. It looks like it's trying to make sure that those are 64-bit values. Right. But shouldn't Bitvex handle that for you? Again, they're not using Bitvex at all, right? They've switched over to a pure, like, basic math. Which, again, might be possible. I just don't know. If I were to ever approach a bit problem, I would never use Python for it when it comes to this. It's not well-studied. Right. It really isn't. Yeah. But it's hard to switch over. Yes. And it's really fascinating to me, too, that both of them started with a solver. Both of them just decided to bail on it when they're like, wait a minute. The solver is not the right approach. But it still could be. Yeah. Again, it is absolutely doable. So they're going to get that hint at 35 minutes to use a solver. Well, they're going to get the hints that's going to tell them to particularly use Z3's UDIF. In fact, actually, I'm going to go put the mic down, and I'm going to go ask what the hint is, because I don't remember what it was. All right. I'll come back, and I'll let everybody know. Sounds good. Yeah. All right. Yeah. Hypeboy's really got kind of all of this weird bit operation going on. They're trying to mask everything down to get to that, you know, 64-bit bitwise operations, which in the big space of Python, it's kind of hard to get that. Did you get our info? I did indeed confirm. All right. As I thought, it specifically says use Z3 UDIF. So it's pretty, like, clear. But again, they might not be wrong. I'm not going to say this isn't solvable this way. I just feel like there's a lot of, like, easy ways to mess it up and to try to get your exact... Yeah. It's interesting. What was that over there? Oh, we've got on macaroni. Yeah. We have the list of all the functions. We apply the... They're applying the transform onto those functions to, I guess, order them in the right way. But we have two F13s, I just noticed. I don't know what they were... They, like, duplicated it. Oh, 14. Were they... Oh, no. Did they add them all by one again? Oh, no. The copy pasta risk is real. Yeah. Because, yeah, X over 49. So they did a little bit of macro to, like, to increase the digit. Is that control A or something? I forget the exact... There's a key to, like, literally increase the number that I'm currently selected is a hot key in there. Yeah. And then they macro'd that. So, again... And then they're going to go manually fix up this. And that's... Was that 13 or 14? This is really scary. But they're back to bit back. So we are seeing... Yeah. And they added F40 to it. So it really comes down to if they have these expressions right. And I don't think they do with the single div. Yeah. That's what they're going to run to. But the good news is, then, if they do get that hint and kind of come back to it... Yeah. They might be better prepared for it than the approach we're seeing from BitBoy. I think that the timing of when that hint comes in could be a really, really big deciding factor. And it's like any minute now. The first hint's gone out. But, again, the first hint wasn't very useful. I don't even... Was it 20 minutes and 35 minutes? 20 minutes and 35 minutes. Okay. So we've still got another maybe 10 minutes, I think, before, give or take, before the next hint goes out. Oof. It was about five minutes ago that we saw the first hint go. Yeah. They could definitely do it. And I am glad that, you know, in our playtesting, like I said, this division bit us as well. So we at least knew that was going to be a gotcha. I know where Macaroni is in their headspace right now. I see exactly what's going on. They're looking at, around this F13 through 15, they're looking at Ida. They're concerned that they have something wrong. And it's just... Oh, hey, they're going to use dog bolts. Yeah. So they want a second opinion, too. Right. And this is, I mean, this is terrifying. It's basically like, is it time to just give up and just basically try from scratch with a new approach? Or do you go and you try and manually verify that you have the right implementations of these operations? And I don't know. That's really, really, really tough. Especially in a speed competition, right, where like literally every second kind of counts and you're just nervous. Are we going to see a script by any chance? Oh, a database snapshot. Nice. Okay. Decompiler Explorer. It's just dogbolt.org. It's all you got to do. I stole that name from somebody else on Twitter when we created this. So this is actually a joint project from a couple of folks. So Ilfax from Hexrays and Vector35, makers of Binary Ninja, we both pay for the hosting. And Vector35, we wrote most of the actual interface. Some of the Angular folks have some code that are part of it, too. OpenAI? Did I see a chat GPT? We are seeing a chat GPT. Wow. They almost did it quickly, like they were embarrassed, though, to show it. Can you rewrite those functions? Okay. So they're going to use this as a smarter text replacement, maybe? I'm curious. I am kind of excited. Now, would you trust the result of chat GPT to the level of a solver being able to reason about it? I think if all they're going to ask it to do is to do a bunch of formatting and to paste in a bunch of output, I feel like that's a fair thing. Fun note, by the way, the binary ninja that's running a dog bolt is not the latest dev version. So it actually, I think on these operations it's all fine, but for some of the... Oh, and Anger and Ghidorah are still... They'll get there. They'll come through. How big would you say this binary was? Oh, it's not very large. I could pull it up separately, but it's not super big. In fact, usually IDA comes back faster on Decompiler Explorer. In this particular one, it's... Let's see. No way. That looks very good. Your text processing, again... That looks... It's not terrible. Very good. No way. Yeah, but I think it's good for that. I mean, that... That's pretty good. I didn't really see anything that looked off in there. But the problem is you don't know. Yeah. Oh, did they have to teach you about division? Oh, no. Oh, no. Oh, no. Everyone's like... Macaroni. No. Poking around the same thing. And they have F40, which shouldn't be in there. It's not. There is no F40. Yeah, so there are only 40 total functions starting at function 0 to function 39. Now, are they going to go and just change it to a double div? What's the order, though? Hold on. Oh, no. Okay, no. They're doing the transform. They do look up their array. I think the way they do this is pretty good. That part's fine. Right. Absolutely. Do you think if they had the double div operator, this is just already basically solved? No, no, no. Because, again, the double div is still signed, I think. Can you write the inverse of those functions? I don't... yeah. See, now, at a certain point, you're going a step too far. Right. It's going to start hallucinating on you. I don't know if this is it or not. Oh, and you notice their solver just said something about a stat in the background. So that, actually, I'm a big fan of. If they're running a different copy of the script with the solver while they go out and try to do the inversion, that's good for them. Two different approaches at the same time. That's a good way to go. Great use of time. Hard to keep both that in your head, but... Yes, and make sure you don't invert one thing from the other. Are those the inverse? Or did it just do a dumb inversion where it did a negation or something? And what are they going to... oh, they're doing all... so here's their division. They're going to get rid of their division again. But, again, that's not quite what they want. But they're going to be well situated when that thing comes through. And HypeBoy just checked on that hint. And just as a... okay, so they're still looking for the hint. They know it's not too far out, but we do have a few more minutes. Let's actually go ahead and follow up with what HypeBoy's been doing to catch up with them. Because I still see... I don't think they're... yeah, still no Z3. All their Z3 solver stuff is still coming out. So they're still leaning into that inversion approach of really just trying to invert the operations. Right. To see if they can get that value. And I guess the goal is to just run through and just run it through backwards? Yeah, you'll just get a constant out. If you could perfectly model the inverse of those operations, yeah, that would happen. It's just... yeah, just tricky to do. And there's a lot of ways to get that wrong. So we'll see. And with the Z3, there's basically only one way to get it wrong. And it's literally just the division. It's just the division that makes it tricky. I see the double division went back in over on macaroni. So did they get an unsat? So we've got a... yeah, sat assertion error. Okay, so they know that it was unsat. Okay. And then they're changing it again with the double division. So again, I'm actually... did they miss a zero when they copied that? It was on which side of it was it? Is that highlighted all the way to the other zero on macaroni? Zero, zero, L, L. Also, let's see. Where is their final comparison? So the array... order the arrays. Unlocking in 227 seconds. Oh, I didn't even notice that before. It does give them the... Yeah, yeah. That's great. It does let them know... I think I saw Glenn... They do have the right value. Okay. So the value is correct at 100 at the end. Interesting. They really need those double divisions. For context, when I wrote this, I literally just had a debug version of it. I put in the input value I wanted to be the answer, and then I just checked the value at the end, and then I hard-coded it back in and recompiled it, right? Yeah. So it's really easy to find the solution. Now, I did still have to write the Z-theory. I did still have to prove it was solvable, and that's also how I could find over multiple solutions, but it's kind of easy on a forward operation. Okay, hold on. What are we doing here? Out equals... Zmod. Zmod. Oh, no. Yeah, okay. So they're essentially doing now what we saw before. They're trying to constrain. We're going to use SageMath. Really? So are they going to do the sort of inversion approach that we've seen? Yeah. But they're going to use Sage to try to do these inversions and try to model the way that the opcodes are going to behave, but invert them. Right. Yeah, so I was a little skeptical of some of these inversion attempts, but I actually really like that... Inverse of that doesn't exist. I really like the HypeBoy approach here where they're still got their solvers kind of running. Right. So run a solver, but then let it go and see if you get an answer while you go off and try other things. Was that HypeBoy or Macaroni? I'm sorry, thank you. Macaroni. Yeah. HypeBoy still seems that we can double check on them over there. They have a whole new Python script? They're back to Z3. Hold on, did they? Yeah. Okay, they didn't see the hint yet, though. So how do you do the unsigned divide in Z3? It's just a function called UDIV. It's literally a built-in operation called UDIV. Which is why we tell them the exact function name in that hint. Right. Because I think that will be the last stumbling block that either one can do. The other thing is I'm keeping an eye on our alerts. I don't think I've seen the others. So remember, as a reminder to our viewers, you can go over to the other streams and you can watch the two other players that have been doing this. So we've got Maple Mallards and Straw Hats. And I haven't seen the alerts. They're still working away. I think they're still working away as well. So my bet is I really wasn't trying to troll everyone. It's kind of interesting. I've used Z3 for one time, and it was for a MapleStory hacking thing. It's a long story. It's a long MapleStory, maybe? Gosh. Sorry. And I've already had it drilled into me to make sure that I'm doing the right div operator. And I've used it once. So you would think that people who have done this a lot would probably immediately be going to that. Now, maybe it's because they saw int64 and IDA or something, and they're just taking that. Immediately jump from there. Yeah, that's entirely possible. Yeah, that's really tricky. Is it all of the functions are unsigned, or is it just one of them is unsigned? Because if you did that, that's just rude. So the values themselves are all unsigned values. And in source, you don't differentiate. You just div, multiply, whatever. And it just happens to be if you have unsigned values, it's going to be an unsigned div. But again, in decompilation, you just see division, multiplication, and subtraction. Does Binja differentiate those? Binja does actually show you in high-level IL. It does U slash or whatever? It can do U, yeah. So Binja will actually tell you if it knows the operation signedness of your comparison or whatever it is, which is not valid C. It's one of our arguments about why ILs are better than just pseudo C or C output, because you can actually do hinting as to what type of thing it is. To me, that's mandatory. Whenever I have printed out any of my ILs, it's always on all of the operations that are signed or unsigned. It is explicit. S or U. It's just so important. It's the difference of having a no day and not. Or in this case, spending an extra 15, 20 minutes getting your solver to work. Okay, actually, let's go back. We've got... I'm seeing in HypeBoy, we now... Oh, is that it? They've got a V4. Hold on, hold on. They're running it. They've got a value. Okay, yeah, yeah, they've got a value. They're running it. Oh, no. Now, let's see. Are they checking the input? Does it check? Are they doing the inversion thing? Well, they're putting it... What format is the input? Is it hexadecimal or is it... It was LLU, so it should be an unsigned 64-bit int. That actually tricked someone up yesterday. For about 20 or 25 minutes... Oh, no. ...one of the teams, I think, didn't know that it was hex. Yeah, yeah, yeah. And... I don't see... They haven't checked the... Okay, so then copy-paste errors. Okay, now, are they going to check that scan out? Please go check... Yes, no, no, no. Go check the scan out. Go look for that input. It was LLU. I do remember that. Okay, so... That was, like, the very first thing that I picked out. You didn't notice this one was LLU. I should remember, but I wrote this two weeks ago, so, like, I don't even remember my own... Yeah, that was, like, the first thing... I actually switched it back and forth. A couple times, I was doing hexadecimal. A couple times, I was doing... Yeah. ...doing integer values. CPyNamespace. Okay. So, they should have... Oh, fantastic. Okay, so I just got a little introduction. Was that a love letter? It was. They're telling me how much... No, they're telling me that Straw Hat won. So, Straw Hat has beaten Maple Mallard... Okay. ...in our uncasted one. So, if you were watching that stream, and you've joined us now, you may have already seen the end of it. Wow. Straw Hat won their version, and they, again, got a different number than the expected solution, but I'm not at all surprised. Z3UDIV. Okay. He finally popped it up. Oh, and UDIV is not defined. We are seeing it on both of them. Yep. We're seeing... Okay, so both have the hints. Yeah. This should be it. Honestly? So, at this point, it's a race to see... I... ...who can fix their implementation. I'm putting my money on Macaroni, because if they go back to chat GPT to do that transform, to do the UDIV, they're going to get the result very fast. There's always complications, though. Watch. They're just doing a... Manual. ...event macro, and they're doing it, and they're almost done. It's kind of interesting that we've... Uh-oh, uh-oh. We've got a... Oh, here it is. Here it is. Hypoidoh. Hypoidoh is coming through. They've got a value. They've got a value. It shows correct. And now they just have to... Get it in there. Submitter 12. They've got it. I think they've got it. Here it is. And that's going to be... That is it. That is it. Congratulations. Oh, no. And we just had one so close. Macaroni was just behind it. That hit was exactly... Yeah. ...all they needed. Wow. That was so close. We thought that might do it, sure enough. It was kind of crazy that Macaroni did the manual copy-pasting from IDA initially, but also used the most automated chat GPT approach. Chat GPT. So it was just two complete... Ends of the spectrum. Yeah. Yeah, yeah, yeah. We saw both. But that was... Oh. Yeah, and it was exactly the hit. It was the UDIF. They just needed the UDIF. No way. They both got it within just seconds of each other. Wow. It is interesting, though, to note that I think, as we saw, Straw Hat actually won theirs. Before, I think that hit may have come out. That hit just came out. Yeah. They all fixed it and were able to solve it. But I'm going to go back and watch the VOD now and see what Straw Hat did. Right. Because I think their solution may not even have been exactly the same. Honestly, I think, in my head, one of the approaches that maybe would have come up to me is just randomly try both signed and unsigned. Like, make a generic function. Right. Because how many divs were there? Five? What is that? Two to the five different combos and just try all possible combos. And you know it's at least the same one for each of your divisions, right? Right. So you don't have to, like, do it. You can just do it five times, essentially, which makes it a lot easier. Yeah. So, ah, that was fantastic. All right. Well, I'm excited because we haven't had to use another sudden death, which is always good. Yeah. We had a good round. Everyone, we've got two victors. Congratulations to Hypeboy and to Straw Hat for their wins. But, honestly, Macaroni and PPP that lost, they're playing into the lower bracket now. They can still be back in the finals. For sure. Yeah, absolutely. Now, I don't want to put you on the spot, but who do we have coming up next? Ah, let me pull up that. I've got the chart right here. So, actually, we can, I think we could, well, I won't do the bracket on stream. Next up, we're going to do a couple more from the lower bracket, actually. Okay. So, I think we're going to pull in, the next two are going to be, actually, the two from this that lost are going to be right back around. So, they're going to be coming in for Macaroni versus Shellfish. Okay. And Maple Mallard versus Norse Code. All right. So, again, even those lower bracket matches are going to be fierce and great competitors. Perfect. Sounds good. Awesome. Look forward to it. Thanks, everybody, for joining us. We'll see you just in about 15 minutes as we reset, get the new teams in here, and we'll be back. Cheers. Take care. ♪♪♪