Chip and Fish

misc FCSC 2021 solved on

star

Description

We setup an online CHIP-8 emulator. It takes as input an hexadecimal string representing the ROM to be executed. Can you display the 16-byte secret placed at the top of the stack?

Notes:

  • Note 1: the flag follows this format: FCSC{secret.hex().lower()}.
  • Note 2: For Windows users, here is a piece of code to enable ANSI characters:
"""
Enable Virtual Terminal Input
https://docs.microsoft.com/en-us/windows/console/setconsolemode
"""
import win32api
import ctypes

kernel32 = ctypes.windll.kernel32
hStdout = win32api.GetStdHandle(win32api.STD_OUTPUT_HANDLE)
result = kernel32.SetConsoleMode(hStdout, 0x1 | 0x2 | 0x4)
if result == 0:
    raise RuntimeError("Console doesn't support ANSI character")

The documentation associated with this challenge is available on this page.

Files

Author

sheidan

Challenge Instructions

  1. First, download docker-compose.yml:
    curl https://hackropole.fr/challenges/fcsc2021-misc-chip-and-fish/docker-compose.public.yml -o docker-compose.yml
  2. Launch the challenge by executing in the same folder:
    docker compose up
  3. Then, in another console, access the challenge with Netcat:
    nc localhost 4000
⚠️ Important: You must solve the challenge by interacting with the Docker container through the exposed network port. Any other way is not considered valid.

In case you encounter problems, please consult the FAQ.

Flag

Share my success on Fediverse, Twitter, Linkedin, Facebook, or via email.

Submit your solution

You can submit your writeup for this challenge. Read the FAQ to learn how to proceed.

You need to be logged in to submit a writeup.

Writeups

There are no public solutions for this challenge yet, but you can submit yours after getting the flag.