beep
Binary Exploitation / Pwn
My blog has migrated to https://wintertia.pages.dev/ ! This Gitbook will no longer be maintained.
Kenneth verkar ha problem med kommunikationen till andra system han tagit över. Harriet har nämligen hittat något slags litet testprogram vars syfte verkar vara att testa att en anslutning fungerar.
Testprogrammet verkar vara ganska minimalt, men även små program kan innehålla buggar...
Anslut till
undutmaning-beep.chals.io:443och testa anslutningen du också.
A simple integer variable overwrite challenge, looking into the Ghidra disassembly, the code looked like this:
undefined8 main(void)
{
undefined local_78 [108];
int local_c;
setup();
printf("* beeeeeeeeeeeeeeeeeeeeeeeeeeep *\n> ");
read(0,local_78,0x108);
if (local_c == 0x539) {
system("cat flag");
}
return 0;
}Simple goal, I had to overwrite the compared variable with 0x539, and guess what it translates to 1337.


Pretty much, the solution required me to find the offset to the comparison instruction using cyclic offsets, so here was the final solver script:
Here is an example of the challenge being solved locally (ignore it saying picoCTF that's just my template fake flag☺️):

Last updated