Northeastern University

CSG 254 - Network Security

Using the GUI on the attacker machine

Besides the router and server, each team has access to a third machine called the attacker. Along with the standard command line, this machine can also be used through a graphical environment using a remote desktop program called VNC. This document explains how to securely tunnel a VNC connection through a SSH connection in order to use the graphical environment from your personal computer.

Instructions

  1. Download and install a VNC viewer. There are a ton of options depending on your favorite operating system. TightVNC is a popular choice that is available for just about every OS. Just remember, you only need a viewer! There is no need to install a server on your personal computer.

  2. Create a SSH tunnel to your attacker machine. You should have received connection information including the IP address and port number.

    If you are using the SSH command-line client available on almost all Unix machines, use the following command:

    ssh -L 5901:localhost:5901 -p PORT root@IPADDR

    Be sure to replace IPADDR with the IP address and PORT with port number.

    If you are using PuTTY, fill out the connection info on the first screen then navigate to "Connection » SSH » Tunnels". Use 5901 as the "Source Port" and localhost:5901 as the "Destination". The "Local" and "Auto" options should be selected. Make sure to click on the "Add" button before opening your connection.

  3. Now that you are connected through SSH, start the VNC server with the command:

    vncserver
  4. Start the VNC viewer on your personal computer and connect to the attacker machine using hostname localhost and port 5901. If you are using TightVNC, the "VNC server" field is localhost::5901 (notice the two colons).

If at any time you wish to restart or kill your VNC server, run the following command on your attacker machine:

vncserver -kill :1

If you are new to the Fluxbox window manager, right-click on the desktop to get the program menu. Fluxbox is a simple and lean window manager. If you prefer something more familiar with a bit more polish, you can use KDE instead at the cost of your valuable system resources. You can change the Window Manager by editing the file ~/.vnc/xstartup and changing startfluxbox to startkde.