Instructor: Okay, now that we have our script ready, 2 2
in this lecture, I'm gonna show you how to compile it 3 3
to an executable and how to change its icon. 4 4
The script is written in a scripting language called AutoIt. 5 5
Now AutoIt doesn't come pre-installed in Kali 6 6
but it gets installed when you install Ville 7 7
and since we're using a Ville backdoor, then there's no way 8 8
you can be at this point without installing Ville, 9 9
that's why I'm not gonna cover how to install AutoIt 10 10
but you can literally just download it 11 11
and run the installer using line. 12 12
So AutoIt should be already installed for you by now 13 13
and now all we have to do is first rename this file 14 14
and change the extension from a .txt to a .au3. 15 15
Then, we're gonna go to All Programs and look for compile, 16 16
so I'm gonna type in compile in here and you'll see 17 17
that I have the application 18 18
that will compile AutoIT scripts for me. 19 19
So I'm gonna click on that 20 20
and this is very, very simple as you can see. 21 21
The first thing that it asks you for 22 22
is the source AutoIt script 23 23
and that's the file that we made. 24 24
So I'm just gonna click on Browse and you'd have to navigate 25 25
to downloads from here but I'm already in downloads 26 26
so I'm just gonna click on it and click on open. 27 27
You can also set where it's gonna be stored 28 28
but I'm just gonna keep it to be stored at the downloads. 29 29
And then you can see here, you can actually change the icon 30 30
and use a custom icon. 31 31
To do this, we'll have to first download an icon 32 32
that represents our file. 33 33
Now, if your file was a PDF, then you can just come 34 34
into this website which is called IconArchive 35 35
and then download, just look for a PDF or a mp3 36 36
and you'll see icons that represent these files. 37 37
However, in my case, I'm trying to use an image as the file 38 38
that the person sees and Windows usually shows a preview 39 39
of the image, it doesn't really show 40 40
a specific icon for images. 41 41
So what I wanna do is I wanna convert 42 42
the GT-R image to an icon and to do that, 43 43
I'm just gonna go to Google and just google image to ico. 44 44
Now I've actually tried a few of them and the best one 45 45
that preserve the quality was this one, RW Designer. 46 46
So you can try different ones on your own time 47 47
and what you wanna do now is download the image 48 48
that you want to make an icon of and in my case, 49 49
I want the same image that the person will see. 50 50
So I'm just gonna save it 51 51
and save it in the downloads, that's fine 52 52
and then in here, we're gonna go to Browse to select it 53 53
and we have the image here, double click 54 54
and then we're gonna keep this to icon 55 55
for Windows seven or Vista, that's fine 56 56
and I'm just gonna click on download. 57 57
This will convert it to an icon from here .ico. 58 58
So I can just click on OK to save it and then 59 59
I'm gonna go back to my compiler 60 60
and we're gonna set the option in here, the icon, 61 61
I'm gonna click on Browse and select the icon 62 62
that we just downloaded. 63 63
Now again, in your case, you might have to navigate 64 64
to root from here and then go to downloads 65 65
and then we have the icon in here, 66 66
the one that we just created. 67 67
I'm gonna click on open and that's it, 68 68
all the options are set. 69 69
So all we had to do for this is set the location 70 70
for the script and then set the icon in here. 71 71
I'm gonna click on convert 72 72
and that has generated the file for me. 73 73
Gonna click on OK and I'm just gonna close everything. 74 74
Now you can see we have the executable in here. 75 75
So this is a .exe and this one was the old script. 76 76
So when you're sending to the target, 77 77
you wanna be sending the exe, the executable here. 78 78
I'm just gonna rename this to gtr image 79 79
and then I'm gonna copy it and I'm gonna put it 80 80
in my web server at var/wwwhtml/evil-files/. 81 81
Before downloading this at the target computer, 82 82
you wanna listen for incoming connections from Metasploit 83 83
and I have showed you how to do that before. 84 84
So right now, I'm only gonna do show options 85 85
to show you the options that I have set 86 86
and if you don't remember how to do this, 87 87
then please go back to the listening 88 88
for incoming connections lecture 89 89
as I explained all of this in details. 90 90
For now, I'm only gonna do exploit 91 91
to wait for incoming connections. 92 92
Now everything is ready, I'm gonna go to the Windows machine 93 93
and download the file. 94 94
So the file is gonna be 95 95
at http//10.20.14.213/evil-files/gtr-image.exe. 96 96
I'm gonna hit enter and we're gonna save the file. 97 97
And as you can see, we see a file that has an icon, 98 98
that's an image icon which has a preview of the image 99 99
so it's very representative and if we double click this file 100 100
and run it, you see that we get an image that corresponds 101 101
to the icon but if we go to the Kali machine, 102 102
you'll see that we got a meterpreter session here 103 103
and basically now we hacked into the target computer 104 104
and we can do anything that we want there. 105 105
So just to confirm, I'm gonna sysinfo 106 106
and as you can see now, we're inside the target computer 107 107
and we have full access to it. 108 108
We managed to do this with a file that has an icon 109 109
of an image and actually displayed an image 110 110
to the target person. 111 111
And like I said, this method can be used to combine 112 112
our backdoor or evil file with any file that you want 113 113
with an image, with a PDF, with a song or anything 114 114
that the target person is interested in.