Table of Contents
- Disclaimers
- Requirements
- Obtaining the Virtual Disk Image from the OVA
- Creating the Emulated Virtual Machine
- Configuring the Emulated Virtual Machine
- Completing Course Projects via SSH
- Obtaining the VM’s IP Address
- Completing Course Projects
- Testing Submissions
- Support
This guide provides instructions for emulating the CS6035 virtual machine (VM) on Apple M-series chipsets using tools like QEMU and UTM. Note that this setup is not officially supported, and you proceed at your own risk. Familiarity with SSH and terminal usage is essential, as the Linux GUI in the emulated environment is often unresponsive and unsuitable for completing course projects.
Disclaimers
- Technical Support: Teaching Assistants (TAs) will not provide assistance for issues related to unsupported chipsets.
- No Extensions: Extensions will not be granted for technical difficulties encountered while using an emulated VM.
- Risk: Using emulation to complete course assignments is entirely at your discretion.
Requirements
To set up the emulation environment, you will need:
- A copy of the CS6035 VM in
.ovaformat - A Linux system (e.g., an ARM-based VM) or QEMU installed on macOS via Homebrew
- UTM or another emulation tool
- At least 50 GB of available disk space
Obtaining the Virtual Disk Image from the OVA
This guide uses CS6035-Fall-2024-RC2.ova as the example VM filename. Adjust the commands to match your specific VM image. These instructions were developed using a Linux VM; macOS commands may vary slightly.
Steps
- Open a terminal.
- Download the CS6035 VM (instructions to be provided).
-
Extract the VM disk image (.vmdk file) from the OVA archive:
tar -xvf CS6035-Fall-2024-RC2.ova -
Convert the disk image to qcow2 format:
qemu-img convert -O qcow2 CS6035-Fall-2024-RC2-disk001.vmdk CS6035-Fall-2024-RC2.qcow2
Creating the Emulated Virtual Machine
These instructions assume you are using UTM. If you are using a different emulation tool, the steps will differ.
Steps
- Open the UTM application.
- Click Create a New Virtual Machine.
- Select Emulate, then choose Other.
- Set Boot Device to None and click Continue.
- Ensure Architecture is set to
x86_64. - For System, use the default:
Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-7.2) - Set Memory to approximately 50% of your Mac’s total RAM (e.g., 8192 MB or more is recommended).
- For Storage, accept the default 64 GB (this will be replaced later).
- Skip setting a shared directory and click Continue.
- Name the VM (e.g.,
CS6035-Fall-2024-rc2). - Check Open VM Settings and click Save.
Configuring the Emulated Virtual Machine
After saving, the VM settings window should open. Configure the VM to boot from the qcow2 image:
- In the QEMU menu, uncheck UEFI Boot.
- In the Display menu, set Emulated Display Card to
virtio-gpu-gl-pci(GPU Supported). - In the IDE Drive menu, click Delete and confirm the action.
- Under Drives, select New…, then click Import…
- Locate and select your
CS6035-Fall-2024-RC2.qcow2file. - Click Save in the VM settings window.
Completing Course Projects via SSH
Due to the poor performance of the emulated Linux GUI, all project activities should be completed via SSH. If a task cannot be performed using SSH, it is unlikely to be feasible in the emulated VM.
Obtaining the VM’s IP Address
- Power on the VM.
- Log in as any user (expect a delay; the UI may display a black screen for some time).
- Open the Terminal application within the VM.
-
Run the following command to query network interfaces:
ip a -
Identify the VM’s network interface (typically the second interface, e.g., enp0s1):
enp0s1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether ee:50:4e:d3:b0:d1 brd ff:ff:ff:ff:ff:ff inet 192.168.64.12/24 brd 192.168.64.255 scope global dynamic noprefixroute enp0s1In this example, the IP address is 192.168.64.12. Use your actual VM IP address for SSH commands.
Completing Course Projects
APISec Project
- Ensure Google Chrome is installed on your Mac.
-
Connect to the VM via SSH:
ssh -L 127.0.0.1:8080:127.0.0.1:8080 apisec@192.168.64.12 - Open Chrome and navigate to:
http://localhost:8080/swagger/index.html - Follow the project documentation to complete the tasks.
BinExp Project
-
Connect to the VM via SSH:
ssh binexp@192.168.64.12 - Use
tmuxfor debugging with PwnTools scripts (e.g.,e.pyfiles). - Follow the project documentation to complete the tasks.
DBSec Project
- Ensure Google Chrome is installed on your Mac.
-
Connect to the VM via SSH (requires
sudofor port 80):sudo ssh -L 127.0.0.1:80:127.0.0.1:80 -L 127.0.0.1:1433:127.0.0.1:1433 dbsec@192.168.64.12 - Add the project’s hostnames to your Mac’s
/etc/hostsfile. - Navigate to:
http://localhost/intro.html - Follow the project documentation to complete the tasks.
Log4j Project
-
Connect to the VM via SSH:
ssh log4j@192.168.64.12 - Open multiple terminal sessions and connect each to the VM via SSH as needed.
- Follow the project documentation to complete the tasks.
Machine Learning Project
-
Connect to the VM via SSH:
ssh machine@192.168.64.12 - Follow the project documentation to complete the tasks.
Malware Analysis Project
-
Connect to the VM via SSH:
ssh malware@192.168.64.12 - Follow the project documentation to complete the tasks.
WebSec Project
- Ensure Google Chrome is installed on your Mac.
-
Connect to the VM via SSH:
ssh -L 127.0.0.1:7149:127.0.0.1:7149 websec@192.168.64.12 - Open Chrome and navigate to:
http://localhost:7149/ - Follow the project documentation to complete the tasks.
Testing Submissions
Test your project submissions via SSH as outlined in the respective project documentation.
Support
For questions related to ARM, QEMU, UTM, or SSH, refer to the designated discussion thread.
Thank you for your cooperation.