WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.200 --> 00:00:10.800
In this video, we'll take a look at exploiting vulnerable

1
00:00:10.800 --> 00:00:13.500
 machines such as Windows and Linux

2
00:00:13.500 --> 00:00:16.100
 space operating systems. So let's iPhone in

3
00:00:16.700 --> 00:00:20.100
firstly let's get started with compromising our

4
00:00:19.100 --> 00:00:21.500
 Linux virtual machine.

5
00:00:22.400 --> 00:00:25.700
To get started with this exercise, please. Enjoy your Carly

6
00:00:25.700 --> 00:00:30.100
 Linux virtual machine is already powered on and ensure

7
00:00:28.100 --> 00:00:31.500
 that your metasploitable to

8
00:00:31.500 --> 00:00:33.400
 virtual machine is Portal as well.

9
00:00:34.300 --> 00:00:38.100
So currently you can see my metasploitable 2 VM

10
00:00:37.100 --> 00:00:39.900
 is running in the background

11
00:00:40.500 --> 00:00:43.900
now let's open the terminal on Kali Linux

12
00:00:43.900 --> 00:00:44.300
 like so

13
00:00:45.300 --> 00:00:48.500
let's perform a ping scan to determine the

14
00:00:48.500 --> 00:00:51.500
 IP address of our Target system, which is

15
00:00:51.500 --> 00:00:55.200
 metasploitable too type and map Dash

16
00:00:54.200 --> 00:00:57.300
 SN like so this I

17
00:00:57.300 --> 00:01:00.900
 will scan our entire network again and we'll exclude

18
00:01:00.900 --> 00:01:02.300
 ourselves during the scan.

19
00:01:02.700 --> 00:01:05.900
We can see that our Target system, which is metasolito 2

20
00:01:05.900 --> 00:01:06.800
 is online.

21
00:01:07.700 --> 00:01:10.400
So let's copy this IP address and next.

22
00:01:10.400 --> 00:01:13.800
 Let's perform an nmap

23
00:01:13.800 --> 00:01:17.000
 scan to determine what services and ports

24
00:01:16.100 --> 00:01:18.000
 open on our Target.

25
00:01:19.100 --> 00:01:22.300
As you can see we perform a port scan on

26
00:01:22.300 --> 00:01:25.200
 our Target system and there are many open ports.

27
00:01:26.400 --> 00:01:28.900
We can even proof file the operating system.

28
00:01:29.900 --> 00:01:32.700
So let's type clear, press up a

29
00:01:32.700 --> 00:01:35.500
 few times and let's use a dash e

30
00:01:35.500 --> 00:01:39.000
 syntax. This will perform operating system

31
00:01:38.800 --> 00:01:42.000
 and even solution enumeration Force.

32
00:01:44.700 --> 00:01:47.500
Great softly a few seconds. The scan

33
00:01:47.500 --> 00:01:47.900
 was completed.

34
00:01:48.600 --> 00:01:49.800
Let's scroll back up.

35
00:01:50.700 --> 00:01:53.200
And here we can see while they are

36
00:01:53.200 --> 00:01:56.400
 open ports on the service will also able to get a

37
00:01:56.400 --> 00:01:57.000
 service version.

38
00:01:57.900 --> 00:02:00.200
We will also able to get a bali information

39
00:02:00.200 --> 00:02:03.700
 for various Network Services data running

40
00:02:03.700 --> 00:02:04.600
 on the target system.

41
00:02:11.700 --> 00:02:14.800
For instance. If you look at CPE it

42
00:02:14.800 --> 00:02:17.500
 says it is running illusion of Lennox

43
00:02:17.500 --> 00:02:19.600
 or a flavor of Lennox. So great.

44
00:02:20.300 --> 00:02:21.400
Let's scroll back up.

45
00:02:22.200 --> 00:02:25.400
And let's use this service version.

46
00:02:26.200 --> 00:02:26.900
So let's copy this.

47
00:02:30.800 --> 00:02:31.900
Let's head over to Google.

48
00:02:32.700 --> 00:02:36.200
Let's paste it and let's type vulnerability

49
00:02:35.200 --> 00:02:38.400
 like so so great.

50
00:02:40.600 --> 00:02:43.500
Currently we can see rapid 7 has this

51
00:02:43.500 --> 00:02:48.600
 close a vulnerability for V sftpd

52
00:02:46.600 --> 00:02:50.800
 version 2.3.4

53
00:02:49.800 --> 00:02:52.600
 with specifies some type

54
00:02:52.600 --> 00:02:55.700
 of back door command execution. Let's open

55
00:02:55.700 --> 00:02:55.800
 this.

56
00:03:00.100 --> 00:03:02.100
We can see when the information was closed.

57
00:03:02.800 --> 00:03:05.200
When it was created I can get

58
00:03:05.200 --> 00:03:08.400
 a full description on exactly what this

