RITSEC CTF 2026 - Ocean Wildlife

You have recieved a message in a bottle, saying something about the strange behavior of sea creatures. I wonder what that could be about?

Initial Analysis

The challenge provides a rosbag2 recording consisting of a metadata.yaml file and a SQLite database mystery_message_0.db3. The metadata indicates that the recording contains messages for several topics, most notably /draw_commands.

Database Inspection

Opening the database with sqlite3, we find several tables, including topics and messages. The topics table reveals that the /draw_commands topic uses the std_msgs/msg/String type and contains JSON-formatted instructions.

1
2
SELECT * FROM topics WHERE name = '/draw_commands';
-- topic_id 6, type std_msgs/msg/String

Data Extraction

The messages in the messages table are stored in CDR (Common Data Representation) format. For std_msgs/msg/String, the actual string data starts after an 8-byte header (4 bytes CDR header + 4 bytes string length).

By extracting and parsing these strings, we find two types of commands:

  • {"cmd": "pen", "off": 0/1, ...}: Controls whether the turtle is drawing.
  • {"cmd": "teleport", "x": ..., "y": ..., "theta": ...}: Moves the turtle to specific coordinates.

Visualization

Using a Python script with matplotlib, we can reconstruct the path drawn by the turtle. By treating teleport as a movement and pen as the draw state, we can plot the lines.

The coordinates reveal two distinct rows of characters:

  • Top Row (Y ≈ 6.0): Letters forming RS{f0ll0w_th3_
  • Bottom Row (Y ≈ 4.7): Letters forming 5ea_Turtles}

Flag

RS{f0ll0w_th3_5ea_Turtles}