Sous marin

hardware boot security FCSC 2023 solved on

star star

Description

You are invited by a colleague to come and test his new miniature model of a submarine. This model is equipped with a “first person view” (FPV) camera and an adequate system to broadcast this video stream.

To lure you in, your colleague states that his onboard board is based on a Risc-V core. You immediately accept. That evening, you spend several minutes exploring the depth of the campus basin. Nevertheless, after half an hour, the supervision system panics and you lose communication. you lose communication. You throw yourself into the basin to recover the model. Your colleague sees students running off in the distance with radio equipment in hand. But what happened? Could these students have compromised the submarine’s remote system? You offer to help your colleague extract the contents of his Flash memory and analyze it.

The next day, after a shower and a short night’s rest, your colleague drops the submarine’s electronic board on your desk. He confirms that he has implemented a serial port in 8-N-1 mode, but he points out that he that he has potentially made an implementation error in the logic of the synthesized serial port, but he doesn’t remember much about it.

Because the submarine is not underwater, its electronics are not properly cooled. You can’t keep it on for more than a few minutes before it shuts down for safety.

You take a serial port to USB adapter to connect to the system and start investigating…

To interface with the serial port remotely, you will need Telnet.

Your colleague managed to find a backup of the bootloader bootloader.bin and tells you that you can emulate the boot sequence with the command qemu-system-riscv64 -M sifive_u -m 45M -kernel bootloader.bin. (serial port available in View > Serial 0). This allows you to prototype ideas before risking damaging the sub.

You need QEMU 5.1 or later to emulate this challenge.

Files

Author

erdnaxe

Challenge Instructions

  1. First, download docker-compose.yml:
    curl https://hackropole.fr/challenges/fcsc2023-hardware-sous-marin/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

I've been looking for a long time and I still can't find the flag!

You can vote for the solutions you prefer by using the on their respective pages.

DateAuthor Language Tags Vote
2023-11-15
CypElf
🇬🇧
TeamFrance