💻

Setting Up a Free Networking Lab

Jul 31, 2024

Nilson Networking: Setting Up a Free Virtual Lab

Overview

  • Focus: Creating a virtual lab environment for free to practice networking and security skills.
  • Objective: Set up a VirtualBox lab with Kali Linux, Metasploitable2, and Metasploitable3 VMs.
  • Requirements: 4GB RAM, 80GB hard drive.

Initial Setup

VirtualBox Installation

  • Download and install VirtualBox from Oracle for your OS (Windows, Mac, Linux).
  • Download pre-built Kali Linux VM and Metasploitable2/3 VMs in OVA format.
  • Download and install 7-Zip for extracting files.
  • Open VirtualBox and configure the network to NAT Network.

Extracting and Importing VMs

Kali Linux

  • Extract the downloaded file using 7-Zip to the VirtualBox VMs directory.
  • Add the VM in VirtualBox using the Add option.

Metasploitable2 and Metasploitable3

  • Metasploitable3: Use the Import option and import the OVA file.
  • Metasploitable2: Create a new VM, select Linux > Other Linux (64-bit), use an existing virtual hard disk file.

Configuration

  • Adjust VM settings to allocate appropriate memory (512MB each for Metasploitable2 and 3, 3GB for Kali Linux).
  • Set all VMs to use the NAT network.

Running VMs

  • Start Metasploitable2 and 3, and then start Kali Linux.
  • Log in to Kali Linux using default credentials: kali/kali.
  • Change the default password for both the user and root accounts.
  • Ensure internet connectivity by pinging external sites.

Updating Kali Linux

  • Update the package repository: sudo apt update.
  • Upgrade the system: sudo apt full-upgrade -y.
  • Remove unnecessary packages: sudo apt autoremove.

Setting Up Terminal (Tilix)

  • Install Tilix terminal for better usability.
  • Configure Tilix as the default terminal in Kali Linux.
  • Change terminal settings for better visibility.

Conducting Network Scanning

Using Nmap

  • Verify IP of Kali Linux: ip a.
  • Scan the network: sudo nmap -sn <network-range>, e.g., 192.168.56.0/24.
  • Identify target machines by IP addresses.
  • Perform detailed scan: sudo nmap -A <IP-range>, e.g., 192.168.56.5-7.

Exploring Metasploitable VMs

  • Metasploitable2: Default login msfadmin/msfadmin.
  • Metasploitable3: Default login vagrant/vagrant.
  • Check services and vulnerabilities using Nmap results.

Taking Snapshots

  • Take snapshots of VMs for easy recovery.
  • Restore VMs to snapshot state if needed.

Additional Notes

  • Future videos will cover adding Windows and other Linux/Unix VMs to the lab.
  • VirtualBox VMs only consume memory when they are running.
  • Regular updates and password changes are essential for security.

End of Lecture