Impossible Password
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
-
First, unzip the
.zipfile given. -
Now, check the file type.
-
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.
-
Hmm.. let us decompile the file using ghidra.
-
Find a clue here.
-
The program will compare our input with the
local_10value. -
Then the program will prompt us an input again, and it will compare our input with
__s2value. -
Let us analyze this function.
-
However, better than wasting time analyze the stripped code, in reverse engineering we may patch the binary instruction.
-
Let us patch this one.
-
Patch the intruction pointer from
JNZ(Jump If Not Zero) toNOP(No Operation). -
Export the file to a binary format.
-
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.
- Got the flag!
Flag
REDACTED
Lessons Learned
- Identify the weakness from source review or fingerprinting first.
- Iterate with incremental payloads instead of guessing.
- Reuse the same pattern in future engagements.