# The Game

### **Introduction**

The Game is a reverse-engineering / binary analysis challenge. The premise: a cipher hid critical secrets inside a Tetris binary. The goal is to analyze the supplied binary, extract the embedded data, and decode it to reveal the flag or secret.

### **Files in the downloaded ZIP**

```plaintext
$ unzip Tetris____.zip (the file name may vary for different users)
```

![](https://cdn.hashnode.com/uploads/covers/69db5905aadf1107e2abceb9/e640f825-e5eb-405e-b755-245bdface555.png align="left")

As you can see in the image provided above we have Tetrix.exe to examine for the hidden flag.

### **Recon: basic file checks**

Before deep analysis, run basic checks so you know the type and permissions of the binary.

```plaintext
- Check file type
    $ file Tetrix.exe
- Check file permissions
    $ ls -l Tetrix.exe
```

### **About the** `strings` **tool**

`strings` extracts sequences of printable characters from binary files. It's handy in reverse-engineering because flags, URLs, error messages and other plaintext artifacts are often embedded in executables or resources. Typical behavior and useful options:

*   default extracts ASCII printable runs (commonly minimum length 4).
    
*   `-n N` (or `--bytes=N`) sets the minimum match length to N (useful to avoid short noisy fragments).
    
*   `-a` scans the entire file.
    
*   `-t` prints offsets (useful to locate the string in the binary). `strings` is part of GNU binutils and available on most Linux systems. For Unicode/UTF-16 data or exotic encodings, combine `strings` with other tools (or try different `strings` flags / a disassembler) to ensure you catch non-ASCII payloads.
    

### **Immediate solution**

Run:

```bash
strings -n 6 Tetris.exe | grep -i "thm{"
```

Explanation:

*   `strings -n 6` only shows printable runs of length ≥ 6 (reduces noise and surfaces longer tokens like flags).
    
*   `grep -i "thm{"` filters case-insensitively for the flag prefix `thm{}`. The matching line printed by this pipeline should contain the flag.
    

![Solution for the flag (The Game)](https://cdn.hashnode.com/uploads/covers/69db5905aadf1107e2abceb9/944e0c84-fa97-4c46-9a78-78840d62ba0c.png align="center")