59
00:03:08.400 --> 00:03:11.800
 vulnerability does fuss. Screw. No

60
00:03:11.800 --> 00:03:14.600
 you want further we can even see how to

61
00:03:14.600 --> 00:03:17.500
 use the metasloid module to

62
00:03:17.500 --> 00:03:20.200
 compromise the target system. So now that we

63
00:03:20.200 --> 00:03:24.100
 Harvest information let's head over back to Kali Linux attempt

64
00:03:23.100 --> 00:03:25.600
 to exploit our Target system.

65
00:03:28.900 --> 00:03:31.500
Firstly let's type. Msf console like

66
00:03:31.500 --> 00:03:31.700
 so

67
00:03:35.400 --> 00:03:38.900
press enter and this will start up the Metasploit

68
00:03:38.900 --> 00:03:40.900
 exploitation development 3mucrose.

69
00:03:47.300 --> 00:03:47.700
Great.

70
00:03:49.300 --> 00:03:52.100
Since Maris Floyd has hundreds and even thousands of

71
00:03:52.100 --> 00:03:53.000
 different modules.

72
00:03:53.700 --> 00:03:57.100
It's kind of hard to go through each one individually. The

73
00:03:56.100 --> 00:03:59.800
 cool thing is Metasploit contains

74
00:03:59.800 --> 00:04:02.600
 a search feature. We can specify the

75
00:04:02.600 --> 00:04:04.900
 Search Command followed by the keyword.

76
00:04:05.600 --> 00:04:08.400
Let's use v sftpd as

77
00:04:08.400 --> 00:04:10.200
 our keyword and press enter.

78
00:04:10.900 --> 00:04:13.500
Currently we can see it already found a

79
00:04:13.500 --> 00:04:16.200
 match. This is an exploited module for you. Next

80
00:04:16.200 --> 00:04:19.500
 V systems that are running the FTP Service, but

81
00:04:19.500 --> 00:04:22.800
 specifically vs. Ftpd.

82
00:04:23.400 --> 00:04:26.200
We can see the disclosure date. The rank is

83
00:04:26.200 --> 00:04:28.700
 excellent and in a description.

84
00:04:29.600 --> 00:04:32.600
To use this module. Let's copy the

85
00:04:32.600 --> 00:04:33.500
 entire module name.

86
00:04:36.300 --> 00:04:39.200
Let's type use specified by the

87
00:04:39.200 --> 00:04:40.400
 module name like so

88
00:04:41.300 --> 00:04:44.200
now we can see our proper change a

89
00:04:44.200 --> 00:04:44.300
 little bit.

90
00:04:45.600 --> 00:04:48.700
If I type options we can see all

91
00:04:48.700 --> 00:04:51.200
 the required options that are needed to

92
00:04:51.200 --> 00:04:52.800
 ensure that this exploit.

93
00:04:53.600 --> 00:04:56.200
Is delivered successfully to the Target?

94
00:04:57.500 --> 00:05:00.800
Currently we can see the ruse is missing. There

95
00:05:00.800 --> 00:05:03.600
 isn't any settings here. So let's type set

96
00:05:03.600 --> 00:05:07.000
 are whose like so and specify

97
00:05:06.300 --> 00:05:09.100
 the IP address of our Target system?

98
00:05:12.600 --> 00:05:15.300
Great, let's type options one more

99
00:05:15.300 --> 00:05:15.400
 time.

100
00:05:16.100 --> 00:05:19.500
I can see now the target IP address is set.

101
00:05:20.500 --> 00:05:23.000
When you're ready simply type exploit.

102
00:05:23.900 --> 00:05:27.100
This will simply tile Metasploit to

103
00:05:26.100 --> 00:05:29.400
 push this exploit code to the

104
00:05:29.400 --> 00:05:32.700
 Target system, but specifically on the remote Port

105
00:05:32.700 --> 00:05:35.400
 21 and if successful we will

106
00:05:35.400 --> 00:05:37.200
 gain a bind shell.

107
00:05:38.300 --> 00:05:39.300
Let's see what happens.

108
00:05:42.700 --> 00:05:43.500
Are great.

109
00:05:44.400 --> 00:05:46.400
So it says it has found a shell.

110
00:05:47.700 --> 00:05:50.300
But we don't see anything up here

111
00:05:50.300 --> 00:05:53.600
 on the screen. However, we know is shallows created.

112
00:05:54.400 --> 00:05:56.300
But this type of Shadows are buying shell.

113
00:05:57.300 --> 00:06:00.200
So what can we do? Let's type. Who am I and see

114
00:06:00.200 --> 00:06:00.600
 what happens?

115
00:06:01.700 --> 00:06:04.300
Okay, we type. Who am I the result is

116
00:06:04.300 --> 00:06:04.500
 root?

117
00:06:06.400 --> 00:06:08.800
But we don't see the Linux command prompt.

