Challenge

A binary that appears to do nothing useful. No obvious strings in the binary.

Approach

  1. Open in Ghidra. The main function builds a string byte-by-byte on the stack (classic stack-string obfuscation).
  2. Extract the stack-pushed bytes manually or with a script to reconstruct the key string.
  3. A second buffer is XOR-ed against that key to produce the flag.
  4. Recover both buffers and XOR them:
1
2
3
4
key  = b"S3cr3tK3y!"
data = bytes([0x3a, 0x27, 0x56, ...])  # from binary
flag = bytes(a ^ b for a, b in zip(data, (key * 99)[:len(data)]))
print(flag.decode())

Flag

boroCTF{I_H8_M@7ing_StR1ng5_cHals}