December 14, 2022
Advent of Cyber 2022 : [Day 10 Walkthrough]
[Day 10] Hack a game You’re a mean one, Mr. Yeti

By Muhammad Abdullah Niazi
2 min read
Learning Objectives
- Learn how data is stored in memory in games or other applications.
- Use simple tools to find and alter data in memory.
- Explore the effects of changing data in memory on a running game.
The Memory of a Program
Whenever we execute a program, the CPU will process all data somehow through the computer's RAM (Random Access Memory). If you think of a video game, your HP, position, movement speed, and direction are all stored somewhere in memory and updated as needed as the game goes.
The Mighty Cetus
Cetus is a simple browser plugin that works for Firefox and Chrome, allowing you to explore the memory space of Web Assembly games that run in your browser. The main idea behind it is to provide you with the tools to quickly find any piece of data stored in memory and modify it if needed. To learn more, check out Day 10.
Walkthrough
Q#1: What is the Guard's flag? Follow the step-by-step instruction in the Day 10 task. When you follow all the steps in the instructions, you will save the memory address as a bookmark.
Note that Cetus uses hexadecimal notation to show you the numbers. If you need to convert the displayed digits to decimals, you can use this website. With Cetus on the bookmarks tab, talk to the guard again and notice how the random number changes immediately. You can now guess the number:
Convert the hexadecimal value to decimal, and then when the guard asks for the input, type it there and press Enter. Voila! Walk towards the guard and talk to him, and you will get the flag:
Answer: THM{5_star_Fl4gzzz}Answer: THM{5_star_Fl4gzzz}Q#2: What is the Yeti's flag? To find the next flag, we have to cross the bridge. To accomplish this, we must find our HP value in the memory and alter it. Start with a differential search, and don't give any value as input.
Answer: THM{yetiyetiyetiflagflagflag}Answer: THM{yetiyetiyetiflagflagflag}If you liked today's challenge, the Walking an Application room is an excellent follow-up!
Conclusion
We covered how data gets stored in memory and how addresses are assigned to each value. We also learned how third-party tools could modify and alter data. Congrats on finishing the 10th day! I hope you found the walkthrough and task exciting. For Day 11, click here.