118
00:06:09.300 --> 00:06:11.000
or the Linux terminal

119
00:06:11.600 --> 00:06:12.900
to get the Lennox

120
00:06:13.500 --> 00:06:16.400
terminal or let's see the command line

121
00:06:16.400 --> 00:06:20.300
 interface we can use the following python

122
00:06:19.300 --> 00:06:20.600
 code.

123
00:06:21.400 --> 00:06:22.300
Let's hit enter.

124
00:06:23.200 --> 00:06:26.700
And greet now. We have a sort of terminal like interface.

125
00:06:26.700 --> 00:06:29.200
 But any commander to enter here, it

126
00:06:29.200 --> 00:06:32.600
 will execute on the target system. So now

127
00:06:32.600 --> 00:06:35.200
 that we have compromised the metasploitable 2

128
00:06:35.200 --> 00:06:38.100
 Target system. We are going to take a look at

129
00:06:38.100 --> 00:06:41.400
 exploit and common security weaknesses found in

130
00:06:41.400 --> 00:06:44.500
 windows-based operating systems. So, let's Dive

131
00:06:44.500 --> 00:06:44.700
 In

132
00:06:45.600 --> 00:06:48.500
To get started. Please ensure your Kali Linux

133
00:06:48.500 --> 00:06:52.300
 virtual machine's powered on and ensure metasploitable

134
00:06:51.300 --> 00:06:54.200
 tree Windows Virtual Machine

135
00:06:54.200 --> 00:06:55.300
 is up and running.

136
00:06:56.300 --> 00:07:00.500
As you can see on my virtualbox manager metasploitable

137
00:06:59.500 --> 00:07:02.100
 tree Windows VM is

138
00:07:02.100 --> 00:07:04.300
 running in the background. Excellent.

139
00:07:05.100 --> 00:07:08.800
So now let's open the terminal on Kali

140
00:07:08.800 --> 00:07:09.700
 Linux like so

141
00:07:10.700 --> 00:07:13.300
and let's perform a pink scan to

142
00:07:13.300 --> 00:07:15.800
 the two men the IP address of our Target system.

143
00:07:20.800 --> 00:07:23.800
Which in a few seconds the scan will complete and provide

144
00:07:23.800 --> 00:07:25.700
 us with the IP address of our Target.

145
00:07:26.500 --> 00:07:30.700
Currently we can see our metasploitable tree windows-based

146
00:07:29.700 --> 00:07:32.500
 Target system. It has the

147
00:07:32.500 --> 00:07:36.600
 IP address of 172 tt1 TT. Simply

148
00:07:35.600 --> 00:07:37.800
 copy this IP address.

149
00:07:39.100 --> 00:07:42.800
Next let's actually perform some

150
00:07:42.800 --> 00:07:45.700
 end map vulnerability scanning

151
00:07:45.700 --> 00:07:48.700
 to determine if there's any sort of particular security weaknesses

152
00:07:48.700 --> 00:07:50.200
 found on this target.

153
00:07:56.500 --> 00:07:59.400
Let's perform a port scan using and map to

154
00:07:59.400 --> 00:08:02.500
 determine what a silver message block is running on

155
00:08:02.500 --> 00:08:03.500
 this target system.

156
00:08:04.100 --> 00:08:07.500
To perform the port scan simply use nma -

157
00:08:07.500 --> 00:08:10.600
 B and let's specify the various ports

158
00:08:10.600 --> 00:08:14.100
 for SMB which is Port 1 36 we

159
00:08:13.100 --> 00:08:16.500
 specify comma actually let's do

160
00:08:16.200 --> 00:08:19.300
 - 1 to 89

161
00:08:19.300 --> 00:08:23.200
 comma and Port 445 so

162
00:08:22.200 --> 00:08:26.100
 and maple simply scan Port 136

163
00:08:25.100 --> 00:08:28.100
 137. Wanted to eat

164
00:08:28.100 --> 00:08:31.400
 one 39. I got four four five on our

165
00:08:31.400 --> 00:08:31.800
 Target system.

166
00:08:32.600 --> 00:08:35.400
Specified IP address of the target system

167
00:08:35.400 --> 00:08:38.300
 like so and hit enter currently we can

168
00:08:38.300 --> 00:08:41.100
 see a few ports are close, but we have a couple of

169
00:08:41.100 --> 00:08:45.600
 ports that are open which is ports 1:39 and

170
00:08:44.600 --> 00:08:47.700
 Port 445. So

171
00:08:47.700 --> 00:08:51.500
 excellent. Now, let's use Metasploit to

172
00:08:50.500 --> 00:08:54.200
 perform a vulnerability scan

173
00:08:53.200 --> 00:08:55.300
 on the target system.

174
00:08:56.100 --> 00:09:00.000
So on your terminal simply type msf

