Free Flag

Category
Reverse Engineering
Points
-1
Solves
-1
Tags

Mr. Shock is feeling generous today, so here’s an attached program that will give you the flag. Just in case you don’t know who this generous person is.

by Lurifos


Just a regular binary that is packed using UPX, just unpack it again using UPX, then we get the unpacked binary, just look for the main function, submit the code to ChatGPT and solve it straight away.

import struct

raw_bytes = [
    0x46, 0x49, 0x00, 0x00, 0xF9, 0xCF, 0x00, 0x00, 0xF5, 0xA4, 0x01, 0x00, 0x5D, 0x68, 0x01, 0x00, 
    0xCB, 0x30, 0x04, 0x00, 0xA4, 0xA8, 0x04, 0x00, 0x96, 0xD8, 0x04, 0x00, 0x39, 0xD3, 0x02, 0x00, 
    0x41, 0xEB, 0x06, 0x00, 0x3B, 0x2E, 0x08, 0x00, 0x05, 0xCF, 0x07, 0x00, 0x89, 0xFE, 0x0A, 0x00, 
    0x22, 0x01, 0x0A, 0x00, 0x61, 0x66, 0x05, 0x00, 0x8D, 0xC8, 0x0A, 0x00, 0x81, 0x5D, 0x0D, 0x00, 
    0x51, 0xF2, 0x0D, 0x00, 0xF9, 0xF8, 0x0D, 0x00, 0x9F, 0xCB, 0x0D, 0x00, 0x79, 0x5E, 0x07, 0x00, 
    0xA8, 0xDF, 0x08, 0x00, 0xE7, 0x43, 0x08, 0x00, 0x9D, 0xBB, 0x10, 0x00, 0x71, 0x77, 0x16, 0x00, 
    0x30, 0x17, 0x15, 0x00, 0xED, 0x07, 0x0B, 0x00, 0xF0, 0xD8, 0x17, 0x00, 0xEA, 0x7E, 0x14, 0x00, 
    0x5B, 0x6D, 0x19, 0x00, 0xE5, 0xD6, 0x0B, 0x00, 0x4E, 0x7C, 0x0C, 0x00, 0x8D, 0x95, 0x0D, 0x00, 
    0x1F, 0x0A, 0x1D, 0x00, 0x00, 0x44, 0xB8, 0x0D, 0x00, 0xB1, 0x3D, 0x1D, 0x00, 0x00, 0x00, 0x00
]

dword_402360 = [struct.unpack('<I', bytes(raw_bytes[i:i+4]))[0] for i in range(0, len(raw_bytes), 4)]

flag = []
for i in range(0, 70, 2):
    v9 = dword_402360[i // 2]
    value = v9 // (i + 1)       # Reverse the multiplication
    v11 = (value >> 8) & 0xFF   # Extract high byte
    v12 = value & 0xFF          # Extract low byte
    flag.append(chr(v11))
    flag.append(chr(v12))

# Join the flag characters
print("Flag:", ''.join(flag))

We will get IFEST13{w3ll_n07h1n9_1z_fr33_1n_l1f3_s0_7h15_1z_n07_s0_fr33_4f73r_l} but since it seems like the last word of the flag is missing I tried using binary verification so I got IFEST13{w3ll_n07h1n9_1z_fr33_1n_l1f3_s0_7h15_1z_n07_s0_fr33_4f73r_4ll}.

Free Flag Flag: IFEST13{w3ll_n07h1n9_1z_fr33_1n_l1f3_s0_7h15_1z_n07_s0_fr33_4f73r_4ll}