Home CallBack
Post
Cancel

CallBack

In the depths of “Callback,” an enigmatic 32-bit MZ file, we embarked armed with Pestudio’s guidance. Strings and imports held no immediate revelations. The enigma remained, shrouded in mystery, urging us to delve deeper. With determination, we pressed on, knowing that every step brought us closer to the heart of the puzzle. The tale of “Callback” would not remain untold for long.

img_1

With the binary in motion, a MessageBox emerges, delivering the ominous verdict: “Wrong Password.” It’s a clear indication that the program is soliciting a password, only to promptly dismiss our initial offering. Somewhere within, a comparison is taking place, and the password’s true form lies in wait, concealed from our view. Our next step is clear: to uncover the method behind this cryptographic curtain.

img_1

Back at square one, we find ourselves facing a dynamic MessageBox construction, evading our initial attempts to unravel its secrets. Yet, hope persists.

Taking a step back, we turn our gaze towards “WinMain”, a beacon identified by the astute eyes of IDA. Within its confines may lie the key to our enigma. Like a skilled locksmith, we’ll dissect its inner workings, searching for the threads that tie it to the elusive password check.

Though the binary may be compact, its complexity is no less daunting. Armed with determination and a keen eye, we embark on this journey once more, knowing that each line of code is a potential clue leading us closer to the heart of the puzzle. The trail may be obscured, but with every step, we edge closer to revealing the truth hidden within the binary’s cryptic embrace.

img_1

In the dim glow of our code, a fragment emerges, revealing a check for the presence of arguments. Like a sentry at the gate, it stands vigilant, ensuring no entry goes unnoticed. This snippet hints at a deeper purpose, a mechanism waiting to be unveiled. Our task now is to decipher its role in the grand scheme of our enigma.

1
2
3
  if ( *_p___argc() >= 2 && !byte_655439 && !byte_655438 )

With precision, you’ve identified the pivotal moment when the program decides its course of action. When an argument is absent, it weaves a message to present, showcasing its resourcefulness.

Now, as our gaze shifts to the code where arguments are expected, we observe a comparison in progress, each byte meticulously scrutinized against the enigmatic “Arglist.” The strings remain elusive in our static analysis, prompting a choice: do we delve into the intricacies of the function, dissecting the algorithm to unearth the hidden message, or do we employ a more cunning approach?

Opting for the latter, we allow the program itself to unfurl the string before us, illuminated in the incisive light of a debugger. This method promises not only efficiency but a real-time glimpse into the construction of the elusive phrase. Armed with this insight, we edge ever closer to unraveling the final layers of our enigma.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
sub_6515CD(v4, v4, ArgList);
    LOBYTE(v12) = 0;
    v5 = 0;
    while ( (unsigned __int8)ArgList[v5] == (*_p___argv())[1][v5] )
    {
      if ( ++v5 > 16 )
      {
        v6 = (char *)sub_65198C();
        if ( v6[24] )
        {
          sub_65164F(24, 0, 13, -268435456);
          v6[24] = 0;
        }
        sub_651BE2(Text, v6, (char)ArgList);
        flag_______ = sub_651A1C();
        if ( *(_BYTE *)(flag_______ + 9) )
        {
          sub_65164F(9, 0, -1431655763, -554766610);
          *(_BYTE *)(flag_______ + 9) = 0;
        }
        MessageBoxA(0, Text, (LPCSTR)flag_______, 0);
        return 0;
      }
    }

Armed with the knowledge that the third argument is a pointer to a string array, we set our sights on IDA. With calculated precision, we pinpoint the crucial offset and embed a breakpoint, a sentinel in the code’s flow.

As the program marches forward, we track the changes in the array pointer with a watchful eye. Each shift in value is a breadcrumb, leading us closer to the elusive message. With each iteration, we gather more pieces of the puzzle, steadily illuminating the path forward. The debugger becomes our trusted companion, revealing the intricate dance between code and data, and guiding us towards the heart of the enigma.

img_1

Armed with the knowledge of the elusive string, “f1nding_th3_k3ys”, we approach the moment of truth. With unwavering determination, we present this ciphered key as our offering.

As the code commences its evaluation, each character is inspected, scrutinized for a match. The dance between our input and the hidden message unfolds, a symphony of bytes and bits. In this decisive moment, the digital realm holds its breath.

And then, a revelation. The strings converge in harmony, the verdict rendered. It is a triumph, a testament to our persistence and cunning. The gates of the enigma begin to creak open, revealing the treasures within. With the key in hand, we stand on the threshold of victory, poised to unravel the final layers of this cryptographic tapestry.

img_1

With the correct password in hand, we stand at the brink of triumph. As we feed it to the program, the final pieces of the puzzle fall into place. Like a lock yielding to the perfect key, the enigma relents, revealing its most coveted secret.

And there it is, in bold digital proclamation: “Turnout The key is the Flag.” The answer, once hidden in the depths of the code, now stands before us, a testament to our perseverance and ingenuity.

With the flag in hand, we emerge from this digital labyrinth, victorious. The enigma, once impenetrable, has yielded its treasure. This journey through the realms of reversing has not only honed our skills but reaffirmed the boundless potential of the digital frontier. Armed with knowledge and resolve, we turn our gaze to the next challenge, ready to conquer whatever enigma lies in wait.

img_1

All The Required Files

This post is licensed under CC BY 4.0 by the author.