175
00:08:59.800 --> 00:09:02.100
 console like so and press

176
00:09:02.100 --> 00:09:04.500
 enter to launch, Metasploit.

177
00:09:07.600 --> 00:09:10.600
Great once when exploit is running let's use

178
00:09:10.600 --> 00:09:13.300
 a switch command and let's search for

179
00:09:13.300 --> 00:09:17.000
 any modules that is related to ms-17 -

180
00:09:17.600 --> 00:09:20.300
 0 1 0 this is commonly known as a very

181
00:09:20.300 --> 00:09:23.300
 popular Eternal blue vulnerability that is

182
00:09:23.300 --> 00:09:26.600
 found within many Microsoft Windows base operating

183
00:09:26.600 --> 00:09:29.500
 systems, simply it enter and we

184
00:09:29.500 --> 00:09:32.700
 can see it found five modules a few

185
00:09:32.700 --> 00:09:35.400
 of these modules. I exploit modules and one

186
00:09:35.400 --> 00:09:39.100
 or two seems to be auxiliary scanners. Let's

187
00:09:38.100 --> 00:09:41.800
 firstly use an auxiliary scanner

188
00:09:41.800 --> 00:09:44.400
 to determine whether our Target system

189
00:09:44.400 --> 00:09:47.300
 is vulnerable or not to eat.

190
00:09:47.300 --> 00:09:48.900
 Tuna blue simply copy.

191
00:09:49.900 --> 00:09:53.500
auxiliary scanner SMB SMB

192
00:09:52.500 --> 00:09:56.000
 ms-17010 like

193
00:09:55.000 --> 00:09:56.200
 so

194
00:09:57.200 --> 00:10:00.400
Next let's type use followed by

195
00:10:00.400 --> 00:10:02.400
 the name of the entire module.

196
00:10:03.200 --> 00:10:07.100
Great, let's type options to see what options and

197
00:10:06.100 --> 00:10:07.800
 settings that we need.

198
00:10:08.900 --> 00:10:12.100
Currently we need to set our remote host

199
00:10:11.100 --> 00:10:14.000
 or our targets IP address.

200
00:10:16.200 --> 00:10:20.200
Since that in this portion of the video will be performing multiple

201
00:10:19.200 --> 00:10:22.700
 exploits on the same Target. Let's set

202
00:10:22.700 --> 00:10:25.300
 the target IP address using the

203
00:10:25.300 --> 00:10:28.400
 global command. Let's type set G and this

204
00:10:28.400 --> 00:10:31.500
 will allow my display to keep the

205
00:10:31.500 --> 00:10:34.400
 IP address that we set so we don't need to reconfigure it

206
00:10:34.400 --> 00:10:36.100
 for each module that we are going to use.

207
00:10:37.800 --> 00:10:40.600
Let's specify our host like so

208
00:10:40.600 --> 00:10:42.800
 let's specify the IP address.

209
00:10:46.800 --> 00:10:47.200
Great.

210
00:10:50.400 --> 00:10:53.100
When you're ready simply type run and hit

211
00:10:53.100 --> 00:10:53.300
 enter.

212
00:10:54.300 --> 00:10:57.900
And just like that within a few seconds metasploy tells

213
00:10:57.900 --> 00:11:00.900
 us. Hey, the who's is likely vulnerable

214
00:11:00.900 --> 00:11:04.300
 to ms-17010. Most importantly

215
00:11:04.300 --> 00:11:07.900
 the remote hosts is a Windows Server 2008

216
00:11:07.900 --> 00:11:10.800
 R2 standard and the bill

217
00:11:10.800 --> 00:11:13.300
 number is 7601 that is

218
00:11:13.300 --> 00:11:16.300
 running. So spark one and the architecture is

219
00:11:16.300 --> 00:11:19.900
 a 64-bit operating system. So great. We

220
00:11:19.900 --> 00:11:23.100
 have already found a security weakness within

221
00:11:22.100 --> 00:11:24.000
 the target system.

222
00:11:25.800 --> 00:11:26.900
Let's dive back.

223
00:11:28.400 --> 00:11:31.200
And now let's use day2inal blue

224
00:11:31.200 --> 00:11:32.500
 exploit module.

225
00:11:33.700 --> 00:11:35.900
Let's type use followed by

226
00:11:37.200 --> 00:11:42.200
exploit Windows SMB. Ms-17010 Eternal

227
00:11:41.200 --> 00:11:44.100
 blue like so and press enter.

228
00:11:44.700 --> 00:11:47.400
Create let's type options one more

229
00:11:47.400 --> 00:11:47.700
 time.

230
00:11:48.600 --> 00:11:49.200
I'm currently

231
00:11:50.100 --> 00:11:52.100
if I scroll up just a bit.

232
00:11:53.500 --> 00:11:56.900
We can see the target is already set. The

233
00:11:56.900 --> 00:11:58.800
 remote Port is automatically set.

