Rating:

Easy mode, stole the answer off pastebin while CTF was still ongoing

Original writeup (http://lockboxx.blogspot.com/2015/05/volgactf-2015-quals-writeup-homework.html).