Category: Rev
Points: 40
Description: Now I like dollars, I like diamonds, I like ints, I like strings. Make Cardi like it please.

So I went overkill on this challenge because I WANTED TO 🙂 HEE. Basically running the binary asks the question:

I like the string that I'm thinking of

Running strings on the binary you can see there is a weird string “okrrrrrrr”

Entering that gives us the next prompt:

I like two integers that I'm thinking of (space separated)

So at this point I was like, I wanna use ghidra. So I popped the binary into ghidra decompiled the main function and found the bit it was looking for



  puts("I like two integers that I\'m thinking of (space separated): ");
  fgets(local_38,0xc,stdin);
  __isoc99_sscanf(local_38,"%d %d",&local_40,&local_3c);
  if (((local_3c + local_40 == 0x88) && (local_3c * local_40 == 0xec7)) &&
     ((int)local_40 < (int)local_3c)) {
    puts("I said I like it like that!");
    printf("Flag: actf{%s_%d_%d}\n",acStack41 + 1,(ulong)local_40,(ulong)local_3c);
    if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
      __stack_chk_fail();
    }
    return 0;
  }

All that stuff says gimme two ints that satisfy these conditions:

x + y = 136
x * y = 3783

Bringing back that highschool maths and solving this quadratic equation gives us these two ints:
97 and 39

The final check of the function is that you enter them in accending order.
So putting in

39 97

FLAG:
actf{okrrrrrrr_39_97}

Retrieves the flag

Leave a Reply

Your email address will not be published. Required fields are marked *