Hackers often need to move process, and an operating system like color is ideal for this.
The hackers maybe have a port scanner running while running a vulnerability scanner and an exploit similar
to the here.
So this requires that the hacker managed his processes efficiently to based your system resources and
complete the tasks.
In his lecture, you will show how to manage multiple processes.
So changing processes priority with nice.
You don't often hear the word nice used in the context of hackers, but there you will.
So the nice command is used to influence the privacy of persons to the kernel, as you saw when we ran
the P.S. command.
You're.
Yes, comment here.
Uh, numerous numerous businesses run on the system at once and um.
And all of them are contending for available the resources, the colonel will have a final say over
the priority of princesses.
But you can use the nice and nice to suggest that the princess should be evaluated in priority.
So the idea behind the use of the term nice is that when you use it, you are reminding how nice you
will be.
Others and users if you is using the most of the system resources, you know, and it's being very nice
device from nice range from minus twelve or twenty to plus nineteen.
So which are being the default value here?
Yeah, so.
So if.
Bold.
Zero, you.
So.
A high nice value translates to a low priority and a low nice value translates to high priority.
We are not being so nice to the users and other users and processes, so when a person is startled,
it inherits the nice value of its parent process.
So the owner of the process can lower the priority of the person but cannot incur its priority.
Of course, the super user route users can arbitrarily set a nice value, whether they please.
So when you start in process, you can set the priority level with a nice command and then after the
priority after the process has started running with the really nice comment.
Really nice.
Very nice.
Yeah.
So once absolute value for niceness.
So let's look at an example, demonstrate this.
So for demonstration purposes, let's assume we have a person's name, slow process that's located in
this scene at being slow process here.
So if you want it to speed up its completion, we called start the process with the nice command here
in nice minus and minus 10 being a slow process here.
We shall use of pseudo rights here.
And enter your password here.
So that personal such files.
Yes, because this is just an example here.
So the command will increment on nice value by minus 10, increasing its priority and allocating it
more resources.
On the other hand, we want if we want to be nice to our fellow users and profile cases and give slow
process and lower priority.
We called increment.
It's a nice value positively by 10.
Ten.
So give you this trial process you have currently training under John P is to see how it changed and
if Donald.
So Changi Airport, the training, the priority of running processes with three nice.
So.
The very nice command man takes absolute values between minus 20 and 19 and sets the priority to that
particular level, rather than increasing or decreasing from the level at which it started.
In addition, Regeni's requires the process I.D. of the persons you are targeting rather than the name.
So if the sort of person is using an inordinate amount of resources on your system and you want to give
it a lower priority, there's allowing the other processes in higher priority and more resources in
poultry.
Nice slow process, not by name, which is, for example, but the processing of, for example, six
nine nine nuts, for example, ranges 12 to six nine nine nine six, for example.
This is the process name, for example, but it's a six, nine and six.
So as with nice only the root user kind of arena as a process, as you can see, followed until you
get priority.
No such process here, but we can use.
So the simplicity of the search process here.
So actually, it's nice.
The only root user can realize a process to a negative value to give it a higher priority.
But any user can be nice and reduce it to a priority.
It's really nice.
So you can also use a top utility, uh, talking to a team, uh, to Chengdu.
Nice value with a top utility running simple press that are key here.
Uh, it's.
Let's run it again.
And simpler, simpler press that are key here.
And then, um.
Separately, the process idea.
Uh, and the nice value, for example, um, if I want to change society of Metasploit era supremacy,
there is a running.
Um, near.
Or just a, for example, sincere and nice with 12, when I settle into an integer because the nice
thing is maximum, very simple six, eight years.
So now I will show you the killing processes at times a process will consume way too many system resources,
except in usual behavior or at worse, freeze up.
A process that executes this type of behavior is often referred to as the zombie process.
So for you, you're probably the most problematic symptom that'll be waste, the resources used by the
zombie that caused but better allocated to use for persons.
When you identify a problematic process, you may want to stop it with the kill command.
Here there are many different ways to create a program, and each has its own fuel number.
So the kill command has six to four different signals.
So and each does something slightly different.
So, for example.
I want this here in Mouse Pad Notepad here, so cignal name, for example, I'm the most important signal
names.
So if you don't provide a signal for luck, it defaults if you don't provide proof of space or if you
don't provide a signal flight, it defaults to C term.
So we have a signal name, and I want created here so, so sick hump, for example.
So you can now name.
Name, uh, number or auction and description.
You're so sick up here, no of auction is one, so, uh.
And hand signal signal, so it stops the disc.
The signal, if the processes and the press starts to do with this same process idea restart.
Same process I did.
So it starts with the same society.
So we have segued into 30 years in an into interrupting, not the director and a number of options to
him.
So this is the interrupt single intel wrapped signal.
So it is a weak signal that it's current year to work, but it works in most cases.
We signal.
But what's actually?
The math works here, so we have a SIG.
Appear as number of option is three.
So this is known as the kurdum core number.
Here it is.
The processes and saves the process information in memory and then it saves this information in the
current working directory to a file named court.
Decisions for doing this are beyond the scope of this course, so but you will learn in later lectures.
And so we have a 10 here.
No of is 15, but this is determination and tender and termination signal.
Um, it will it.
Which is the cue in the phone signal signal.
Here.
It's.
Yes.
And last night, I want to show you, is he killed?
So he kill.
He's using no for option nine.
So this is the absolute kill signal.
So it forces the process to stop by sending the process resources to a special device, the not absolute
kill signal.
And, uh, so very serious here and now.
Using the top command, you can identify which processes are using too many resources.
Often this process is willing to give it and they get to it.
But there are.
I mean, there may be malicious processes taking these sources that you will want to kill here.
And let me look at our lecture time here.
So, uh, if you if you just want to restart the process with a whoop signal, enter the minus one option
with Q here, for example, peel minus one kill minus one.
Actually, let's use this kill Metasploit here.
Let's find this Pierce, Alex, here is the matters played here.
Metasploit, Metasploit, Metasploit.
And that's fine, that's great.
Here he is out here and grab a massive console here.
So the our society is one thousand nine hundred seven.
So we can kill it with that.
Actually, it's probably one thousand six hundred seventy one, so keel minus one, one thousand six
hundred seventy one.
So you can see here our Metasploit is killed.
Clearly, in the case of the zombie or malicious process, you likely want to send this clear signal
nine So this is this is the absolute kill signal, and it's very serious.
So with this kill minus nine and.
Process, name, process, idea.
Like that, but good morning, this one here.
So if you don't know the president's idea, you can use the kill all command killall command to kill
the processes.
This command takes the name of the process instead of the process idea as an argument.
For example, kill all minus nine.
Uh, zombie process.
That's not a racist font.
Uh, so finally, you can also terminate the process in the top comment here, simply press that key
card key and into the process.
I'd like that.
So I will, uh, cause this year so.
And we can run Linux.
Run in background of Linux as well here.
Uh, so.
Actually, how many minutes we have, so I have it and you will learn this in the next lecture.
So I'm waiting here in this lecture.