Time
1 hour 37 minutes
Difficulty
Intermediate
CEU/CPE
2

Video Transcription

00:00
Hello. My name is Isaac. Welcome to lean out security.
00:04
In the video, we will discuss linens, graceful showdown process and Lennox directories.
00:11
Windows operating system users are familiar with the control. I'll delete command and some linens. Operating systems also used to control all delete command when powering down a system.
00:22
Another method for powering down a leaner system utilizes the Lee nutshell.
00:27
Some of the shell commands for powering down the linear system are similar to Windows Command line instructions.
00:34
So both Lennox and Windows you, the shut down command and the prompt with a shutdown option used to specify to shut down process
00:43
Lena's commands. However, our case sensitive while Windows commands or not, case sensitive by default.
00:51
So issuing the shut down command with a lower case R option at a shell will restart the system for boat windows and Linux shells.
01:00
But Leonard's being case sensitive the shot now commands with a P option will power off Alina system if the Letter P is in uppercase.
01:11
However, for Windows, the case of the shutdown options does not matter.
01:15
So working with Lennox and issuing commands at a shell prompt, one must always take note of the case sensitivity of linens operating system
01:23
Windows Shell can also be configured to be case sensitive. However, the default for Windows allows the use of both upper and lower case.
01:34
The renal shutdown Command uses the shutdown options time and message syntax.
01:41
The time is represented in minute format to specify the time in minutes or the hour and minutes format separated by Kahlan.
01:49
An optional message could also be supplied by the administrator that would be broadcast all loved in users off the system, so they will be notified few minutes before the system shuts down
02:01
running applications on a system or not shut down properly. The files may get corrupted, causing the system to become unstable. So it is important to properly shut down the systems either through the command shell or using the shot down options provided with the many off a graphical user interface.
02:22
Lena's commands are located in directories off the system file structure and the path to execute these commands can be accessed through the leaner shell.
02:30
A plethora of shell commands can be executed at a prompt by typing out the appropriate command within the current directory
02:38
to view the current directory of the shell type P W D for print Working directory
02:46
to Traverse True Directories You the CD command followed by the directory path.
02:52
So to go up one directory you the CD with two dots and to traverse to any other directory, use the CD command with the food paths to that directory
03:02
to stay in. The current directory used a CD command with a single dot.
03:09
The Hlynur shell is also able to run script by an interpreter language program,
03:15
so each line of a code is interpreted and executed as soon as you hit the enter key.
03:21
The python code is an example of interpretive scrip. They can be wrong on the linens command shell, just as it can also be interpreted by Windows Command line.
03:30
So typically, a fightin script will be located in the bean python folder.
03:38
So for an example here on the use of the script in shell for bash first we create a file using the Nano a teacher so at a command prompt with type nano and the file name cyber retest app that shh
03:53
and he'd enter.
03:58
We're now in the Nano Tex Eggbeater where we can ride his bass script.
04:02
The script starts what is called a she bank.
04:06
The she bank tells the interpreter what to do with the script and the location where the script will be found.
04:14
So the hash function followed by the exclamation mark is a she bank at the start of the script.
04:20
Next in the Bean forward slash and Essays Command that opens the born again shell interpreter.
04:29
So we type in an operation to be performed here, using the Echo Command to output a line on the command line.
04:35
And here we want to print the statement. Hello, cyber reefer. Cyber security.
04:41
Now we can use the command
04:44
plus why? To save the script
04:46
in the current folder and then press enter to exit
04:49
that completes action to save our screw ts
04:54
To run discreet,
04:55
we need to set the permissions for the execute beats and so we can run a list off the files in the current directory to view the permissions on the file we have just created.
05:05
So here we are with the list command to view all the permission settings
05:12
so we can see here that execute permission is not set. So if we try to run up here with the 0.4 slash and AB name. We see that permission is denied.
05:24
So what to do? We use the change more command to set the permissions for the execute function.
05:30
By calling on the octo method offsetting permissions,
05:33
we can create permissions with several number variables. But simplicity here I will use the upto number 777 to change permissions.
05:43
So we applied the change mold 777 Cy Berry
05:47
tests have the S H command and and that says permissions for read, write and execute.
05:54
So we run the commander gain and by issuing the 0.4 slash an apt name, which is the cyber retest up. That s H and we can see that the result is successful.
06:06
The file structure of Lena's has a designated origin at the root directory.
06:12
The root directory is the highest level of privileged access a user can have.
06:16
So the root directory of Elinor's file structure branches from the top down, creating a sub directory structure of folders on the need Eat with varying levels of access privilege.
06:28
The root directory is represented with a forward slash
06:30
the core structure off. The directory applies to every linens distribution, where every file directory and Alina structure is used to store specific data types.
06:42
For example, the private keys were on S symmetric encryption server or stored in the E. T. C directory.
06:47
This directory, primarily stores system security key, such as password hash, is secure sockets, layer keys and configuration files.
06:57
From a security perspective, the GTC folder must itself be kept very secure in order for the entire system to be secure. As honest arise, access to this folder could reveal sensitive security files that are used to protect the system.
07:12
Another example is the Being
07:14
Directory, which
07:15
is used for storing executable files that are compiled battery fouls.
07:20
So the being directory, it's the location for storing much of the operating system files, which are mostly executed. All files.
07:29
The directory reserved for storing user programs is the user directory.
07:34
This directory has many subdirectories for storing user specific dater like the user. Local used by system administrators for software installations use a live for storing library files used by executable programs during wrong time,
07:50
and the user man used to store documentation manuals of installed applications.
07:58
Other directories in the Lena's file structure all the Home Dev and Tempt Folders. The Home folder contains the personal directory for starring of the user's private and sensitive information.
08:11
The deaf older stores files that point to and interact with system hardware devices like hard disks, system chipsets and that work pores.
08:20
So here you find a location for storing system drivers.
08:26
That Step folder is used for storing temporary files used by applications. So being temporary, this folder content is usually wiped off after a system reboots, and therefore, users should normally not store very important files in this folder.
08:43
This folder is also often used by threat actors to store my words that can serve as a private for an initial attack. Because the default permission settings off the temp folder allows old users read and write access,
09:00
being able to issue commands at root level provides the user with superior powers for controlling the entirely next machine.
09:07
So a security measure for Linux systems prevents regular users from having access to the root directory.
09:13
However, some functions under linear system can only be run with root level permissions, so the Lunar X platform provides a method for users who are not at the roots to run root level commands, using the pseudo command to emulate the root level privileges.
09:30
When the pseudo command is issued, the system will prompt for an administrative password.
09:35
If the password is correct, then the user has five minutes to type in root level commands, after which it loves off from root level access.
09:46
These measures help prevent a situation where on administrator will have to love into the system route and leave it open for honor to rise persons to gain access.
09:58
So the administrator only elevates his privileges to root level when he needs to perform root level actions, after which the system reversed to a lower, privileged access region.
10:09
Issuing the pseudo command is an alternative to using the Sioux Command. The Sioux Command can also be applied to gain root access when the user is not loved in as route. This suit command prompts for a password before granting unlimited access to the user who from that point becomes a super user.
10:30
Attackers who gain access to a system at Super User can take full control of the system and cause harm. That is why the Sioux option is disabled by the fault and The pseudo command is used instead because pseudo times out after five minutes and it can be
10:48
configure to operate at a grand, a little level,
10:50
meaning that only specially Groot level commands that have been allowed for the user can be executed
10:58
when issuing commands at the linens Prop. The history option allows a user to view previously issued commands in the shell session.
11:07
So with the history command, a user can easily retrieve
11:11
previously issued command and executed
11:16
when executing a previously issued pseudo command from the History command. The system will still require the user to type in the password again.
11:24
So on Attacker who tries to use this history command to gain sudo access from previously issued pseudo commands, will not be able to gain access because the system will still request for the administrator password.
11:39
The history command lists the previously issued command in the shell session with a sequential number so the user can reference and call a command on the list by typing an exclamation mark, followed by a number corresponding to the command.
11:54
This way, the user will not have to type out the command all over a game.
12:00
So with a piping technique. The history can be viewed in successive windows by typing the pipe after the history command and then typing the last command after the pipe.
12:11
This will enable the user scroll down the successive windows, using the space bar to scroll down the window size and to scroll down by its line, using the enter key or down arrow keys. Here is a quick learning chick
12:26
from which folder does the born again shell wrong?
12:31
Hey,
12:33
being pearl, be user man. See Dean S H D live.
12:37
The correct answer is C The being
12:41
shh folder.
12:43
Which of the following is the root directory?
12:46
A slash Be flash home. See slash users Local deep slash temp. The correct answer is eight slash
12:56
flash is used to represent the root directory of a Linux operating system,
13:01
which Lennox Command shows you the current directory.
13:05
The correct answer is D
13:07
print Working Directory Command. PWD shows you the current directory that you're working on.
13:16
In this video, we discuss the directory structure of Lena. It's root level privilege and proper shutdown

Up Next

Linux Fundamentals for Security Practitioners

Linux Fundamentals for Security Practitioners provides an overview on how to properly configure a Linux OS to provide a secure computing environment for end users. We'll cover a combination of materials, focusing on Linux architecture, permissions, commands, directories, and shells to achieve a hardened Linux operating system configuration.

Instructed By

Instructor Profile Image
Isaac Bewarang
System Administrator at Plateau State University
Instructor