# buffer overflow 3

## Challenge

Do you think you can bypass the protection and get the flag? It looks like Dr. Oswal added a stack canary to this [program](https://github.com/HHousen/PicoCTF-2022/blob/master/Binary%20Exploitation/buffer%20overflow%203/vuln/README.md) to protect against buffer overflows. You can view source [here](https://github.com/HHousen/PicoCTF-2022/blob/master/Binary%20Exploitation/buffer%20overflow%203/vuln.c). And connect with it using: `nc saturn.picoctf.net 57032`

## Solution

This challenge is almost identical to [CanaRy](https://github.com/HHousen/PicoCTF-2019/tree/master/Binary%20Exploitation/CanaRy) from PicoCTF 2019. Here is another writeup for [CanaRy](https://github.com/Dvd848/CTFs/blob/master/2019_picoCTF/CanaRy.md) and here is a writeup for the [nearly identical challenge from PicoCTF 2018](https://github.com/Dvd848/CTFs/blob/master/2018_picoCTF/buffer%20overflow%203.md).

Solution provided in [script.py](https://github.com/HHousen/PicoCTF-2022/blob/master/Binary%20Exploitation/buffer%20overflow%203/script.py)

### Flag

`picoCTF{Stat1C_c4n4r13s_4R3_b4D_f9792127}`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://picoctf2022.haydenhousen.com/binary-exploitation/buffer-overflow-3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
