format string 0

Published: April 3, 2024Updated: December 9, 2025

Description

Can you use your knowledge of format strings to make the customers happy?

Remote menu

Connect to mimas.picoctf.net <PORT_FROM_INSTANCE> via netcat.

Observe the menu items in each round and look for strings containing %.

nc mimas.picoctf.net <PORT_FROM_INSTANCE>

Solution

This is the introductory format string challenge. Once you understand how format specifiers leak data here, progress to format string 1 for stack leaking and format string 2 for memory overwrites.
  1. Step 1Round 1
    Choose Gr%114d_Cheese. The %11 leaks memory instead of printing a literal name, which is the intended foothold.
    Gr%114d_Cheese
  2. Step 2Round 2
    Select Cla%sic_Che%s%steak so printf interprets each %s and prints arbitrary stack entries, eventually revealing picoCTF{...}.
    Cla%sic_Che%s%steak

Flag

picoCTF{7h3_cu570m3r_15_n3v3r_SEGFAULT_dc...}

Ordering the format-string specials leaks the flag directly in the connection output.