As a pentester, I often use NetCat, and its encrypted counterpart CryptCat. However, even CryptCat only encrypts the traffic.

I'm looking for a way to keep unauthorized users from gaining access to the backdoors I have created. I guess I could whitelist the static IP of my computer, and block all other LAN connections to prevent others from connecting, but by no means is that an ideal solution. I feel like there should be some NetCat-like derivative that supports both encryption and password protection out of the box.

How can I prevent unauthorized access to a NetCat backdoor?

  • TLS or SSH tunnel? – Maarten Bodewes Sep 17 '16 at 17:36
  • Make reverse connections instead of listening on a port? – wireghoul Sep 18 '16 at 3:38
  • @MaartenBodewes Do you know of a way to SSH into a windows machine without using third-party software? – Verbal Kint Sep 19 '16 at 12:18
  • @VerbalKint nc isn't third party? – Luc Mar 26 '18 at 11:23
  • What a weird way to poorly reimplement ssh. – Lie Ryan Mar 26 '18 at 11:39

I am not aware of an existing solution. Assuming you are using something like nc -l -p 4444 -e /bin/sh, you could write a script that would be called instead of sh and acts as a password protecting wrapper for sh.

  • Hm, interesting approach certainly. I'm remoting into a windows command shell from Linux, but the same concept could work. I guess that's probably the best I can do within the confines of NetCat – Verbal Kint Sep 19 '16 at 12:17

There's a guide on the metasploit git on how to generate a "paranoid Meterpreter payload and listener", which is basically a SSL/TLS certificate protected reverse shell.

I'm very new to metasploit, so I'm not sure if this would work for a bind shell, but I'm posting it in case it helps anybody else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.