EOF{not_a_foolish_person_ig}file fooled.bin
# ELF 64-bit LSB pie executable, x86-64
The binary contains several key functions:
printFlag() - Contains 32 encrypted bytescheck() - Validates three input parametersbinToDec() - Converts binary strings to decimalFrom disassembly, the check function requires:
binToDec(arg1) + binToDec(arg2) + binToDec(arg3) = 218 (0xda)
binToDec(arg3) = 70 (ASCII 'F')
Therefore: binToDec(arg1) + binToDec(arg2) = 148
The flag is encrypted using:
sum_value = ((string[0] >> 1) << 1) + 1 + ((string[1] >> 1) << 1)
// First 16 bytes: encrypted_byte = original_byte + sum_value
// Last 16 bytes: encrypted_byte = original_byte - string[0]
💡 Using the hint (ASCII 'E' = 69):
Binary inputs needed:
10010011 → 1471 → 11000110 → 70encrypted_bytes = [
0x1d, 0x28, 0xf4, 0xeb, 0x13, 0xed, 0x01, 0x21,
0x15, 0x28, 0xf4, 0x31, 0x1d, 0xfc, 0xf8, 0xf8,
0x82, 0x67, 0x5a, 0x98, 0x7b, 0x79, 0x6b, 0x9b,
0x83, 0x53, 0x56, 0x87, 0x82, 0x78, 0x84, 0x5e
]
def sum_func(s):
c0, c1 = ord(s[0]), ord(s[1])
return ((c0 // 2) * 2) + 1 + ((c1 // 2) * 2)
s = "EOF"
sum_val = sum_func(s) # = 147
# Decrypt first 16 bytes
first_half = ''.join(chr((encrypted_bytes[i] - sum_val) & 0xff) for i in range(16))
# Decrypt last 16 bytes
second_half = ''.join(chr((encrypted_bytes[i] + ord(s[0])) & 0xff) for i in range(16, 32))
# Decode base64 parts
flag = base64_decode(first_half) + base64_decode(second_half)
./fooled.bin
The decrypted bytes yield base64-encoded strings:
🎉 Final Flag: EOF{not_a_foolish_person_ig}
If you solved this, you're definitely not a foolish person! 🏆
binToDec() functionfile, strings, hexdump, objdump - Binary analysisThis 600-point challenge combined:
Only 1 team solved this during the competition!