# format string 0

## Challenge Description

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

Download the binary [here](https://artifacts.picoctf.net/c_mimas/77/format-string-0).

Download the source [here](https://artifacts.picoctf.net/c_mimas/77/format-string-0.c).

***

## Solution

Download the given files.

From the given C file, you can see that the buffer size of the input that we are giving is 32.

<figure><img src="https://2035863894-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjvlUrxK6i7ZNmn3d6e8B%2Fuploads%2FxowUXtnBLZGxCVaTWyVH%2Fimage.png?alt=media&#x26;token=a7ceeafe-3f54-4569-a6ca-e66c5cca2be0" alt=""><figcaption></figcaption></figure>

So, I tried by giving an input that is greater than the buffer size \[ more that 32 characters ] and got the flag.

<figure><img src="https://2035863894-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjvlUrxK6i7ZNmn3d6e8B%2Fuploads%2FAStKjVz0AJHrUwGch5rj%2Fimage.png?alt=media&#x26;token=4b586831-d3ce-4ba2-be75-9ea6ae2172eb" alt=""><figcaption></figcaption></figure>

Flag: `picoCTF{7h3_cu570m3r_15_n3v3r_SEGFAULT_f89c1405}`
