easycrack

9KB
Open

first let's run the binary

so we can see that this binary asking for which is the flag let's open the file using ghidra

we have one function called main

  1. first thing a user is prompted to enter a key

  2. The program calculates the sum of ASCII values of characters in the entered key

  3. It checks if the sum is equal to 0x539 (1337) and if the length of the key is 0xc (12).

  4. If the conditions are met, it prints "Nice key :)" along with the entered key; otherwise, it prints "Bad Key :(" with the entered key.

so we know that the flag starts with flag{ and ends with } so we know 6 characters from the key we need to find the other 6 characters by bruteforcing them and checking if the sum is equal to 1337

we know from the previous found flags the flag is always constructed using lowercase characters and numbers and _

Exploit :

executing the script and waiting for a couple of minutes we get the correct key

Flag :

Last updated

Was this helpful?