Rating: 5.0

1. Use ROP to get arbitrary read and write primitive
2. Read GOT's address to leak the address of 'read'
3. Read a few bytes within the read function to get the address of 'syscall'
4. Write 'syscall''s address to srand's GOT.
5. Use ROP to setup execve /bin/sh and call srand.

(libc independent solution)

Original writeup (https://github.com/DhavalKapil/ctf-writeups/blob/master/codegate-2018/baskin-robins/exploit.py).
L00P3RFeb. 4, 2018, 5:42 p.m.

Short but sweet