In this lesson, I want to discuss how to use Monkey to run a script.
Now, we've previously made a package in Monkey Package that laid down a payload and also would run
a script.
So if we use monkey package to create a package without a payload, but include a script, then we can
import that package into monkey.
A monkey will then run that script.
So what I want to do is you can see I have remote log in enabled.
And so here's a script basically to turn remote log off.
So I'm going to go ahead and just run that onto my machine.
And we could see that it's on.
And then I'm gonna go ahead and quit system preferences and go to sharing.
And we can see that it's now off.
Now, what I'm going to do is I want to build a package that basically has no payload but will turn
remote logging on with a script.
So I'm in a monkey package folder.
And we're gonna go ahead and take a look at our scripts.
And we have a post install script.
And you can see that basically I've got the same exact script, but I have it set to turn it on.
Now, if I go into my payload folder.
You can see that there is no files in it.
So basically when I go to my adult folder.
You can see that I have a package, but the package has no payload.
It just runs a script.
So I've gone ahead and I've imported that package onto my install share.
And basically I'm running a script like we've seen before, install or download, install in the week.
So let's go ahead and run that on our target machine.
OK.
And the install is successful.
And so I'm gonna go ahead and quit system preferences and then go back in.
And we can see that remote log in is turned on.
So if I import this package into monkey, that effectively monkey will be able to turn SSA John via
a script.