234
00:11:59.600 --> 00:12:02.500
And most importantly it automatically set

235
00:12:02.500 --> 00:12:03.400
 a p load.

236
00:12:04.100 --> 00:12:08.100
So why do we need to copy peel with an exploit? They exploit

237
00:12:07.100 --> 00:12:10.700
 is simply the thing that we use to take

238
00:12:10.700 --> 00:12:13.800
 advantage of a security weakness. The peel load

239
00:12:13.800 --> 00:12:16.300
 is delivered after a system is

240
00:12:16.300 --> 00:12:19.100
 exploited. For instance. The exploit is

241
00:12:19.100 --> 00:12:22.500
 going to break into the Target and a p load is going to provide us

242
00:12:22.500 --> 00:12:25.800
 with a reverse shell connection from the target system

243
00:12:25.800 --> 00:12:28.400
 back onto our Kali Linux. Which one machine.

244
00:12:29.600 --> 00:12:29.800
Sounds great.

245
00:12:30.400 --> 00:12:33.700
And sure that your local whose IP

246
00:12:33.700 --> 00:12:36.800
 set correctly and this IP is IP address

247
00:12:36.800 --> 00:12:39.600
 of your Kali Linux virtual machine. If the

248
00:12:39.600 --> 00:12:42.800
 IP address is incorrect, you will not obtain

249
00:12:42.800 --> 00:12:43.700
 a review shell.

250
00:12:44.700 --> 00:12:47.600
Once everything seems accurate when

251
00:12:47.600 --> 00:12:50.300
 you're ready, simply type exploit like so

252
00:12:50.300 --> 00:12:51.500
 and hit enter.

253
00:12:52.400 --> 00:12:55.100
Currently we can see the exploit has been pushed to

254
00:12:55.100 --> 00:12:58.400
 the Target system and in just a few seconds. We'll see

255
00:12:58.400 --> 00:13:01.300
 the p-load is being pushed onto the target as

256
00:13:01.300 --> 00:13:03.500
 well and will obtain a review shell.

257
00:13:06.500 --> 00:13:10.100
And great guys. We have obtain a

258
00:13:09.100 --> 00:13:12.500
 meter session. In other

259
00:13:12.500 --> 00:13:14.800
 words. We have a review shell on a Target system.

260
00:13:15.600 --> 00:13:18.200
So what can we do? Well, we can do many

261
00:13:18.200 --> 00:13:22.100
 things. Let's type help to see what syntax

262
00:13:21.100 --> 00:13:24.200
 or what command so what we can actually

263
00:13:24.200 --> 00:13:26.800
 do while we have this review shell.

264
00:13:30.900 --> 00:13:33.000
Let's screw up just a little bit.

265
00:13:35.900 --> 00:13:38.200
Here, we

266
00:13:38.200 --> 00:13:41.400
 have a lot of core commands that you can execute and there's

267
00:13:41.400 --> 00:13:41.800
 a description.

268
00:13:42.600 --> 00:13:45.300
There are files to some commands that will allow

269
00:13:45.300 --> 00:13:49.100
 you to navigate the file system on the victim system. There's

270
00:13:48.100 --> 00:13:51.600
 some networking commands system commands.

271
00:13:51.600 --> 00:13:54.400
 There is some user interface commands.

272
00:13:54.400 --> 00:13:57.300
 You can even tune on awe calm and even

273
00:13:57.300 --> 00:14:00.400
 tune on the microphone on the target system. You can

274
00:14:00.400 --> 00:14:03.400
 even play all your files from Kali Linux and later

275
00:14:03.400 --> 00:14:06.800
 audio be output on the victim system. You

276
00:14:06.800 --> 00:14:09.700
 can escalate privileges you can retrieve the

277
00:14:09.700 --> 00:14:12.500
 sound file you can do so many things but let's

278
00:14:12.500 --> 00:14:16.100
 keep it simple. Let's type system full on

279
00:14:15.100 --> 00:14:18.300
 this very phies the information from the

280
00:14:18.300 --> 00:14:18.900
 target system.

281
00:14:19.800 --> 00:14:23.400
So this command was remotely executed in

282
00:14:22.400 --> 00:14:26.000
 the memory of the victim system and

283
00:14:25.500 --> 00:14:28.500
 it provides us telling us. Hey, the

284
00:14:28.500 --> 00:14:32.400
 target computer name is vagrant 2008 R2

285
00:14:31.400 --> 00:14:34.400
 the operating system. It's a Windows

286
00:14:34.400 --> 00:14:38.300
 2008 r2r operating system and a

287
00:14:37.300 --> 00:14:39.400
 lot more other details.

288
00:14:40.900 --> 00:14:43.900
So now that we have a first review Shell, let's

289
00:14:43.900 --> 00:14:46.100
 attempt to compromise on another

