Objective: To use netcat for relay, port scanning, etc.
Use netcat in the following ways:
-
Push a file (from client to listener/ server).
-
Pull a file (client initiates & receives).
-
As a port scanning tool. Compare with nmap.
-
Create a backdoor listener. (For the -e option, use the executable
~jmache/sec/nc4 )
-
Create backdoor to shovel a shell.
-
As a backdoor channel using at least two computers as the intermediaries (relay). Describe the steps you followed and the results.
-
Suppose there is a process that is running on a box with high
privileges. In fact, this process is a listener that will grant root-level
command-shell access ([root@lotr8 ~]# nc -l -p 6666 -e /bin/sh). However
the system is
protected behind a firewall that allows outbound access (and the ACK
responses associated with it). That is, this firewall has an established
filter that blocks all incoming packets (like SYNs), but allows packets
that have the ACK bit set. Now, suppose that you can run other commands on
the protected box with limited privileges (i.e. non-root).
Your challenge is to devise a command for the protected machine that will
give you outside box access to that root-level shell.
Don't just run another netcat, because it will have limited privileges.
Instead, you'll have to connect to the listener that already exists.
-
EXTRA CREDIT: Run netcat over an ssh tunnel.
One application is described here:
http://cg.scs.carleton.ca/~morin/misc/laptopmail/.
Another is here:
http://www.plenz.com/tunnel-everything.