Rating:

**tl;dr:** Use buffer overflow to pivot stack to RWX segment and re-use the scanf call in main (return back to it) to read our shellcode into the RWX segment, then return to it.

Original writeup (https://github.com/bennofs/docs/blob/master/asisfinals-2017/mrshudson.py).