> For the complete documentation index, see [llms.txt](https://kos0ng.gitbook.io/ctfs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kos0ng.gitbook.io/ctfs/write-up/2023/flare-on-10/challenge-1-x.md).

# Challenge #1 - X

### Description

Welcome to the 10th Annual Flare-On Challenge!

Statistically, you probably won’t finish every challenge. Every journey toward excellence starts somewhere though, and yours starts here. Maybe it ends here too.

This package contains many files and, I can’t believe i’m saying this, click the one with the “.exe” file extension to launch the program. Maybe focus your “reverse engineering” efforts on that one too.

### Solution

Since the pin only 2 digits, i bruteforce it manually.

<figure><img src="/files/0mQIODxVUGjYab1JvozH" alt=""><figcaption></figcaption></figure>

Another solution is by decompiling the program using dnspy. At the time of competition  i used old version of [dnspy](https://github.com/dnSpy/dnSpy) which didn't produce the actual code. But after competition i notice that there is a new version of [dnspy](https://github.com/dnSpyEx/dnSpy) that maintained by another user. Download the latest version from the repository and then decompile the X.dll.

<figure><img src="/files/fKq4OlbvjgGdpZkIyc7V" alt=""><figcaption><p>old version of dnspy</p></figcaption></figure>

<figure><img src="/files/dHMV9H138jmLQK4q45Fj" alt=""><figcaption><p>new version of dnspy</p></figcaption></figure>

By executing the program we know that the flag will be shown if we input valid 2 digits and click the "lock" button. Based on the function structure name, the function lockButton\_Click will be the called function when we click the "lock" button. So by looking at decompiler result we can get the flag directly in plaintext.

Flag : <glorified_captcha@flare-on.com>
