Network Analysis and Security Using Netcat and Wireshark

Netcat is a simple utility for performing arbitrary network connections and listens.
It can also be used to create backdoors between systems. References can be found
in the Skoudis book or the Netcat Powerpoint presentation. Use the program,
netcat / nc , to do the following on your OWN machine:

(a) Create a sender and a listener for a simple transfer of data.
• You may have to disable your personal firewall for the duration of this
exercise. If it prompts you to allow the connection, do so.
• Create one command prompt window with a netcat listener. Look at the title
bar of the window to confirm your success.
• Use another command prompt window that uses netcat to connect to the
listener created in the previous step.
• Type some characters in either window and report what happens on the other
window. Show a screen shot of both windows.

(b) Push and pull a file.
• Create a file containing the text “Pulling a file using NETCAT”.
• Create a listener on a local port and direct this file into the input of the
listener.
• In another command window, create a netcat client that will connect to the
listener, get the file, and write it to received.txt.
• You will get no indication that netcat completed the task. Hit CTRL-C to
stop netcat.
• Type the file received.txt.

(c) Create a backdoor listener.

(d) Create a reverse shell backdoor to shovel the shell back to your machine.

(e) Create a netcat relay.
Capture traffic sent between the systems using tcpdump or Wireshark. Show only
the packets that contain the data transferred using netcat. Show the netcat
commands(text and screenshots) used to perform the function in parts a to e