OPS105 Fall 2025 Project

What's new

Initial project spec

  1. Install Kali (Graphical Desktop) in a VirtualBox VM.
  2. Change network settings of VMs created during first six weeks from CIDR/30 (glue network) to CIDR/29 (smallest multi-host network).
  3. Add Kali VirtualBox VM as a node within the CIDR/29 (smallest multi-host) network. After Kali was added, your internal network will comprise of three VMs: two nodes and one gateway.
  4. Configure Kali to:
    • run in full screen after it boots and user has logged in to the desktop.
    • have Internet access only when gateway VM is running and configured to route traffic to the internal network.
  5. Go Pro: Configure your gateway VM to run Minimal Ubuntu Server LTS 24.04 in VirtualBox stealth mode. VirtualBox stealth mode has no graphical window on the host operating system (Windows/macOS/Linux). In stealth mode the startup and shutdown of virtual machines is managed using VirtualBox command line utilities.

OpenSSH Server and MySeneca user account

  1. Install OpenSSH server on your gateway VM.
  2. Configure OpenSSH to disallow ssh connections from user root.
  3. On all VMs create an unpriviledged (non-root) user to match your MySeneca username.
  4. Verify this MySeneca-named user can login to gateway VM from node VMs graphical desktops: Ubuntu and Kali.
  5. IMPORTANT: Verify MySeneca-named user can login to matrix.senecapolytechnic.ca when GlobalProtect VPN is running and connected to Student VPN on the host operating system.
  6. Go Pro: Set MySeneca-named user to login to gateway (Minimal Ubuntu Server LTS 24.04) without a password (HINT: research how to setup password-less access with ssh).

Using sudo

  • Confirm availability otherwise install the sudo package.
  • Configure your MySeneca-named user to run administrative commands using sudo. Using sudo login as your MySeneca-named user do the following administrative commands:
    • bring packages up-to-date
    • complete all the other privilege tasks below
  • Understand why using sudo is better than using su and su -.

File sharing network

  1. Create a file sharing server for users on this network. Create three users: alice, bob, and cyan in addition to your MySeneca-named user. So there are four users, not including root, on all three VMs in this network.


  2. Create three groups: attack, defend, and opsec which are team names used in attack, defend, and opsec strategies commonly found at capture the flag events. The MySeneca-named user is a member in all three groups. Users alice, bob, and cyan each belong to two groups: their own and their team (attack, defend, or opsec). User alice is a member of groups: alice and attack. User bob is a member of groups: bob and defend. User cyan a member of groups: cyan and opsec. MySeneca-named user is a member of MySeneca-named group and a member of groups: attack, defend, and opsec.


  3. Login as each user on all three VMs. Configure ssh server on gateway so users: alice, bob, cyan, and MySeneca-named user can upload files to and download files from the /pub directory on gateway.


  4. Login as bob on the gateway and try to read from and write to files that users alice and cyan created in the /pub directory on the gateway. Similarly login to gateway as cyan, alice, and as MySeneca-named user and try to read from and write to files that others created in the /pub directory.


  5. On gateway verify that users alice, bob, cyan, and MySeneca-named user can meet these requirements:


    • Scenario 1: User bob can read but not write to /pub/alice.txt as the file is owned by alice. In this scenario bob and alice can read from but not write to each other's files. Both alice and bob do not want user cyan to read or write to any of their files. User cyan, however, wants to read and write to any file owned by either bob or alice.


    • Scenario 2: User alice can write but not read from bob's /pub/bob.txt. In this scenario bob and alice can each write to some of the other's files. Yet neither alice nor bob should not be allowed to read or delete files not owned by them. As described before, users bob and alice allow files to be shared with each other but neither want cyan to read or write to any of their files.


    • Scenario 3: User cyan intends to try any and all means to access files created by any user on the server. Configure the file sharing gateway and /pub directory so user cyan cannot read or write to files not owed by cyan. This means user cyan can only read and write to files created by user cyan.


    • Scenario 4: As the MySeneca named user is a member in all groups: attack, defend, and opsec; MySeneca named user has read and write access to files permitted by groups attack, defend, and opsec.


    • Users bob, alice, and MySeneca named user cannot change permissions of files not owned by them. Example: if file /pub/bob.txt is owned by bob then neither alice nor MySeneca named user can change the permissions of bob's /pub/bob.txt.


  6. Go Pro: When available, complete the lab on Bash scripting. Make a copy of your Bash script and call it publish.bash. Modify the newly created script to do the following when publish.bash is called:

    • without arguments: display a usage message describing how to call the script and quit.
    • called with one argument that is not an existing file: display an error message using the given non-file argument and quit.
    • called with one argument that is an existing file copy that file to /pub directory on gateway.
    • called with multiple arguments some of which are files: copy those that are files to /pub but show error messages for those that are not files.
    • called with multiple arguments all of which are files: copy all files to /pub.

    Configure your login shell so $HOME/bin is in the environment variable $PATH when each user logs in. Place publish.bash in $HOME/bin of each user on Ubuntu and Kali VMs. Modify publish.bash to personalize it for that user. For example: after user alice has uploaded a file that is to be shared by user bob and not user cyan, modify the script publish.bash in alice's $HOME/bin to verify that the permissions were set correctly and warn user alice if it isn't.

Tips

Kali

  • TIP #1: When creating your Kali VM, give it at least 2048 MB memory, 2 virtual CPUs, and 32GB of disk space.


  • TIP #2: When running gateway in stealth mode from the command line, you need a VirtualBox command to start it up, however, shutting gateway down should be done from within the VM itself. Try to avoid shutting down from a VirtualBox command or the VirtualBox graphical application on your Windows/macOS/Linux desktop. In other words, this means you need to ssh in to the gateway from Windows or Ubuntu or Kali before you can shut the gateway down.

End of project spec

Last Updated: 2025-Oct-15 Wed 14:50