In this lab assignment, you will explore the Linux CLI, which is essential for effective system administration and development tasks. The assignment is designed to enhance your command-line skills through hands-on practice with various operations related to files, directories, permissions, text editing, user management, networking, process management, and package management. You will work through a series of tasks categorized by levels of mastery: Pass, Merit, and Distinction.
Resources to assist with the lab:
Please reach out to the TAs only after making a genuine effort to resolve the issue independently. While they are available to provide guidance and support, their role is to assist you in developing your understanding rather than providing immediate solutions. You are encouraged to approach challenges proactively, fostering problem-solving skills and critical thinking in the process.
Developing problem-solving skills and critical thinking is fundamental to your education and growth. These skills are emphasized as part of the Aims of a BYU Education, which seek to cultivate individuals of faith, intellect, and character. Problem-solving and critical thinking are essential components of sound reasoning, effective communication, and intellectual depth — qualities that prepare you to succeed in both academic and real-world challenges.
BYU’s focus on lifelong learning and service reminds us that the ability to independently approach, analyze, and resolve complex issues is just as important as mastering technical skills. These capabilities not only build competence but also instill the confidence to contribute meaningfully to the world and continue learning throughout life.
You will be working with:
Your machine already has internet access set up and can be accessed through your Proxmox
instance. In future labs, you will practice setting the network settings but for this lab, it has been done for you.
You can hover over your specific arrow and a tooltip will appear with a hint on what is wrong or not working.
blueteam
abc123
https://172.18.<ID>.100:8006
, where ‘ID’ is your user ID).Advanced
, then Proceed to...
.student
Realm
from Linux PAM standard authentication
to Proxmox VE authentication server
.Login
.There may be a way to achieve a criteria that we have not accounted for. If you believe your method meets the criteria but is not being scored please reach out to a TA.
P1
in /home/blueteam/
.P1
directory you just created.touch
to create a file called P1.txt
path:<command>
into the file /home/blueteam/P1/P1.txt
tail
to view file changes in /var/log/auth.log
in real-time. Enter the line live-tail:<command>
into the file /home/blueteam/P1/P1.txt
/var/log/auth.log
using head
. Enter the line head:<command>
into the file /home/blueteam/P1/P1.txt
/var/log/auth.log
using tail
. Enter the line tail:<command>
into the file /home/blueteam/P1/P1.txt
/home/blueteam/P1-delete-me
/home/blueteam/P1-move-me.txt
to /home/blueteam/P1/moved.txt
./home/blueteam/P1-copy-me.txt
to /home/blueteam/P1/P1-copy-me.txt
/home/blueteam/P2/P2.txt
using nano and put the line nano is too easy
as the first line/home/blueteam/P2/P2-2.txt
and use the find and replace to change every instance of Vim
to Nano
ls
.
/home/blueteam/P3/
. Enter the line hidden:<command>
into the file /home/blueteam/P3/P3.txt
. Run the command from inside of the P3
directory./home/blueteam/P3/
. Enter the line hidden-long:<command>
into the file /home/blueteam/P3/P3.txt
. Run the command using the absolute file path.chmod
.
/home/blueteam/P3
to be read only by the file owner and no permissions to anyone else/home/blueteam/P3/P3-3.txt
to be read and write by the owner and read only by others in the group and all otherschown
.
blueteam
and the group to sudo
/home/blueteam/P3/P3-4.txt
to root
/home/blueteam/P3/P3-2.txt
to blueteam
useradd
or adduser
no-shell
that does not have a shell or password they can log in with but does have a home directory. It should say /usr/sbin/nologin
or /bin/false
for the user in /etc/passwd
after the user has been createdshell
that has a shell and password they can use to log in, but no home directoryno-password
that has a shell, but no password they can log in with, and no home directorylogin
with a login shell, home directory, and a password they can log in withusermod
and view group info using groups
login
user to the sudo
groupbackup
user from the redteam
groupzip
. Compress the directory /home/blueteam/P5/
and all of its contents into a zip called P5.zip
and put it in /home/blueteam
zip
. Extract the zip /home/blueteam/P5-unzip.zip
. Make sure the directory that contains all the extracted files is located at /home/blueteam/P5-unzip/
network:<command>
into the file /home/blueteam/P6/P6.txt
google.com
using an ICMP-based check. Enter the line ping:<command>
into the file /home/blueteam/P6/P6.txt
google.com
homepage from the internet. Enter the line download:<command>
into the file /home/blueteam/P6/P6.txt
. Make sure you get the homepage and not a redirect page.ps
that displays processes for all users in a user-oriented format that includes processes without a terminal. Enter the line ps:<command>
into the file /home/blueteam/P7/P7.txt
and enter the flags in alphabetical ordertop
that displays only the processes for the blueteam
user. Enter the line top:<command>
into the file /home/blueteam/P7/P7.txt
df
command and a flag to make the data human readable. Enter the line df:<command>
into the file /home/blueteam/P8/P8.txt
/opt/
directory is using the du
command and display the size in K
. Enter the line du:<command>
into the file /home/blueteam/P8/P8.txt
net-tools
using apt
remove
and purge
the package nmap
using apt
/home/blueteam/M1/Never-Gonna-Give-You-Up.txt
and put your answers in /home/blueteam/M1/M1.txt
word-count:<command>,<number of words>
into the /home/blueteam/M1/M1.txt
file. Ensure that the only number your command returns is the word count.lines:<command>,<number of lines>
into the /home/blueteam/M1/M1.txt
filechar:<command>,<number of characters>
into the /home/blueteam/M1/M1.txt
fileNever
appears in the file and enter the line never:<number of times>
into the /home/blueteam/M1/M1.txt
filesed
to replace the word “Always” with “Never” in the file /home/blueteam/M1/Never-Gonna-Give-You-Up-sed.txt
. Enter the line sed:<command>
into the /home/blueteam/M1/M1.txt
filecowsay
and fortune
to make the cow say a fortune. Enter the line cowsay:<command>
into the /home/blueteam/M1/M1.txt
file/home/blueteam/M1-hardlink.txt
called M1-hardlink.txt
in /home/blueteam/M1/
:/home/blueteam/M1-symlink.txt
called M1-symlink.txt
in /home/blueteam/M1/
:/home/blueteam/M2/WeLoveVim.md
using VIM
and add the line I <3 VIM
as the last line of the fileVIM
to find and replace every instance of Nano
to Vim
/home/blueteam/M3
to blueteam:sudo
/home/blueteam/M3
to 640
tcp
and udp
connections using netstat
. Enter the line tcp-udp:<command>
into the /home/blueteam/M4/M4.txt
fileall:<command>
into the /home/blueteam/M4/M4.txt
filelistening:<command>
into the /home/blueteam/M4/M4.txt
fileeverything:<command>
into the /home/blueteam/M4/M4.txt
file. Order the flags in alphabetical order.blueteam
account that will execute /home/blueteam/M5/cronScript.py
every 5 minutes
. The cronjob should be placed in your user’s crontab
pleasekillme.py
and remove the cronjob that is enabling it to be persistent but do not remove the script.You can remove scripts that point to blackteam but do not remove the scripts themselves. Note that the redteam may use accounts that seem to be out of scope to maintain persistence in your system.
sdb
to use xfs
and mount the directory /mnt/M6-mount
to sdb
/mnt/M6-unmount
/home/blueteam/D1
and all of its contents to /home/blueteam/D1-copy
using recursion. Enter the line copy:<command>
into the /home/blueteam/D1/D1.txt
file.Use the full filepath in the command./home/blueteam/D1
using recursion. Enter the line count:<count>
into the /home/blueteam/D1/D1.txt
file./home/blueteam/D1-copy
using recursion. Enter the line remove:<command>
into the /home/blueteam/D1/D1.txt
file. Use the full filepath in the command.game
in the name. Enter the line game:<command>
into the /home/blueteam/D1/D1.txt
filepython
files on the system. Enter the line python:<command>
into the /home/blueteam/D1/D1.txt
file1GB
. Enter the line 1GB:<command>
into the /home/blueteam/D1/D1.txt
fileSet User ID
permissions set. Enter the line SUID:<command>
into the /home/blueteam/D1/D1.txt
fileSet User ID
permission to the file /home/blueteam/D1/script.py
sus:<filepath>
(with the filepath of the file that is running in the process) into the /home/blueteam/D2/D2.txt
fileall-files:<command>
into the /home/blueteam/D3/D3.txt
fileroot-files:<command>
into the /home/blueteam/D3/D3.txt
fileSSH
session. Enter the line ssh-files:<command>
into the /home/blueteam/D3/D3.txt
fileYou don’t need to submit anything for this lab. All of the above criteria will be auto-graded unless stated otherwise. Once you have finished the lab you will have to do a verbal pass off with a TA.
You will be asked two of these questions at random during your verbal pass-off.
/var/log/auth.log
in real-time, and how could this benefit system security?head
and tail
?find and replace
feature be useful in text editors when updating configuration files or scripts?root
in certain cases?sudo
group affect their system privileges?ps
command provide about processes, and how does viewing processes for all users improve system monitoring?top
to show only those for a specific user, and how does this assist in resource management?