290
00:14:46.100 --> 00:14:49.300
 security flow within the same operating system.

291
00:14:49.300 --> 00:14:53.100
 So do we close this shell? Well,

292
00:14:52.100 --> 00:14:55.300
 we don't have to we could run it in

293
00:14:55.300 --> 00:14:58.500
 a background. Let's type background to send this

294
00:14:58.500 --> 00:14:59.500
 shell in the background.

295
00:15:00.900 --> 00:15:03.500
I'm currently we can see it is Mark

296
00:15:03.500 --> 00:15:05.700
 growing Session 1 let's say back.

297
00:15:07.900 --> 00:15:10.400
So, how could we interact with our

298
00:15:10.400 --> 00:15:13.300
 sessions? So how do we know if you have additional sessions running?

299
00:15:14.400 --> 00:15:17.400
We could simply type sessions like so and it

300
00:15:17.400 --> 00:15:18.200
 tells us a session ID.

301
00:15:19.300 --> 00:15:20.800
It tells us a type of session.

302
00:15:21.800 --> 00:15:24.600
It tells us information and the

303
00:15:24.600 --> 00:15:24.700
 connection.

304
00:15:26.100 --> 00:15:29.400
So for instance, we could type session like so -

305
00:15:29.400 --> 00:15:32.800
 I for interactive and type

306
00:15:32.800 --> 00:15:33.000
 1.

307
00:15:33.700 --> 00:15:36.800
And just light up we are now interacting with

308
00:15:36.800 --> 00:15:39.400
 our Session 1. Let's say background one more

309
00:15:39.400 --> 00:15:41.300
 time. So we will leave it in a background.

310
00:15:43.100 --> 00:15:46.000
Great. So now let's open another terminal.

311
00:15:47.400 --> 00:15:49.000
click on Terminal icon like so

312
00:15:54.200 --> 00:15:57.300
and let's perform another and map scan but

313
00:15:57.300 --> 00:15:58.000
 on the same Target.

314
00:15:59.200 --> 00:16:03.100
Let's determine if the windows Remote Management

315
00:16:02.100 --> 00:16:05.000
 Service is running on a Target

316
00:16:05.400 --> 00:16:07.700
 system. So that's the end map Dash p.

317
00:16:08.300 --> 00:16:11.600
and let's actually do Dash capital e

318
00:16:12.200 --> 00:16:16.100
Dash p dash pure specify ports Let's scan

319
00:16:15.100 --> 00:16:19.700
 for Port 5 9 8 5.

320
00:16:18.700 --> 00:16:21.400
 This is a default port

321
00:16:21.400 --> 00:16:25.000
 for the windows Remote Management Service on

322
00:16:24.300 --> 00:16:26.200
 Windows operating systems.

323
00:16:27.400 --> 00:16:30.000
Let's specify our Target IP address like so

324
00:16:30.800 --> 00:16:31.900
and press enter.

325
00:16:33.400 --> 00:16:36.700
This gun should take a few seconds to Pops

326
00:16:36.700 --> 00:16:37.700
 a minute to two to complete.

327
00:16:39.500 --> 00:16:42.600
Currently the scholars finish we can see the port is

328
00:16:42.600 --> 00:16:43.100
 open.

329
00:16:43.900 --> 00:16:46.400
We can see the service type is each

330
00:16:46.400 --> 00:16:49.500
 TDP and his running on Microsoft services.

331
00:16:49.500 --> 00:16:52.500
 So great. Let's attempt to

332
00:16:52.500 --> 00:16:53.200
 exploit.

333
00:16:54.600 --> 00:16:57.900
Or let's attempt to identify what it is a security weakness on

334
00:16:57.900 --> 00:16:59.600
 the service unexploited.

335
00:17:00.300 --> 00:17:03.200
So now let's head over back to Metasploit.

336
00:17:04.500 --> 00:17:05.500
And let's switch.

337
00:17:06.400 --> 00:17:09.400
For win RM or any

338
00:17:09.400 --> 00:17:11.200
 modules are contains when RM?

339
00:17:12.500 --> 00:17:15.900
And grid currently we have an auxiliary scanner, which

340
00:17:15.900 --> 00:17:18.400
 is auxiliary scanner when RM when

341
00:17:18.400 --> 00:17:21.000
 RM command. Let's copy that module.

342
00:17:27.600 --> 00:17:28.700
Let's type use.

343
00:17:29.600 --> 00:17:32.800
Now, let's specify the module like so and hit

344
00:17:32.800 --> 00:17:32.900
 enter.

345
00:17:33.800 --> 00:17:36.600
Let's type options to see what options are

346
00:17:36.600 --> 00:17:36.900
 needed.

347
00:17:37.700 --> 00:17:38.400
and currently

348
00:17:39.300 --> 00:17:44.300
this module will simply allow us to execute commands

349
00:17:43.300 --> 00:17:46.400
 or Windows vs commands on a

