← Back to Writeups
HTBN/AReversing

Rebuilding

XESXOR8/23/20261 min read
#reversing#htb#n/a

Rebuilding

Platform: HackTheBox | Category: Reversing | Difficulty: N/A | Author: D3v0o0Nu11 | Date: 2026-02-10

Description

You arrive on a barren planet, searching for the hideout of a scientist involved in the Longhir resistance movement. You touch down at the mouth of a vast cavern, your sensors picking up strange noises far below. All around you, ancient machinery whirrs and spins as strange sigils appear and change on the walls. You can tell that this machine has been running since long before you arrived, and will continue long after you're gone. Can you hope to understand its workings?

Solution Approach

Core idea: Identify the weakness from source review or fingerprinting first. Iterate with incremental payloads instead of guessing.

Steps

  1. First, unzip the .zip file given, then jump to the extracted directory.

  2. Since it's a binary file let us decompile it.

  3. When analyzing the main() function, this operations caught my attention.

  4. Let us check the encrypted values.

  5. Looks like a hexadecimal values. Notice the hex is XORed with a key named -> humans.

  6. But i found another key at the _INIT_1() function named aliens.

  7. I'm guessing aliens is the correct key. let us copy the hex values and XORed it with aliens at cyberchef

  8. Got the flag!

Flag

REDACTED

Lessons Learned

  1. Identify the weakness from source review or fingerprinting first.
  2. Iterate with incremental payloads instead of guessing.
  3. Reuse the same pattern in future engagements.