> For the complete documentation index, see [llms.txt](https://picoctf2022.haydenhousen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://picoctf2022.haydenhousen.com/binary-exploitation/buffer-overflow-3.md).

# 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}`
