batcave-bitflips
umasscybersec
Task: a not-stripped ELF64 license checker was intentionally damaged by bit flips, leaving several obviously broken arithmetic and crypto-looking routines. Solution: ignore the noisy verifier, recover the plaintext directly by XORing the stored FLAG and EXPECTED blobs from .data, and use the embedded NUL to explain the printed flag boundary.
$ ls tags/ techniques/
batcave-bitflips — UMass Cybersecurity CTF
Description
Organizer description was not preserved in the local task files.
English summary: the challenge provided a corrupted ELF64 license checker with enough symbols left intact to inspect its globals and helper routines. The intended verification path was damaged, but the plaintext flag could still be recovered directly from the data section.
Analysis
The binary was not stripped, which immediately exposed useful globals: LICENSE_KEY, EXPECTED, FLAG, and SBOX, plus functions such as rotate, decrypt_flag, hash, and verify. Several instructions looked wrong in a way that strongly suggested bit-flip corruption rather than ordinary obfuscation.
The most suspicious examples were:
rotateused(b * 8) | (b >> 6)instead of a normal 3-bit rotate-left like(b << 3) | (b >> 5).decrypt_flagused bitwise OR where XOR made much more sense for symmetric recovery.hashiterated for0xBEEEEErounds, which looked deliberately corrupted or at least untrustworthy.
At that point, fully repairing the verification path was unnecessary. The key observation was that both EXPECTED and FLAG were stored in .data, and XORing them immediately produced readable output:
UMASS{__p4tche5_0n_p4tche$__#}\x00\xee
The embedded NUL explains why the program would print only UMASS{__p4tche5_0n_p4tche$__#} with %s. The remaining byte 0xee is just trailing garbage after the string terminator. The embedded LICENSE_KEY string !_batman-robin-alfred_((67||67)) is likely the intended thematic license value, but recovering the flag did not require repairing the broken hash pipeline enough to validate it cleanly.
Solution
...
Permission denied (requires auth)
Sign in to read this free writeup
This writeup is free — just sign in with GitHub to read it.
$ssh [email protected]