After completing these activities you should be able to:
Processing power continues to increase with the density of transistors on an Integrated Circuit (IC) doubling every two years based on a principle called Moore's Law. Since postulated by Intel co-founder Gordon Moore in 1965, this prediction has held steady through innovations that continue to push physics beyond what could be imagined to this day. What was once two-dimensional, 90 nanometer (nm) strained silicon wafers that landed Apollo XI on the moon has morphed into the ability to cram over 100 billion transistors using extreme ultraviolet (EUV) lithography to fabricate a die that combines three-dimensional stacking and other advanced manufacturing processes to deliver processors such as the Apple's M1 Ultra Chip and Nvidia's RTX 4090 Graphics Processing Unit (GPU). By 2030, processors are estimated to pack 1 trillion transistors per chip (Kelleher, 2023).
These hardware improvements are directly seen with the Operating Systems (OSs) ability to also exponentially improve. As you progress through this class, keep in mind the direct relationship the OS has with advancements in hardware capabilities.
OSs are one of the components of Computer Architecture, as discussed in a previous class. The OS is software that manages all the other programs running on the computer and acts as an intermediary between those programs (or the user) and the physical machine. Student issued laptops will have Windows, a smartphone may have iOS or Android, servers might run Unix or one of the many flavors of Linux. Just remember that users and typical programs do not access or manipulate resources, like storage or peripherals, directly but requests the OS to do so on its behalf.
Because the OS manages the computer and all the programs that run on the computer, it is of critical importance to security. It can restrict what Programs and users do to make sure they can't cause too much trouble on the system. Conversely though, when OSs have security flaws, it can be a significant problem for businesses and Information Technology (IT) organizations.
The OS provides services to Users and programs — it does things they need done that they cannot or are not allowed to do for themselves. Some important kinds of OS-provided system services are:
The OS generally provides three ways for programs and users to access its services:
Although you are probably only familiar with using the GUI to access OS services, understanding and using shell will be important for this course. That importance stems in no small measure from the fact that the shell is an interface to the OS for both users and programs alike. The OSs we'll use for this course are Windows and Linux, which will be the next item covered in this class.
The advancements in computer hardware also allowed for improvements in software. With command-line operating systems, like Microsoft Desktop Operating System (MS-DOS), released in the early 1980's, the Windows GUI wasn't launched until 1990 using an 8086 16-bit processor. Today's 64-bit processors allow for faster, more efficient, multi-thread capabilities but many of the underlying technologies within the OS haven't changed since the 2000's (i.e. the system registry for the fellow nerds that may be reading this).
For the upcoming Lab 2.1, Windows Operating Systems, you'll familiarize yourself with some of the GUI components and navigation but primarily for comparing output provided by shell commands. A shell simply allows a user to interact with the OS by running input commands that may result in outputs sent to the screen. By default, the Windows OS boots into its GUI, which is the color images you see and interact with on a regular basis. The Windows Start menu is a graphical element used to access additional programs and is in the lower left corner of the taskbar. Throughout the different versions of Windows, the Start menu may look different but its purpose and function are all the same.
The Windows OS has two different programs that can be used to access the shell (1) command prompt and (2) PowerShell. This course has been updated to use PowerShell but you may take a quick peek at command prompt and its functions by executing the following instructions:
cmd followed by the ↩ Enter key.echo "Hello World!" followed by the ↩ Enter key and you'll see the message appear on the screen.color 02 followed by the ↩ Enter key and see what happens to the console!title Hacker Console followed by the ↩ Enter key and look at the upper left corner of the window.Windows local user accounts are stored in the Security Account Manager (SAM) database located in C:\Windows\System32\config and password hashes stored in the system registry HKEY_LOCAL_MACHINE\SAM. The default administrator account for the Windows OS is called Administrator and comes standard when installing any Windows OS for the first time. Many systems come with default administrator accounts and it is vital that any default usernames and passwords are changed! The Windows Registry is a hierarchical database that contains configuration settings for the Windows OS, kernel, drivers, services, and programs that may store values that restrict access to kernel mode.
Why is your account not in the local users group on your computer? Because it's a Windows Active Directory (AD) account under the academy domain. In this case, your user account is an object located in AD and not the local system. All of the permissions and objects are stored on the AD server.
accounts configured for the system but student issued computers are part of a
Windows Active Directory domain, where your accounts are managed.
computer management followed by the ↩ Enter key.file explorer followed by the ↩ Enter key. Right click on This PC and select Show More Options, then Manage.There are several access control methods used in cyberspace to determine if a user has permissions to conduct certain actions on a system. Microsoft describes access control for Windows as the process of authorizing users, groups, and computers to access objects on the network or computer. Objects can be files, directories, user accounts, and more. To keep things simple, stick to files and directories in a file system. Some of the common permissions seen in Windows include:
PS C:\Users\m9999\Documents> icacls .\Nimitz.txt
.\Nimitz.txt NT AUTHORITY\SYSTEM:(I)(F)
BUILTIN\Administrators:(I)(F)
ACADEMY\m9999>:(I)(F)
Successfully processed 1 files; Failed processing 0 files
C:\Users\m999\Documents>Linux has a complicated history since its initial deviation from Unix, initially discussed in the Intro to Cyberspace Domain class. There have been hundreds of flavors, or distributions (distros), of Linux since its initial release in 1991. The common distributions today include Debian, RedHat, and FreeBSD. Ubuntu and Kali are additional distros of Debian, or Debian-based, while CentOS and Fedora are RedHat-based distros. These are just some of the maintained distros, with many more that are no longer supported and ended up fading away into history (i.e. not supported with updates to fix bugs or patches to fix vulnerabilities).
There are currently 10 official Ubuntu 'flavors' (distros) and 3 unofficial flavors as of Aug 2024. So distros can have distros that branch out into further specialized OSs. For example, Edubuntu was modified and designed to support preschool, primary, secondary and tertiary educational institutions; Lubuntu and Xubuntu are intended for use on less-powerful computers or those who seek a highly efficient desktop environment on faster systems; and Ubuntu Studio focuses on open-source applications for multimedia creation aimed at audio, video and graphic editors. The Linux workstations in our labs on campus all run Ubuntu Mate (pronounced "mah-tay").
As far as what's used here in , you'll become familiar with Ubuntu Server, which will run Apache to host your websites, and Kali, which will be leveraged to exploit internal systems to conduct cyber attacks, both of which are Ubuntu-based distros!
|
|
Is your smartphone a computer? Did you know that it requires an OS? Since we're on the topic of Linux, an iPhone is similar to OSX in that it's based on Darwin(BSD). When AndroidOS was developed in 2008, it deviated into its own distro to establish an Android Open Source Project (AOSP) platform based on a modified Linux kernel.
In order to access the Linux server, you'll need to remotely connect to the shell using an application called secure shell (ssh). Follow the steps below to use PowerShell to remotely connect to the server:
powershell followed by the ↩ Enter key.ssh m9999@ followed by the ↩ Enter key. Replace '9999' with your own alpha!yes followed by the ↩ Enter key.hostname to see the name of the computer you are connected to. If it returns with a value beginning with ward-rweb then you are connected to the remote system!uname -v and it should indicate that the OS is Ubuntu.exit.hostname and it should return your computer name similar to WK0XX0000SY0MID format, indicating that you are now back on the local shell.When connecting to a remote system, it's important to know what the logical connections look like when accessing physical networks. Below is a basic graphical depiction of the client (laptop) establishing a connection to the server for the remote shell session that was just conducted.
+--------+ +--------+ | Windows|---SSH--->| Linux | |(Laptop)| |(Server)| +--------+ +--------+Remotely accessing another computer doesn't seem any different than opening a shell on a local computer, so distinguishing differences by running commands like
hostname can help identify what system you're on. Using whoami (i.e. Who-am-I) may also identify the persona if you have to log into a system with a different username or account, such as the case for system administrators. Throughout this course, using two different OSs will help recognize what system you are working from but be sure to pay attention to what you are trying to do and where you need to do it!
The local Linux account database is stored in /etc/passwd, with passwords stored in /etc/shadow. The default administrator account on Unix-based systems, which includes Linux, is root. Remember, there is also the root directory in a file hierarchy but "root" is also a username on a Linux system. In a cybersecurity concept referred to as least privilege, never log into a system as root as there's a program called sudo, which stands for "superuser do," that enables users to run commands with escalated privileges.
Permissions in Linux are displayed using the shell when listing directory contents across ten characters in the format:
-rwxr-xr--
Directory. The first value will identify directories with d or files with a null value -.
Owner. The next three values represent owner permissions as r:read, w:write, and x:execute. In this example, the owner has all three permissions.
Group. Similar to owner, the middle three values represent group permissions, with r-x identified in the example. So the group has read and execute permissions.
Other. Everyone else that doesn't apply to the identified owner and group will fall into this category, with r-- defined, or only read permissions.
For no permissions, null values across the three read, write, execute will be displayed as ---.
So what do these permissions mean? For a file, read and write permissions are relatively straightforward, allowing you to read data from, or write data to, a file. Execute permission allows a user to execute a file, e.g., run it as a program.
For directories, read permission lets you read directory contents - e.g., list out files and subdirectories. Write permission allows you to create, delete, or rename files and subdirectoreis. Execute permissions allow you to access a directory, e.g., cd into the directory. However, there's actually a slight wrinkle to these last two - you need write and execute permission to modify directory contents, not just write permission. Interestingly, with write permission on a directory, you can actually delete a file within that directory, even if you have no permissions on the file itself.
Let's evaluate the console output example that was first shown in the File Systems and Hierarchies class:
m9999@ubuntu:~$ ls -l total 16901988 drwxr-xr-x 2 m9999 mids 4096 Feb 15 2023 Desktop drwxr-xr-x 6 m9999 mids 4096 May 12 18:07 Documents drwxr-xr-x 2 m9999 mids 4096 May 5 14:41 Downloads -rw-r--r-- 1 m9999 mids 276 Aug 16 2023 Class01.txt drwxr-xr-x 2 m9999 mids 4096 Feb 15 2023 Music drwxr-xr-x 2 m9999 mids 4096 Feb 15 2023 Pictures drwxr--r-- 4 m9999 mids 4096 Oct 4 2023 projects drwxr-xr-x 2 m9999 mids 4096 Feb 15 2023 Public drwxr-xr-x 12 m9999 mids 4096 Jul 23 14:43 public_html drwxr-xr-x 2 m9999 mids 4096 Feb 15 2023 Templates drwxr-xr-x 2 m9999 mids 4096 Feb 15 2023 Videos
The commands chown, chgrp, and chmod modifies file ownership for the owner and group and file permissions. Given the rwx format for file permissions, they can be specified using the letter or decimal format. For example, the command chmod 754 ./filename would change filename permissions for the owner to rwx, the group to r-x, and other to r--.
The long listing of the filename would look like: -rwxr-xr--
Breaking it down further:
| Owner | Group | Other | |
| Dec | 7 | 5 | 4 |
| Permissions | r | w | x | r | - | x | r | - | - |
| Bin | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 |
When working on the command line - also known as the shell, console, or terminal - you are greeted with a prompt. How the prompt displays (or whether it does at all) is usually configurable, but generally, the prompt will adjust as you move throughout the operating system, reflecting your current working directory. Immediately following the prompt is the command line.
On the command line there are commands, arguments, and options:
copy (the Windows command to copy a file) or mv (the Linux command to move a file). For instance, the grep command is used on Linux systems to search for a specific pattern within a file (or files).grep example, if the purpose of grep is to search for a pattern within a file, then you must provide it a pattern and a file! So you could run the command as grep "pattern" file.txt, which searches for the word pattern within file.txt. Here, we would say "pattern" and file.txt are the arguments to the grep command.-l option of the ls command provides the long listing format, instead of the regular output format. In the grep example, running grep -i "pattern" file.txt uses the -i option to make the search case insensitive. In other words, the search will now match words such as PATTERN, Pattern, and pAtTeRn, instead of just pattern.Remember that the syntax, performance, and output of commands may differ between operating systems. For instance, in Windows, the command cd (without any options or arguments) will simply print the current working directory, but in Linux, running cd without any options or arguments will move you back into your home folder. The screenshots below illustrate some of the concepts and terminology discussed above.
?