top of page

Game Hacking Walkthrough: CubeMadness1 room on Hack The Box

  • Hacking By Doing
  • Aug 19, 2024
  • 2 min read

This time, I decided to dive into a game hacking challenge on Hack The Box, specifically the CubeMadness1 room.


ree

Initial Setup

The first step is to download the game provided in the challenge. After unpacking the archive, we obtain the game's executable file (CubeMadness1.exe). Let's launch the game and explore its mechanics.


ree

Game Analysis

Upon launching, the game presents a straightforward objective: control a white dot and collect 20 cubes to capture the flag. However, a quick inspection reveals that there are only six cubes available in the game, making it impossible to achieve the goal under normal circumstances.


Given this limitation, the only feasible approach to complete the challenge is to reverse engineer the game. The aim is to locate and modify the variable that tracks the cube count, increasing it to 20. For this, we'll use Cheat Engine, a powerful tool for memory scanning and modification.


ree

Memory Analysis with Cheat Engine


  1. Loading the Game in Cheat Engine:

    • Begin by launching Cheat Engine and attaching it to the CubeMadness1.exe process. This will allow us to scan the game's memory and locate the relevant variables.


2. Initial Memory Scan:

  • Since we've collected 1 cube so far, we'll initiate a memory scan for the value 1. This search yields over 444,000 results, far too many to be useful.


ree

3. Narrowing Down the Results:

  • To refine our search, we collect another cube, bringing the total to 2. We then perform a next scan for the value 2. This significantly reduces the results to around 2,000 addresses.


ree

4. Isolating the Relevant Memory Address:

  • By repeating the process of collecting cubes and performing subsequent scans, we further narrow down the list of memory addresses. Eventually, we are left with just a few possible candidates.


ree

5. Modifying the Memory Value:

  • With the list narrowed down, we select the first memory address and modify its value to 20, corresponding to the required number of cubes to capture the flag.


ree

6. Verifying the Modification:

  • Returning to the game, we observe that the cube count has successfully been altered to 20. This allows us to capture the flag and complete the challenge.


ree


Conclusion


This challenge provided a simple yet effective introduction to using Cheat Engine for game hacking. By manipulating the game's memory, we were able to bypass its intended limitations and achieve the objective.

CubeMadness1 serves as an excellent starting point for those interested in learning the basics of reverse engineering in a gaming context. Thank you for reading!








bottom of page