OPS105 Fall 2025 Project
What's new
- Week 7
- Oct 15 Initial project spec
Initial project spec
- Install Kali (Graphical Desktop) in a VirtualBox VM.
- Change network settings of VMs created during first six weeks from CIDR/30 (glue network) to CIDR/29 (smallest multi-host network).
- 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.
- 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.
- 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
- Install OpenSSH server on your gateway VM.
- Configure OpenSSH to disallow ssh connections from user root.
- On all VMs create an unpriviledged (non-root) user to match your MySeneca username.
- Verify this MySeneca-named user can login to gateway VM from node VMs graphical desktops: Ubuntu and Kali.
- IMPORTANT: Verify MySeneca-named user can login to
matrix.senecapolytechnic.cawhen GlobalProtect VPN is running and connected to Student VPN on the host operating system. - 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
sudopackage. - Configure your MySeneca-named user to run administrative commands using
sudo. Usingsudologin 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
sudois better than usingsuandsu -.
File sharing network
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.
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.
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
/pubdirectory on gateway.
Login as bob on the gateway and try to read from and write to files that users alice and cyan created in the
/pubdirectory 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/pubdirectory.
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.txtas 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
/pubdirectory 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.txtis owned by bob then neither alice nor MySeneca named user can change the permissions of bob's/pub/bob.txt.
- Scenario 1: User bob can read but not write to
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 whenpublish.bashis 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
/pubdirectory on gateway. - called with multiple arguments some of which are files: copy those that are files to
/pubbut 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/binis in the environment variable$PATHwhen each user logs in. Placepublish.bashin$HOME/binof each user on Ubuntu and Kali VMs. Modifypublish.bashto 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 scriptpublish.bashin alice's$HOME/binto 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
2048MB memory,2virtual 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.