350
00:17:46.400 --> 00:17:46.600
 Target.

351
00:17:47.300 --> 00:17:49.900
For instance we could change this.

352
00:17:51.200 --> 00:17:54.100
Current setting here CMD and currently the

353
00:17:54.100 --> 00:17:57.400
 default is surrender ip config slash all command.

354
00:17:57.400 --> 00:18:00.500
 However, we need a specify the domain

355
00:18:00.500 --> 00:18:03.100
 if it is connected to our domain or not. We need

356
00:18:03.100 --> 00:18:07.000
 to specify a password on a username

357
00:18:06.100 --> 00:18:08.100
 to log into this system.

358
00:18:10.100 --> 00:18:11.200
Let's type set.

359
00:18:11.900 --> 00:18:14.400
Username like so let's specify the

360
00:18:14.400 --> 00:18:15.600
 username as administrator.

361
00:18:16.600 --> 00:18:18.500
Next let's specify the password.

362
00:18:20.100 --> 00:18:21.500
as vagrant

363
00:18:28.300 --> 00:18:29.000
like so

364
00:18:30.300 --> 00:18:33.700
Next let's specify the Target. And actually

365
00:18:33.700 --> 00:18:35.100
 the target is already set.

366
00:18:37.300 --> 00:18:40.100
When you're ready, let's type on and see what happens.

367
00:18:41.500 --> 00:18:43.100
And we got an error.

368
00:18:48.300 --> 00:18:51.400
Let's type options to determine if all our settings are

369
00:18:51.400 --> 00:18:52.300
 configured correctly.

370
00:18:53.600 --> 00:18:57.300
We have the command set the password the remote

371
00:18:56.300 --> 00:18:59.600
 targets IP address the port

372
00:18:59.600 --> 00:18:59.700
 number.

373
00:19:00.600 --> 00:19:02.500
And the username is already set.

374
00:19:04.200 --> 00:19:05.800
Let's type around one more time.

375
00:19:07.200 --> 00:19:09.300
And we seem to be getting some type of error.

376
00:19:10.200 --> 00:19:14.400
So the thing about break it into systems sometime

377
00:19:13.400 --> 00:19:16.400
 an exploit more you'll be me work

378
00:19:16.400 --> 00:19:20.300
 or it may not be so let's try another exploit

379
00:19:19.300 --> 00:19:22.500
 module for compromising the

380
00:19:22.500 --> 00:19:24.300
 win RM service.

381
00:19:25.400 --> 00:19:28.600
This time we are going to use an exploit module rather

382
00:19:28.600 --> 00:19:30.400
 than an auxiliary scanner.

383
00:19:31.200 --> 00:19:32.200
Let's type use.

384
00:19:33.100 --> 00:19:36.900
And let's use this particular module, which is exploit Windows

385
00:19:36.900 --> 00:19:40.200
 when RM service by running script

386
00:19:39.200 --> 00:19:42.100
 exec. Let's hit enter.

387
00:19:42.700 --> 00:19:43.800
to use this module

388
00:19:45.300 --> 00:19:48.400
Let's type options to see what options are

389
00:19:48.400 --> 00:19:50.600
 needed for this exploit module.

390
00:19:51.800 --> 00:19:53.400
Currently we need to set.

391
00:19:54.300 --> 00:19:58.400
The username on the password. However, the remote

392
00:19:57.400 --> 00:20:00.500
 host IP addresses are already set

393
00:20:00.500 --> 00:20:03.200
 and our local IP set

394
00:20:03.200 --> 00:20:07.500
 on the p-loot portion of the exploit

395
00:20:06.500 --> 00:20:07.900
 module.

396
00:20:09.200 --> 00:20:12.400
So let's set the username. Let's reset G.

397
00:20:14.900 --> 00:20:15.900
administrator like so

398
00:20:16.700 --> 00:20:18.100
and let's do such G.

399
00:20:19.200 --> 00:20:19.800
password

400
00:20:23.800 --> 00:20:26.000
and a password is vagrant.

401
00:20:27.200 --> 00:20:27.800
like so

402
00:20:29.200 --> 00:20:31.400
next let's do set.

403
00:20:32.900 --> 00:20:33.400
boss

404
00:20:34.700 --> 00:20:35.600
underscore

405
00:20:36.300 --> 00:20:37.300
VBS

406
00:20:38.200 --> 00:20:39.800
and set to true

407
00:20:42.800 --> 00:20:43.100
great.

408
00:20:45.600 --> 00:20:48.700
Let's type options one more time to determine or

409
00:20:48.700 --> 00:20:50.700
 if all of our settings are configured correctly.

410
00:20:51.500 --> 00:20:52.800
Or if we are missing anything.

411
00:20:59.300 --> 00:21:00.900
And everything seems to be in order.

412
00:21:01.500 --> 00:21:02.300
So excellent.

