What is the correct command to run Netcat on a server using port 56 that spawns command shell
when connected?
A.
nc -port 56 -s cmd.exe
B.
nc -p 56 -p -e shell.exe
C.
nc -r 56 -c cmd.exe
D.
nc -L 56 -t -e cmd.exe
What is the correct command to run Netcat on a server using port 56 that spawns command shell
when connected?
A.
nc -port 56 -s cmd.exe
B.
nc -p 56 -p -e shell.exe
C.
nc -r 56 -c cmd.exe
D.
nc -L 56 -t -e cmd.exe
B is the Ans.
all are wrong!
**
Ans: D
-p flag isn’t mandatory just fundamental. ( nc -l 56 ) is enough to put netcat into server mode listening on 6543.
nc -l -p 56 -e cmd.exe
$ nc -l -p 56 -e /bin/sh
-t: Telnet negotiation
-L: Listen harder (supported only on Windows version of Netcat). This option makes Netcat a persistent listener which starts listening again after a client disconnects
>> error line 2.
*56.