← Back to Writeups
HTBN/AReversing

Impossible Password

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

Impossible Password

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

Description

Are you able to cheat me and get the flag?

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.

  2. Now, check the file type.

  3. Now we know it's a binary file and stripped, means we can't see the function's name. Since it's a binary file, let us make it executeable by run chmod, then run the file.

  4. Hmm.. let us decompile the file using ghidra.

  5. Find a clue here.

  6. The program will compare our input with the local_10 value.

  7. Then the program will prompt us an input again, and it will compare our input with __s2 value.

  8. Let us analyze this function.

  9. However, better than wasting time analyze the stripped code, in reverse engineering we may patch the binary instruction.

  10. Let us patch this one.

  11. Patch the intruction pointer from JNZ (Jump If Not Zero) to NOP (No Operation).

  12. Export the file to a binary format.

  13. Make it executable first, then run the program again.

NOTES: Since we changed the instruction pointer to NOP, we can enter any character without any validation to get the flag.

  1. 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.