CompTIA PenTest+ PT0-002 Practice Question
Imagine you are conducting a penetration test and need to transfer a file from your attacking machine to a compromised Windows host. You decide to use a networking utility known for its simplicity and effectiveness in creating ad-hoc connections between two machines. What command should be executed on the attacker's machine to serve a file named 'payload.exe' over port 4444?
nc -ulvp 4444 < payload.exe
nc -l -p 4444 > payload.exe
nc -lvp 4444 < payload.exe
nc -p 4444 -w 3 < payload.exe