So in this lesson, we're going to talk about launch demons and how to create one, so a launch demon
is basically a program that runs in the background and you can think of it as like a Windows service,
or you can use it like a Windows startup script.
So let's go ahead.
And this is the terminal for the computer on the right.
So let's go ahead and go to a library, launch demons.
And we could see that there are some files in here.
And each of these are a separate represent a separate demon.
So if we go to VMware, then you can see that in this file.
That it launches VMware tools and so on this line over here, we have run it load set to true and we
have keep alive set the truth.
So when the computer starts up, it's going to run the VMware tools and it's going to keep it running.
And that means if it crashes, then it's going to go ahead and start it again.
Now, another one that we have is we've got a handful of these from Monkey.
And then if we go to the chuck.
Launch and then you can see here that we have this delay random set to one hour.
Now, we've mentioned before that monkey runs approximately every hour.
All right, so let's go ahead and create our own and what we're going to do is we're going to create
a startup script for the computer that will erase all of the profiles for users that are not administering
or share.
So we're going to do this by using monkey package.
And I've created a project called the Home Directory.
And then in the payloads library folder, you'll see that we have the launch demons folder like we showed
above and we have a scripts folder.
So let's go ahead and take a look at our launch team and file.
And what we're doing is we're going to be running a Shell script and this is the path to the Shell script
and we're going to run it at load.
So in other words, when the computer starts up and keep alive is set to false because we just want
it to run once.
All right.
So if we take a look at our script.
Then you'll see that we have the exact same code that we used in HD when we were discussing cleaning
up accounts, so this is the exact same code that we used.
All right, so let's go ahead and install the package, and I've already compiled and downloaded it
to this machine and it's in the user's download folder, so I'm going to go ahead and get route access
so I can go into the user mahavir download folder and we're going to go ahead and install it.
And now if we do a listing launch Demons folder now you can see that ours is on there.
All right.
So we have something in the downloads folder.
And so let's go ahead and put something on the desktop.
And let's go ahead and launch Safari and get a little history going.
All right, so we got two things in history, and then let's go ahead and put something in our users
home folder.
Now, I've already got it there.
OK, so we have something in the user's home folder.
All right, now let's go ahead and restart the computer.
And when we restart, then the they unfold there should be gone.
So I've been kicked out and so what I'm going to do is I'm going to try to log in as soon as we can
before the computer starts up so you can see how fast these scripts tend to run.
OK, just going to let me log in now.
And if I go to the users folder, you can see it's already gone.
All right.
So we'll go ahead and we'll wait for the computer to boot up so we can log in.
All right, so now that the computers boot up, let's go ahead and log in with our user.
OK, so we can see that our download folder is empty, our home folder, of course, is going to have
some items in our desktop folder is empty.
And we'll launch Safari and our history should be gone.
All right, so that's how you can create your own launch team and.
So other than a good visual representation of creating a startup script, would there be any purpose
in deleting profiles after a reboot?
Well, he managed computers in a public areas such as an Internet cafe, hotel or apartment business
center.
You could just have users log in with a guest account, which will do the same thing.
However, in a facility such as a school, you can have a handful of accounts, such as student instructor
that hundreds of users may use.
This reduces the county administration and password issues, but any personally identifiable information
would be stored on the machine.
If everything is erased after a reboot, then you can have anonymous accounts and allow personal information
to be kept private.
Now take the same school where every student instructor has an active directory account, and every
day these users log in to different machines.
After a time, there will be dozens of profiles stored on these machines.
With this system in place, they will all get erased after a reboot.
However, with the home folder available, users will have a place to store files on the server and
have access to those files from any machine.
A lot of schools use a product called Deep Freeze to address these issues, if you use this method instead
of deep freeze, you can keep monkey running in the back room to perform updates at any time and not
have to set up a maintenance window.
However, keep in mind that this system won't protect your system against viruses, malware or hackers.