Skip to content

Linux Orientation

What you need to know about Linux before hardening one. Ubuntu and Linux Mint are the two distributions CyberPatriot uses; Mint is built on Ubuntu, so the commands are the same.

Root

Linux has regular users and one administrator account, root. Root can read any file, run any command, and change settings for every other user. The Windows equivalent is the built-in Administrator.

You don't log in as root. You log in as yourself and borrow root's powers one command at a time with sudo, typing your own password. Users who can do this are members of the sudo group, which makes that group the Linux version of the Administrators group and the first thing to audit. Lesson 3 covers it.

The file system

One tree, starting at /. No drive letters. Forward slashes.

Windows:  C:\Users\student\hello.txt
Linux:    /home/student/hello.txt
Folder Contains Why you care
/etc Configuration files for the system and installed programs Most hardening is editing files here
/home One folder per user Extra folders here mean extra users
/var/log Logs Forensics questions
/boot Kernel and startup files Leave alone
/tmp Temporary files, cleared on reboot Malware likes to live here
/bin, /usr/bin, /usr/sbin Programs

Everything is case-sensitive. Documents and documents are different folders.

Packages

Software comes in packages managed by apt. Installing, removing, and updating all need sudo.

sudo apt update              # refresh the list of available packages
sudo apt upgrade             # install updates
sudo apt install gufw        # install a package
sudo apt remove hydra        # remove one
apt list --installed         # everything installed (long)

On a competition image, apt list --installed | grep -i -E 'hydra|john|nmap|wireshark|aircrack|ophcrack' finds common hacking tools that score when removed. Read the README first; sometimes a tool is required.

Desktop differences

Ubuntu images use the GNOME desktop; the settings app is Settings and the text editor is gedit. Mint images use MATE; settings are in Control Center and the editor is xed. Lesson 8 is the translation table.

Next

Command Line Basics