*** = write down and submit answers to these questions/problems. I recommend you use a google doc to record your answers.
This lab has you
mradmin
, password bluestone
ip addr
to make sure you machines are both on the 192.168.33 network.In this step, you will investigate, install, use, and monitor a tool called netcat
.
man netcat
. Read the first few paragraphs of the output. Put what you learned into your lab report document. (Use q
to stop reading the man
output.) ***sudo wireshark
). (You may have to install it first.) Set the filter to only show packets to/from Machine1's IP address. Record the Filter that does that in your lab report. ***nc -v 192.168.33.xxx 7,
where 192.168.33.xx is replaced with Machine2's IP address. It will probably fail with Connection refused
. *** Q3. Whether it fails or not, in wireshark on Machine2, look to see what protocols and ports nc
uses. Record this. ***We want to install some basic services on Machine2 and then use them over the network from Machine1. To do this we'll install a "superserver" that can provide multiple basic services.
xinetd
(the superserver). xinetd
. On Machine2, in a Terminal window, do this:
sudo -s
cd /etc/xinetd.d/
pico echo
echo
. Enable the echo server for TCP by changing disable = yes
to disable = no
. Save the file and exit the program.service xinetd restart
nc -v 192.168.33.xxx 7
echo
server.hello world!
. It should get echoed back to you from the remote machine.chargen
service, which operates on port 19. nc
to connected to port 19. Use Ctrl-C to stop the output coming from the chargen
server. Stop the wireshark capture.chargen
data? ***As you saw, these basic servers sends data unencrypted "over the wire". This would be a very bad thing, if you were sending crucial information, like your password or credit card information.
Of course, we have something better called ssh
, which allows you to log in remotely to another machine, but encrypts everything that is sent across the wire (like your password).
ssh mradmin@<machine2's ip address here>
sshd
. (You are trying to run the ssh daemon/server.) Follow the instructions to install the ssh daemon. If you don't get instructions on how to install it, you might just have to restart it.
opensshd
and having to run apt-get update
. Do that if that is what the system recommends.wireshark
and start capturing packets with that same filter as above.On each machine, run apt-get purge list-of-packages-you-installed
to clean up and remove those packages. You may leave wireshark installed.
Remove the white ethernet cables and plug in the orange ones.
Shutdown the machine, and return the flash drives to the box.
Turn in the answers to the questions marked *** by submitting the file via Moodle. Only one submission per group, with both Persons' names on it.
20 points total:
5 points: All questions are answered
10 points: Correct answers.
5 points: Depth of information from investigations.