-: Now we're ready to receive connections 2 2
from our backdoor. 3 3
So we created the backdoor, we set payload, 4 4
and we're listening for incoming connections 5 5
here from any connection that comes in 6 6
from the same backdoor on the same port 7 7
on the same IP. 8 8
So now if a person runs that backdoor, 9 9
we'll receive the connection back in here 10 10
on this computer. 11 11
What we're gonna do now is we're gonna test 12 12
the backdoor to make sure that it works. 13 13
To do that, we're gonna use a very basic delivery method. 14 14
Later on in the course, we're gonna talk about 15 15
smart delivery methods that will trick the person 16 16
into opening the file that we're sending to them. 17 17
For now, we're just doing a very basic example 18 18
just to test our very basic backdoor. 19 19
So to do that, we're just gonna put the backdoor 20 20
on our web server and then download it 21 21
from the target computer. 22 22
So there is nothing smart about this 23 23
and you probably can't use this way to deliver 24 24
the backdoor to a real person. 25 25
So we're only doing this for testing 26 26
to make sure our backdoor works. 27 27
So Kali comes in with a web server 28 28
and what the means basically you can use Kali 29 29
as a website. 30 30
So what we're gonna do is we're gonna put that backdoor 31 31
in that website and then just download it 32 32
from the target window's machine. 33 33
Now the website directory, where you should 34 34
store the website's files, is var/www/html. 35 35
So I will show you what it is now 36 36
if we, if you just click in here 37 37
on the path and then put a forward slash, 38 38
it will allow you to manually type 39 39
the path that you want to go to. 40 40
So we want to go to var/www/html. 41 41
This is the location where the website files are stored. 42 42
Now for you, you'll probably only have index.html. 43 43
You won't have all of that stuff. 44 44
But that's just stuff that I created while I 45 45
was testing a few things. 46 46
So the index is the main page that people usually see 47 47
when they browse to this website. 48 48
So what I'm gonna do here is I'm gonna first of all 49 49
create a directory and I'm gonna call it "evil files." 50 50
So every time we create a backdoor or a key logger, 51 51
we're gonna put it in here and then download it in 52 52
the windows machine to test it. 53 53
And again, later on in the delivery method section, 54 54
we're gonna talk about smart delivery methods. 55 55
For now, we're only gonna be creating the evil files 56 56
and test them to make sure that they work as expected. 57 57
So I'm gonna call this directory "evil files." 58 58
And inside it, I'm gonna put the backdoor 59 59
that we created before. 60 60
So the backdoor that we created was made using veil evasion. 61 61
Veil evasion actually gave us the full path of it 62 62
when we created it, if you remember, or you can 63 63
go back now to the lecture and have a look on it. 64 64
So I'm just gonna press Ctrl+T to open a new tab 65 65
and then again I'm gonna click on the path in here 66 66
and I'm gonna put forward slash to manually enter the path 67 67
and then we're gonna go to var/lib/veil-evasion/ 68 68
output/compiled hit enter and you'll see 69 69
the backdoor that I created right here. 70 70
We named it rev https8080. 71 71
So I'm gonna copy this... 72 72
And paste it in here. 73 73
And that's it. 74 74
Now we can download this file from the website 75 75
that Kali uses, that Kali has. 76 76
Now to start the web server to start the website, 77 77
we have to start its service from the command prompt. 78 78
To do that, we're gonna do service apache2 start. 79 79
So the command is service to start the service, 80 80
apache2 is the name of the web server, 81 81
and then we want to start this web server. 82 82
I'm gonna hit enter and because we didn't get any errors, 83 83
that means the command got executed properly. 84 84
Now everything is done, so the IP of the Kali machine 85 85
was 10.20.14.213. 86 86
It's the same IP that we're listing here. 87 87
And it's the same IP that you'd get 88 88
if you're on ifconfig. 89 89
So I'm gonna go to my windows machine 90 90
and I'm gonna navigate to my IP address 91 91
of the Kali machine, which is 10.20.14.213. 92 92
This will open the basic index.html that I showed you 93 93
and it basically just says it works, 94 94
telling us that the web server is working 95 95
and the website is working. 96 96
This is all inside var/www/html. 97 97
So if I wanted to go to the directory 98 98
where we put the backdoor, 99 99
then we're just gonna go to evil-files. 100 100
Because we called it evil-files. 101 101
I'm gonna hit Enter and you can see the backdoor 102 102
that we created in the previous lecture 103 103
and we called it rev https 8080. 104 104
So if I click on that, it's gonna download it for me 105 105
and like I said before, this is not 106 106
the smartest way to deliver the backdoor 107 107
but right now all we want to do is just to test 108 108
the backdoor and make sure that it works. 109 109
So if I click on the downloads and run the backdoor, 110 110
it's gonna tell me that this is an executable, 111 111
so be careful when you run it, 112 112
but this is not detecting a virus. 113 113
It's literally just saying "be careful when you run EXEs." 114 114
I'm gonna run it anyway. 115 115
And once we come back here, you'll see 116 116
that we received a connection from the target machine. 117 117
So we didn't connect to the target computer, 118 118
the target computer connected back to us. 119 119
So you can see the IP of the target computer, 120 120
which is 10.20.14.206 and that IP connected 121 121
back to us on port 8080, right here. 122 122
So basically now we have full control over that computer. 123 123
Right here, you can see that we have meterpreter session. 124 124
What meterpreter allows us to do is literally 125 125
do anything that the user can do 126 126
on their computer. 127 127
So we'll see how we can use the meterpreter 128 128
later on in the post-connection attacks. 129 129
For now, we can see that the backdoor is working 130 130
and if we do sysinfo... 131 131
you can see 132 132
that we are inside the MSEDGEWIN10 machine. 133 133
It's a windows 10 right here, it's x64, 134 134
it uses English US, and it uses a meterpreter x86 135 135
for windows. 136 136
So as I said, now we can do anything we want on 137 137
the target machine and we'll talk about how 138 138
to use the meterpreter later on in 139 139
the post-connection section. 140 140
But again, basically right now, we hacked 141 141
the target computer and we have full control over it.