We start by downloading the source files.
We are given a binary
It looks like the binary does some calculations and then tries to open a file with that calculated name:
{
undefined8 local_28;
undefined7 local_20;
undefined uStack_19;
undefined7 uStack_18;
int local_10;
uint local_c;
local_28 = 0x540345434c75637f;
local_20 = 0x45f4368505906;
uStack_19 = 0x68;
uStack_18 = 0x374a025b5b0354;
for (local_c = 0; local_c < 0x17; local_c = local_c + 1) {
*(byte *)((long)&local_28 + (long)(int)local_c) =
*(byte *)((long)&local_28 + (long)(int)local_c) ^ 0x37;
}
local_10 = open((char *)&local_28,0);
if (local_10 < 1) {
puts("[X] Error: Box Not Found");
}
else {
puts("[*] Box Opened Successfully");
close(local_10);
}
return 0;
}
We can run the binary with
Looking at the registers we can find the flag: