-: In addition to controlling the applications
being installed on a workstation,
administrators should ensure that only necessary services
that are needed to run are allowed to run.
Services are a type of application
that runs in the background of the operating system,
and it performs various functions like the print spooler.
Any services that are unneeded
should be disabled within the operating system.
In this lesson, I'm going to show you how
to disable services in Windows and in Mac OS X.
First, we're going to go into the Windows environment.
We're going to hit on the Windows key
in the corner, the start menu,
and we're going to type in services.msc and hit enter.
That's going to open up the services local connection.
You can see the name of the services down the left column,
a description of what they do,
the status if they're running or not,
what the startup type is,
whether it's manual, automatic, or disabled,
and how it's logged in.
What I'm going to look for here is the Windows Update service,
which is what provides our Windows patches.
If I scroll all the way down here, you'll see Windows Update.
And if I double-click on it,
you'll see it as currently running,
it is an automatic type of startup,
and this is used to detect, download,
and install updates for Windows and other programs.
If you're in a large enterprise environment, though,
we don't want to download our updates
directly from Windows and install it on the end points.
Instead, we want to push it out
through a patch management system.
So we're going to go ahead and turn off this service.
To do that, we're going to hit stop.
Now, when we stop, it's going to shut down that service,
and it did, but it's still set to automatically start up.
So, if I reboot this computer, that is going to start up again.
To prevent that, we can go to automatic
and turn it to disabled.
Go ahead and hit apply.
And now we have a service that is stopped and is disabled
and no longer is currently running.
This means that Windows Update will not work anymore
in the background because I've killed that service.
This is a useful thing,
because if you have a piece of malware
that installs itself as a service,
you can go in, find it, stop it,
and disable it to be able to remove it better.
We can do this same thing inside the command prompt.
To do that, just click on your Windows key
and type command prompt, or CMD.
From here, you can use sc,
which is to control it through the services,
stop, and the name.
For that program that we just stopped,
it is the wuauserv,
which is the name of the Windows Update program,
as you can see right here.
So, if I go back, if I hit enter, it would stop that service.
It won't do that right now because it's already stopped,
but that is the command that you would use.
Sc stop wuauserv.
The other way you can stop this in Windows
is using the net command.
And it's net stop and the name
of the service that you want to stop.
Again, net stop wuauserv,
or whatever the piece of malware
or other service is that you want to turn off.
Next, I'm going to show you how
you can do it in a Macintosh system.
To do that, you can go ahead and first
we're going to create something to kill.
So, I'm just going to create a Textpad,
and I'm going to call it kill this process when ready,
and that just gives me something
that I'm going to be able to kill.
Now, to find it, I'm going to go ahead
and use the Activity Monitor,
which is under your applications,
then go to utilities, and then Activity Monitor.
From here, I'm going to sort by process name and find TextEdit.
You can see all of these different services
that are running in the background.
Even though I only have three
or four programs actually running,
all of these background services are still running, too.
I can go ahead and find that,
and if I wanted to get rid of it,
I will just double-click on it.
You can see how much memory it's using,
any statistics about it,
what open files and ports are currently in use,
in this case, it's some hidden file
that it's saving for this,
as well as some configurations and logging.
And if I want to get rid of this,
all I have to do is hit quit.
It's going to ask me if I want to quit it cleanly,
like you normally would quit an application,
or force quit it, which terminates it immediately.
It doesn't save anything.
If this was a piece of malware,
that's exactly what I would want to do.
And I can go ahead and hit force quit,
and you'll notice it went away.
Next, I'm going to show you how
you can do this on a Linux system.
A Linux system and a Mac OS X system
actually share a lot of the same commands.
And in fact, this Linux command of kill and top
is going to be used both in a Mac OS X,
which is Unix-based, and Linux.
So, I'm going to go ahead and open up that TextEdit again,
just so I have a process to kill.
I'm then going to open up my command line,
which in a Mac or Linux terminal is called the terminal.
I'm going to bring this over to the left side.
And if I want to see what processes are currently running,
I can use the command top.
Top will show me what processes are currently running.
Processes are also known as services.
Now, we have 537 different processes running,
and we can go through here
and find which one we want to kill.
In this case, it's the TextEdit, and the process ID is 2513.
So, what I'm going to do is I'm going to quit out of that.
And to kill it, you just type in kill and the process ID,
2513, and watch on the right side as TextEdit goes away.
There you go, it's that simple.
Any time you have a piece of malware
or a service you want to kill on a Unix or a Linux system,
just type in kill PID, for process ID,
and the number that's associated with it.