master
..
rw-r--r--
2.8 KB
rw-r--r--
223 B

Reading

  1. SSH, The Secure Shell - Introduction to SSH

  2. SSH Protocol - RFC 4251

  • Abstract
    1. Introduction
  • 4.4. Security Properties
  1. SSH Connection Protocol - RFC 4254

  2. SSH Man Page - man ssh

  • DESCRIPTION (first paragraph)
  • -L flag
  • -R flag
  • -D flag
  1. SSH Port Forwarding - Stack Exchange

Lab

SSH Setup

  1. Login to virtual machine inside the vmware console
  2. Record its public IP address (ip addr)
  3. Return to your mac and open up the Terminal application
  4. ssh into the virtual machine
  • ssh ubuntu@<vm IP address>
  1. Examine the networks that are accessible from this machine (ignore any vmnets which may be lingering)
  1. What are the subnets accessible from the vm?
  2. What IP addresses are assigned to the vm?
  3. What are the names of these interfaces?
  1. ssh to the next machine at 10.0.0.2
  • ubuntu@ubuntu:~$ ssh ubuntu@10.0.0.2
  1. Confirm you are on a different network segment (ip addr)
  1. What are the subnets accessible from this new location?
  2. What IP addresses are assigned to the this location?
  3. What are the names of these interfaces?
  1. Exit back to your macbook bash session (exit two times)

Port Forwarding: Basic

  1. Setup a local port forward to the next target (T1) IP address 10.0.0.2
  • MacBook-Pro:~$ ssh ubuntu@<vm IP address> -L 2222:10.0.0.2:22
  1. In a new terminal ssh to the (T1) target IP address via the new local listener
  • MacBook-Pro:~$ ssh ubuntu@localhost -p 2222
  1. Bonus: Manipulate the first command to setup the port forward in the background. This should allow you to continute to ssh to the (T1) target without opening a second terminal.

IP Scanning: Basic

  1. The next hop in this lab will not be given to you.
    Create a ping sweep command to discover the next target (T2).
  1. Which location should this ping sweep be run from?
  2. Why wouldn’t this work from your host machine.
  1. Create a new localhost port forward to reach the (T2) target ssh
  • MacBook-Pro:~$ ssh ubuntu@localhost -p 2222 -L 2223:<T2 IP>:22
  • MacBook-Pro:~$ ssh ubuntu@localhost -p 2223
  1. Enumerate the new location:
  1. What are the subnets accessible from this new location?
  2. What IP addresses are assigned to the this location?
  3. What are the names of these interfaces?

Port Scanning: Basic

  1. From the (T1) target location launch a port scan against the third host
  2. Create a local ssh port forward (from your mac) to this location
  3. Connect to the forwarded port with your browser

Continue

  1. There are more networks in this lab, use your new port forwarding skills to continue through to T4