Instructor: Okay, now that we have our script ready,
in this lecture, I'm gonna show you how to compile it
to an executable and how to change its icon.
The script is written in a scripting language called AutoIt.
Now AutoIt doesn't come pre-installed in Kali
but it gets installed when you install Ville
and since we're using a Ville backdoor, then there's no way
you can be at this point without installing Ville,
that's why I'm not gonna cover how to install AutoIt
but you can literally just download it
and run the installer using line.
So AutoIt should be already installed for you by now
and now all we have to do is first rename this file
and change the extension from a .txt to a .au3.
Then, we're gonna go to All Programs and look for compile,
so I'm gonna type in compile in here and you'll see
that I have the application
that will compile AutoIT scripts for me.
So I'm gonna click on that
and this is very, very simple as you can see.
The first thing that it asks you for
is the source AutoIt script
and that's the file that we made.
So I'm just gonna click on Browse and you'd have to navigate
to downloads from here but I'm already in downloads
so I'm just gonna click on it and click on open.
You can also set where it's gonna be stored
but I'm just gonna keep it to be stored at the downloads.
And then you can see here, you can actually change the icon
and use a custom icon.
To do this, we'll have to first download an icon
that represents our file.
Now, if your file was a PDF, then you can just come
into this website which is called IconArchive
and then download, just look for a PDF or a mp3
and you'll see icons that represent these files.
However, in my case, I'm trying to use an image as the file
that the person sees and Windows usually shows a preview
of the image, it doesn't really show
a specific icon for images.
So what I wanna do is I wanna convert
the GT-R image to an icon and to do that,
I'm just gonna go to Google and just google image to ico.
Now I've actually tried a few of them and the best one
that preserve the quality was this one, RW Designer.
So you can try different ones on your own time
and what you wanna do now is download the image
that you want to make an icon of and in my case,
I want the same image that the person will see.
So I'm just gonna save it
and save it in the downloads, that's fine
and then in here, we're gonna go to Browse to select it
and we have the image here, double click
and then we're gonna keep this to icon
for Windows seven or Vista, that's fine
and I'm just gonna click on download.
This will convert it to an icon from here .ico.
So I can just click on OK to save it and then
I'm gonna go back to my compiler
and we're gonna set the option in here, the icon,
I'm gonna click on Browse and select the icon
that we just downloaded.
Now again, in your case, you might have to navigate
to root from here and then go to downloads
and then we have the icon in here,
the one that we just created.
I'm gonna click on open and that's it,
all the options are set.
So all we had to do for this is set the location
for the script and then set the icon in here.
I'm gonna click on convert
and that has generated the file for me.
Gonna click on OK and I'm just gonna close everything.
Now you can see we have the executable in here.
So this is a .exe and this one was the old script.
So when you're sending to the target,
you wanna be sending the exe, the executable here.
I'm just gonna rename this to gtr image
and then I'm gonna copy it and I'm gonna put it
in my web server at var/wwwhtml/evil-files/.
Before downloading this at the target computer,
you wanna listen for incoming connections from Metasploit
and I have showed you how to do that before.
So right now, I'm only gonna do show options
to show you the options that I have set
and if you don't remember how to do this,
then please go back to the listening
for incoming connections lecture
as I explained all of this in details.
For now, I'm only gonna do exploit
to wait for incoming connections.
Now everything is ready, I'm gonna go to the Windows machine
and download the file.
So the file is gonna be
at http//10.20.14.213/evil-files/gtr-image.exe.
I'm gonna hit enter and we're gonna save the file.
And as you can see, we see a file that has an icon,
that's an image icon which has a preview of the image
so it's very representative and if we double click this file
and run it, you see that we get an image that corresponds
to the icon but if we go to the Kali machine,
you'll see that we got a meterpreter session here
and basically now we hacked into the target computer
and we can do anything that we want there.
So just to confirm, I'm gonna sysinfo
and as you can see now, we're inside the target computer
and we have full access to it.
We managed to do this with a file that has an icon
of an image and actually displayed an image
to the target person.
And like I said, this method can be used to combine
our backdoor or evil file with any file that you want
with an image, with a PDF, with a song or anything
that the target person is interested in.