Tear Or Dear
Tear Or Dear
Platform: HackTheBox | Category: Reversing | Difficulty: N/A | Author: D3v0o0Nu11 | Date: 2026-02-10
Description
Find the username and password and put them in the flag in the format: REDACTED Warning: It can produce false positives.
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. -
Since it's a PE file, let us decompile the PE using dnSpy. But before that let us run it on windows.
-
Yep, let us decompile it.
-
Let us check the
main()function. -
Now check the
LoginForm()function. -
Hmm.. let us check the button1_Click
-
Seems the line 11 shall be our interest, so let us set a breakpoint at that line, then run the program.
RESULT (Enter both username and password as ADMIN)
-
Because we want to see the
this.so let us check that and search for username. -
Found it! Now let us run it again but this time enter the pass as
test. -
Hmm.. Our password input is saved as the username.
-
Now
add watchto that variable to see what will the program do with the variable as the it running. -
Now search for
o, since the username is compared too. -
Let us watch that as well, not forget to watch the
stoo. -
Set the breakpoint at
check1function at line 528. -
Now run the program again. Then modify the value of our username (which is the pass) as the leaked pass we got.
PRESS CONTINUE
PRESS STEP OVER
-
Got s2, add that to watch,then do the same thing with the
check2()function. -
The s3 gave us the same value, confused here. let us check the
check4(). -
It still gave us the same value, how about the last check.
-
Add to watch for
.aavalue. -
Well actually i'm stucked here for a while and tried to input the password as
roiw!@#and the username asroiwit says wrong but when i entered the username aspiphand pass asroiw!@#. It says correct! -
Hence we 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.