← Back to Writeups
HTBEasyReversing

Tear Or Dear

D3v0o0Nu119/2/20262 min read
#reversing#htb#easy

Tear Or Dear

Platform: HackTheBox | Category: Reversing | Difficulty: Easy | 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

  1. First, unzip the .zip file given.

  2. Since it's a PE file, let's decompile the PE using dnSpy. But before that let's run it on windows.

  3. Yep, let's decompile it.

  4. Let's check the main() function.

  5. Now check the LoginForm() function.

  6. Hmm.. Let's check the button1_Click

  7. Seems the line 11 shall be our interest, so let's set a breakpoint at that line, then run the program.

RESULT (Enter both username and password as ADMIN)

  1. Because we want to see the this. so let's check that and search for username.

  2. Found it! Now let's run it again but this time enter the pass as test.

  3. Hmm.. Our password input is saved as the username.

  4. Now add watch to that variable to see what will the program do with the variable as the it running.

  5. Now search for o, since the username is compared to o.

  6. Let's watch that as well, not forget to watch the s too.

  7. Set the breakpoint at check1 function at line 528.

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

  1. Got s2, add that to watch,then do the same thing with the check2() function.

  2. The s3 gave us the same value, confused here. Let's check the check4().

  3. It still gave us the same value, how about the last check.

  4. Add to watch for .aa value.

  5. Well actually i'm stucked here for a while and tried to input the password as roiw!@# and the username as roiw it says wrong but when i entered the username as piph and pass as roiw!@#. It says correct!

  6. Hence we 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.