When you use Netcat to catch a PowerShell reverse shell, like Nishang, you’ll notice that you won’t have the ability to use up/down arrow keys. This could be a huge pain when you’re stuck in this type of shell. However, there is a tool that we can leverage that should improve your experience with these type of shells.
To begin, we’ll download and install the tool on our system.sudo apt install rlwrap -y
Then we’ll set up a log file on our box that will give us the input/output logging.script reverse.log
Now we can start our Netcat listener. rlwrap nc -nvlp <listenPort>
Then we’ll issue our exploit to start our reverse shell. Now we should have arrow keys within our Netcat session!