Easy Encrypt

Reverse Engineering · BearcatCTF 2025 · Sean

Problem

Description

Ghidra analysis

Main function

Solution

1. Encrypted Flag (local_168, local_160, local_158, local_150):

The program gives you the encrypted flag in hexadecimal form. The following values represent the encrypted flag:

These values represent the flag in little-endian format (which means the least significant byte comes first). When you break them down into bytes:

  • 0x7f04487763707073 becomes:

  • 0x7f04487763707073 becomes:

So on

2. XOR Key (local_16c):

The XOR key used for encryption is stored in local_16c. In the program, this is set to 0x37333331, which is "1337" in ASCII. Each character in "1337" corresponds to a byte:

  • 0x31 (ASCII '1')

  • 0x33 (ASCII '3')

  • 0x33 (ASCII '3')

  • 0x37 (ASCII '7')

3. XOR Decryption:

Given these values, you can now decrypt the flag using the XOR key "1337". The XOR operation reverses the encryption process. For each byte of the encrypted flag, you XOR it with the corresponding byte from the key (cycling through the key if necessary)

Flag: BCCTF{7H47_w4snt_s0_H4rD}

Last updated