413
00:21:03.600 --> 00:21:05.400
When you're ready simply type exploit.

414
00:21:06.300 --> 00:21:07.100
and hit enter

415
00:21:10.400 --> 00:21:12.100
and it's seeing the username.

416
00:21:12.700 --> 00:21:14.600
Seems to have a validation problem.

417
00:21:18.800 --> 00:21:20.900
Ah, the username is not set.

418
00:21:22.300 --> 00:21:23.900
So let's do set.

419
00:21:27.400 --> 00:21:28.900
G username

420
00:21:32.300 --> 00:21:33.300
administrator

421
00:21:34.400 --> 00:21:35.000
like so

422
00:21:35.600 --> 00:21:38.500
Let's type options one more time to determine it

423
00:21:38.500 --> 00:21:41.200
 is set correctly and as you

424
00:21:41.200 --> 00:21:41.500
 can see.

425
00:21:45.200 --> 00:21:47.600
The username and password is set.

426
00:21:48.200 --> 00:21:48.600
Great.

427
00:21:49.500 --> 00:21:51.500
Let's type exploit once more.

428
00:21:52.600 --> 00:21:55.200
And now you can see it is pushing the P load

429
00:21:55.200 --> 00:21:58.400
 in various stages. And once this is complete we should

430
00:21:58.400 --> 00:22:01.800
 be able to get a second review shell from

431
00:22:01.800 --> 00:22:04.100
 the target system back to our machine.

432
00:22:06.800 --> 00:22:09.600
Currently we can see the stage is being set. The

433
00:22:09.600 --> 00:22:13.100
 p-load is being push. We have a methylpredo session

434
00:22:13.100 --> 00:22:14.900
 2 that is opened.

435
00:22:15.400 --> 00:22:18.200
from the target system back on to

436
00:22:18.200 --> 00:22:20.100
 our Kali Linux social machine

437
00:22:21.900 --> 00:22:24.500
and we have the metropital Shell. Let's type

438
00:22:24.500 --> 00:22:25.300
 this info.

439
00:22:25.800 --> 00:22:28.400
And we can see we are now connected to the

440
00:22:28.400 --> 00:22:31.900
 Target system. Excellent. Let's dive background.

441
00:22:33.100 --> 00:22:34.900
Let's type back once more.

442
00:22:36.100 --> 00:22:39.500
And now if you type sessions like so we have two

443
00:22:39.500 --> 00:22:43.200
 interactive session between our Kali

444
00:22:42.200 --> 00:22:45.100
 Linux solution machine on the target

445
00:22:45.100 --> 00:22:45.400
 system.

446
00:22:47.400 --> 00:22:50.400
In the previous section Section 3 exploring scannon on

447
00:22:50.400 --> 00:22:54.300
 enumeration. We took a look at performing monogramming

448
00:22:53.300 --> 00:22:56.500
 and finding security weaknesses in

449
00:22:56.500 --> 00:22:59.700
 Target systems using Boot and map are necess.

450
00:23:00.300 --> 00:23:03.400
The thing is before you can perform any sort of

451
00:23:03.400 --> 00:23:06.200
 exploitation. There's a lot of research that needs to go

452
00:23:06.200 --> 00:23:09.900
 into Finance security weaknesses and finding

453
00:23:09.900 --> 00:23:12.300
 we can exploits as you can see during this

454
00:23:12.300 --> 00:23:15.300
 video. Some of the exploits did not work

455
00:23:15.300 --> 00:23:18.600
 simply because perhaps a Target system is patch

456
00:23:18.600 --> 00:23:21.700
 and contains security fixes to prevent

457
00:23:21.700 --> 00:23:25.000
 those type of security attacks while exploits

458
00:23:24.400 --> 00:23:27.400
 me work on one system. It may not work on

459
00:23:27.400 --> 00:23:30.200
 another system. This is the thing about paying SRI

460
00:23:30.200 --> 00:23:34.300
 chantastic and ethical hacken. It takes a lot of dedication and

461
00:23:33.300 --> 00:23:36.500
 thinking outside the box to find

462
00:23:36.500 --> 00:23:39.900
 working exploits or you want to develop your own exploits

463
00:23:39.900 --> 00:23:41.800
 to break into Target systems.

464
00:23:42.700 --> 00:23:45.300
During the course of this video you have little

465
00:23:45.300 --> 00:23:48.400
 to use my display to exploit various security

466
00:23:48.400 --> 00:23:51.600
 weaknesses found in both Lennox and windows

467
00:23:51.600 --> 00:23:52.300
 B systems.

468
00:23:54.100 --> 00:23:57.800
In the next video, we'll take a dive into performing password base

469
00:23:57.800 --> 00:24:00.400
 attacks. I hope this video has been informative

470
00:24:00.400 --> 00:24:02.600
 for you and I will see you in the next one.
