I cba opening the binary in ghidra now so for anybody who's interested, this is how it works; there's a buffer overflow in the password variable, which allows 50 bytes to be written to a 32 byte buffer. Players are required to enter the correct password at the beginning of the input, but by appending additional characters, they can overwrite the admin flag with something other than zero.
int main(void)
{
char password[32];
int admin = 0;
printf("Enter password: ");
fgets(password,50,stdin);
if(strncmp(password, "SuPeRsEcUrEPaSsWoRd123", strlen("SuPeRsEcUrEPaSsWoRd123")) == 0)
{
printf("Correct Password!\n");
}
else
{
printf("Incorrect Password!\n");
return 0;
}
if(admin)
{
printf("INTIGRITI{b4bypwn_9cdfb439c7876e703e307864c9167a15}\n");
}else{
printf("Are you sure you are admin? o.O\n");
}
return 0;
}