A walkthrough of level 20 of the Bandit wargame from Over The Wire. This level goes over using a setuid binary (similar to the previous level), and also setting up a netcat session to serve a text file over a given port.
https://overthewire.org/wargames/bandit/