Gamer Redux

Posted on Tue 02 May 2023 in ctf

This is a writeup of the Gamer Redux challenge which was part of the misc category during TAMUctf.

83258c5546508251f4d2cd253693b0f8.png

The attached file contained a long command that started with summon falling_block ~ ~.5 ~ {Time:1,BlockState:{Name:redstone_block and so on. This sound like a Minecraft command which is supported by a quick Google search.

Minecraft Java Edition supportes Functions which are commands that are stored in a file with extension .mcfunction. sus.txt is such a function file.

To continue from there one first has to install Minecraft. The demo version was enough for this challenge.

After that we can create a demo world and then activate cheats by doing the following: 1. Open To LAN 2. Allow Cheats 3. Start LAN world

After that we can run commands like /time set noon and so forth.

The following tutorial explains how to setup functions which we follow step by step.

If we now run the script ingame with /function test:sus a canvas consisting of white wool is generated around us and black wool spawns in a perimeter of 5 blocks that seem to form a QR code. After that we black wool blocks are replaced by white wool.

This is probably done with the following line in the script:

{id:command_block_minecart,Command:'setblock ~ ~-5 ~-1 repeating_command_block{Command:"execute at @a at @e[type=armor_stand,distance=6..50] run setblock ~ ~ ~ white_wool",auto:1}'}

So we update the distance and see what that does:

{id:command_block_minecart,Command:'setblock ~ ~-50 ~-1 repeating_command_block{Command:"execute at @a at @e[type=armor_stand,distance=100..500] run setblock ~ ~ ~ white_wool",auto:1}'}

Now we can do the following: 1. Create a white canvas with /fill ~ ~ ~ ~100 ~100 ~100 minecraft:white_wool 2. Enable fly with /gamemode create and fly over the canvas 3. Call the function with /function test:sus 4. Set the time with /time set noon to have the best brightness 5. Take a screenshot

2023-04-30_11.14.38.png

Use an online QR code reader we can extract the flag: gigem{cr33p3r_4w_m4444n}

e5699968f1b072a191f0017f05785344.png