Shell Anywhere
One of Netcat's most powerful features is its ability to execute and redirect standard I/O to a binary or executable file on a listening computer. For example, the commands
Server:
nc -l -p 12345 -e /bin/bash
where Server is the server running Linux and
Server:
nc -l -p 12345 -e cmd.exe
where Server is the server running Windows initialize Netcat as a listener on port 12345. When another Netcat session connects to this computer on port 12345, Netcat redirects I/O to that system's shell program. Figure 3 shows an example of a Windows computer connected over Netcat to a Linux computer. Notice that the Linux whoami command returns the name of the currently logged-on user. In this example, we see that a Windows user who uses Netcat to connect to a bash shell prompt on the Linux computer can issue commands directly on that Linux system under the same privilege as the user account running Netcatin this case the privileged root account. . . .
ttn628826 December 21, 2006 (Article Rating: