PrepAway - Latest Free Exam Questions & Answers

What is the correct command to run Netcat on a server using port 56 that spawns command shell when connected?

What is the correct command to run Netcat on a server using port 56 that spawns command shell
when connected?

PrepAway - Latest Free Exam Questions & Answers

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

4 Comments on “What is the correct command to run Netcat on a server using port 56 that spawns command shell when connected?

  1. D33pBr3dt says:

    **
    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


Leave a Reply