Linux Permissions, Shells and Mobile Security

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with

Already have an account? Sign In »

1 hour 37 minutes
Video Transcription
Hello. My name is Isaac. Welcome to lean out security.
In the video, we will discuss linens, graceful showdown process and Lennox directories.
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.
Another method for powering down a leaner system utilizes the Lee nutshell.
Some of the shell commands for powering down the linear system are similar to Windows Command line instructions.
So both Lennox and Windows you, the shut down command and the prompt with a shutdown option used to specify to shut down process
Lena's commands. However, our case sensitive while Windows commands or not, case sensitive by default.
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.
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.
However, for Windows, the case of the shutdown options does not matter.
So working with Lennox and issuing commands at a shell prompt, one must always take note of the case sensitivity of linens operating system
Windows Shell can also be configured to be case sensitive. However, the default for Windows allows the use of both upper and lower case.
The renal shutdown Command uses the shutdown options time and message syntax.
The time is represented in minute format to specify the time in minutes or the hour and minutes format separated by Kahlan.
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
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.
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.
A plethora of shell commands can be executed at a prompt by typing out the appropriate command within the current directory
to view the current directory of the shell type P W D for print Working directory
to Traverse True Directories You the CD command followed by the directory path.
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
to stay in. The current directory used a CD command with a single dot.
The Hlynur shell is also able to run script by an interpreter language program,
so each line of a code is interpreted and executed as soon as you hit the enter key.
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.
So typically, a fightin script will be located in the bean python folder.
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
and he'd enter.
We're now in the Nano Tex Eggbeater where we can ride his bass script.
The script starts what is called a she bank.
The she bank tells the interpreter what to do with the script and the location where the script will be found.
So the hash function followed by the exclamation mark is a she bank at the start of the script.
Next in the Bean forward slash and Essays Command that opens the born again shell interpreter.
So we type in an operation to be performed here, using the Echo Command to output a line on the command line.
And here we want to print the statement. Hello, cyber reefer. Cyber security.
Now we can use the command
plus why? To save the script
in the current folder and then press enter to exit
that completes action to save our screw ts
To run discreet,
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.
So here we are with the list command to view all the permission settings
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.
So what to do? We use the change more command to set the permissions for the execute function.
By calling on the octo method offsetting permissions,
we can create permissions with several number variables. But simplicity here I will use the upto number 777 to change permissions.
So we applied the change mold 777 Cy Berry
tests have the S H command and and that says permissions for read, write and execute.
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.
The file structure of Lena's has a designated origin at the root directory.
The root directory is the highest level of privileged access a user can have.
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.
The root directory is represented with a forward slash
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.
For example, the private keys were on S symmetric encryption server or stored in the E. T. C directory.
This directory, primarily stores system security key, such as password hash, is secure sockets, layer keys and configuration files.
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.
Another example is the Being
Directory, which
is used for storing executable files that are compiled battery fouls.
So the being directory, it's the location for storing much of the operating system files, which are mostly executed. All files.
The directory reserved for storing user programs is the user directory.
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,
and the user man used to store documentation manuals of installed applications.
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.
The deaf older stores files that point to and interact with system hardware devices like hard disks, system chipsets and that work pores.
So here you find a location for storing system drivers.
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.
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,
being able to issue commands at root level provides the user with superior powers for controlling the entirely next machine.
So a security measure for Linux systems prevents regular users from having access to the root directory.
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.
When the pseudo command is issued, the system will prompt for an administrative password.
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.
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.
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.
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.
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
configure to operate at a grand, a little level,
meaning that only specially Groot level commands that have been allowed for the user can be executed
when issuing commands at the linens Prop. The history option allows a user to view previously issued commands in the shell session.
So with the history command, a user can easily retrieve
previously issued command and executed
when executing a previously issued pseudo command from the History command. The system will still require the user to type in the password again.
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.
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.
This way, the user will not have to type out the command all over a game.
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.
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
from which folder does the born again shell wrong?
being pearl, be user man. See Dean S H D live.
The correct answer is C The being
shh folder.
Which of the following is the root directory?
A slash Be flash home. See slash users Local deep slash temp. The correct answer is eight slash
flash is used to represent the root directory of a Linux operating system,
which Lennox Command shows you the current directory.
The correct answer is D
print Working Directory Command. PWD shows you the current directory that you're working on.
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