I recently started to do the pwnable.tw challenges. I have no problem understanding the actual buffer-overflow and shellcode injection. However, after the shell is spawned, the flag is read from /home/start/flag (with "start" being the name of the binary file).
Obviously, this directory does not exist in my filesystem. So my questions are:
- Why is there a virtual home directory for the process?
- How did the program manage to "put" files into this directory?
The process of spawning a shell and
cd-ing into the virtual home directory (which appears to exist) can be seen here: https://sreelakshmip.wordpress.com/2017/06/05/write-up-start-pwnable-tw/