When we gain command execution on a server, we usually get it through a limited web-shell. The next thing we need to do is to find a way to upgrade this limited shell into a fully interactive shell and eventually escalate it to root/administrator level privileges.
In this recipe, we will learn how to use Metasploit's msfvenom to create an executable program that triggers a connection back to our attacking machine and spawns an advanced shell (meterpreter) so we can further exploit the server.