morganz’s blog

a diary of an ordinary person

PoliCTF 2015 Pwnable150 John’s Library Writeup

The server (download) is a 32-bit non-stripped binary. When we connect to the server, we got three options:

1
2
3
4
5
Welcome to the jungle library mate! Try to escape!!
 
 r - read from library
 a - add element
 u - exit

Let’s see what the first two options do:

ASIS CTF Quals 2015 Re100 Tera Writeup

Running the program shows a progress bar and gives a core dump:

1
2
3
alpha@alpha-th:~/Copy/ctf/asis2015/re/100$ ./tera_85021482a68d6ed21892ea99b84f13f3
Please wait until my job be done 
%0.0000000 [                          Segmentation fault (core dumped)

Let’s look at the output from strace (other lines are omitted):