In ctf after you get a shell you may want to see if you can upgrade to a full tty shell. You can find many ippsec videos on youtube doing this.
First see if there is python or not
$ which python
If it is available, type following command to get bash shell. There is another post on how to escape restricted Linux shell.
$ python -c 'import pty;pty.spawn("/bin/bash")'
Now, if you also want tab auto completion Ctrl-Z to background your shell and type on your box
$ stty raw -echo
then type ‘fg’ to resume the shell and finally if you want to be able to use commands like ‘clear‘
$ export TERM=xterm-color
if only python 3 is installed, use python3 -c
There are plenty other ways to do this. You can always google to find it.
Source: From facebook page