WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.200 --> 00:00:11.400
In this video, we will take a look at performing Network vulnerability

1
00:00:10.400 --> 00:00:13.100
 scanning using and map.

2
00:00:14.200 --> 00:00:15.300
So let's dive on in.

3
00:00:17.200 --> 00:00:20.300
This exercise, please ensure your Kali lyrics

4
00:00:20.300 --> 00:00:23.900
 virtual machine is booted and also power on

5
00:00:23.900 --> 00:00:26.600
 the metasploitable tree Windows Virtual

6
00:00:26.600 --> 00:00:26.900
 Machine.

7
00:00:27.900 --> 00:00:31.500
For instance. You can see my Metroid

8
00:00:30.500 --> 00:00:33.300
 will treat currently pulled off. I'm gonna

9
00:00:33.300 --> 00:00:36.400
 click Start but I'm going to start it in

10
00:00:36.400 --> 00:00:39.600
 the Headless seat. So therefore this virtual machine

11
00:00:39.600 --> 00:00:42.000
 will run in the background. Let's give this a few

12
00:00:42.300 --> 00:00:43.100
 seconds super on.

13
00:00:43.700 --> 00:00:46.700
CE this is powered on we'll perform in network

14
00:00:46.700 --> 00:00:49.100
 sweep to determine the IP address of this

15
00:00:49.100 --> 00:00:50.000
 virtual machine.

16
00:00:50.700 --> 00:00:53.000
Great. So now it's actually powered on

17
00:00:53.500 --> 00:00:55.500
 now back to my colleague switch on machine.

18
00:00:56.100 --> 00:00:59.900
I'm going to click on to two not like so could increase

19
00:00:59.900 --> 00:01:00.600
 the font size.

20
00:01:01.900 --> 00:01:05.000
And no, let's type and map

21
00:01:04.200 --> 00:01:06.900
 like so Dash SN.

22
00:01:07.700 --> 00:01:11.200
Followed by the network ID of the

23
00:01:10.200 --> 00:01:13.300
 pen test Network and we

24
00:01:13.300 --> 00:01:15.400
 can exclude our IP address from being scanned.

25
00:01:15.900 --> 00:01:18.300
But before we actually perform the scan.

26
00:01:19.200 --> 00:01:22.400
Let's type. I have config like Soo to get a IP address

27
00:01:22.400 --> 00:01:25.600
 of our Kali lungs virtual machine that is

28
00:01:25.600 --> 00:01:27.400
 connected to the pen test Network.

29
00:01:28.400 --> 00:01:31.400
As you can see my Kali lungs

30
00:01:31.400 --> 00:01:34.700
 virtual machine has a few adapters. There's a

31
00:01:34.700 --> 00:01:38.000
 easy zero which is connected to my physical Network and

32
00:01:37.100 --> 00:01:40.700
 then there's eth one which is connected a

33
00:01:40.700 --> 00:01:43.500
 pen test Network simply copy this IP

34
00:01:43.500 --> 00:01:46.400
 address like so you can double click right click

35
00:01:46.400 --> 00:01:48.100
 and even copy

36
00:01:48.900 --> 00:01:53.000
Next let's use and map-sn followed

37
00:01:52.100 --> 00:01:55.000
 by the network ID, which is 172.

38
00:01:55.600 --> 00:01:57.200
tt1.0

39
00:01:58.400 --> 00:02:01.800
/ 24 dash dash exclude

40
00:02:02.600 --> 00:02:05.600
and then specify the IP address of your Kali lungs

41
00:02:05.600 --> 00:02:05.700
 machine.

42
00:02:06.500 --> 00:02:10.000
This command or this entire syntax will

43
00:02:09.300 --> 00:02:12.400
 actually perform a pink sweep across

44
00:02:12.400 --> 00:02:16.000
 the entire network and tell us which virtual machines

45
00:02:15.500 --> 00:02:17.800
 or which machines actually on.

46
00:02:19.700 --> 00:02:22.800
And great. We can see that our Target machine, which

47
00:02:22.800 --> 00:02:26.000
 is a metasploitable 3 Windows Virtual

48
00:02:25.200 --> 00:02:30.300
 Machine has the IP address of 172301 the

49
00:02:29.300 --> 00:02:32.200
 TTT but how do we

50
00:02:32.200 --> 00:02:35.400
 know for sure. This will show machine has that IB address?

51
00:02:35.400 --> 00:02:37.000
 Let's copy that Target.

52
00:02:38.300 --> 00:02:41.500
let's do a map - capital o -

53
00:02:41.500 --> 00:02:44.400
 S capital V Dash o

54
00:02:44.400 --> 00:02:45.400
 will specify

55
00:02:46.300 --> 00:02:50.000
to scan for operating system enumeration Dash SV

56
00:02:49.200 --> 00:02:52.300
 will allow us to retrieve the

57
00:02:52.300 --> 00:02:55.100
 silver Solutions on Banner of the operating system.

58
00:02:55.900 --> 00:02:58.900
And then we can specify the IP address like so.

59
00:03:00.900 --> 00:03:01.300
however

60
00:03:04.800 --> 00:03:07.400
we can simply combine all of that by using

61
00:03:07.400 --> 00:03:08.200
 Dash e

62
00:03:08.900 --> 00:03:11.300
and let's copy the IP address one more

63
00:03:11.300 --> 00:03:11.400
 time.

64
00:03:12.100 --> 00:03:15.700
And this time let's face it in. The dash is in darks

65
00:03:15.700 --> 00:03:18.400
 will allow superform a couple of things. It will

66
00:03:18.400 --> 00:03:21.200
 allow us to perform serious version

67
00:03:21.200 --> 00:03:24.400
 enumeration such as biographing. It will also

68
00:03:24.400 --> 00:03:28.100
 allow us to D2 in operating system. It

69
00:03:27.100 --> 00:03:30.700
 will also perform basic SMB scanning

70
00:03:30.700 --> 00:03:33.900
 to get more familiar and map you could

71
00:03:33.900 --> 00:03:36.100
 type man and map like so

72
00:03:36.700 --> 00:03:39.400
Currently we can see the entire name the

73
00:03:39.400 --> 00:03:41.400
 description but most importantly.

74
00:03:43.400 --> 00:03:46.300
We can see examples on how to use and

75
00:03:46.300 --> 00:03:46.600
 map.

76
00:03:47.400 --> 00:03:50.100
For instance. We have the different options so we can

77
00:03:50.100 --> 00:03:53.400
 specify Target specifications. We have

78
00:03:53.400 --> 00:03:55.200
 various host discovery.

79
00:03:55.800 --> 00:03:58.300
And if you recall we did a dash S10, which

80
00:03:58.300 --> 00:03:59.500
 is a pink scan.

81
00:04:00.300 --> 00:04:03.200
But let's screw on you on Twitter. They are different type

82
00:04:03.200 --> 00:04:06.800
 of scaling techniques that we can use we can specify different

83
00:04:06.800 --> 00:04:07.700
 ports as well.

84
00:04:08.400 --> 00:04:11.700
There's a dash SV to proveful one

85
00:04:11.700 --> 00:04:14.600
 portion determine series version and version information.

86
00:04:15.900 --> 00:04:18.000
There's - o for operating system.

87
00:04:18.900 --> 00:04:21.600
However, we can use a dash capital

88
00:04:21.600 --> 00:04:22.000
 e

89
00:04:22.900 --> 00:04:25.400
Let's see where the dash capital is

90
00:04:25.400 --> 00:04:28.500
 located great. It's right here. So it

91
00:04:28.500 --> 00:04:31.800
 will enable operating system detection version detection

92
00:04:31.800 --> 00:04:34.400
 script scanning entries throat.

93
00:04:34.400 --> 00:04:36.700
 So simply by using one.

94
00:04:37.800 --> 00:04:40.700
Switch here or one syntax. We could

95
00:04:40.700 --> 00:04:43.100
 do multiple things going to

96
00:04:43.100 --> 00:04:46.700
 type Q to exit like so let's and I'll

97
00:04:46.700 --> 00:04:49.100
 come on one more time and map Dash e

98
00:04:49.900 --> 00:04:52.300
and let's do sudo just to be

99
00:04:52.300 --> 00:04:52.900
 on a safe side.

100
00:04:53.400 --> 00:04:56.700
Followed by the IP address of our Target. Let's hit

101
00:04:56.700 --> 00:04:56.700
 enter.

102
00:04:57.600 --> 00:05:01.000
Enter your Carly password and this

103
00:05:00.200 --> 00:05:03.600
 can should take a few seconds to Pops

104
00:05:03.600 --> 00:05:06.400
 a minute to two to complete. I'm going to pause the video

105
00:05:06.400 --> 00:05:09.100
 once this is completed. We'll continue onwards.

106
00:05:11.800 --> 00:05:14.600
The Scarlets finally completed now this

107
00:05:14.600 --> 00:05:17.400
 can't give us pretty much the same type of results that

108
00:05:17.400 --> 00:05:18.800
 we got in our previous videos.

109
00:05:19.500 --> 00:05:22.400
However, let's pay attention to something a bit specific.

110
00:05:25.500 --> 00:05:28.500
Let's look for any sort of indication of

111
00:05:28.500 --> 00:05:29.600
 an operating system.

112
00:05:30.600 --> 00:05:32.300
Under the vision column.

113
00:05:33.500 --> 00:05:36.600
And here we go, we can see Microsoft Windows

114
00:05:36.600 --> 00:05:40.000
 but specifically Port 445.

115
00:05:42.100 --> 00:05:46.000
And marvelously will see enumerate. It is running Windows to Tolson

116
00:05:45.300 --> 00:05:47.000
 8 R2.

117
00:05:47.800 --> 00:05:50.900
Standard we have the build number and

118
00:05:50.900 --> 00:05:53.400
 the series spark level. This is quite interesting.

119
00:05:54.600 --> 00:05:58.600
Now back in around 2015 and

120
00:05:58.600 --> 00:06:01.100
 2016. There was a

121
00:06:01.100 --> 00:06:04.500
 security vulnerability. That was well

122
00:06:04.500 --> 00:06:04.900
 known.

123
00:06:05.800 --> 00:06:08.700
within Microsoft operating system, and this

124
00:06:08.700 --> 00:06:11.300
 was called ms-17 -

125
00:06:11.300 --> 00:06:13.900
 0 1 0 like so

126
00:06:14.800 --> 00:06:17.100
and we can see the security bulletin information.

127
00:06:18.400 --> 00:06:20.500
Let's see the exact date. This was published.

128
00:06:22.600 --> 00:06:25.800
So according to the URL here, it shows

129
00:06:25.800 --> 00:06:28.000
 that it was published in 2017.

130
00:06:29.200 --> 00:06:32.800
And this security bulletin discussed that

131
00:06:32.800 --> 00:06:35.700
 is a vulnerable silver message block

132
00:06:35.700 --> 00:06:38.600
 version 1.1 silver is running

133
00:06:38.600 --> 00:06:42.200
 on Windows operating system. That is vulnerable.

134
00:06:43.300 --> 00:06:46.900
However, with this security flow it allows various

135
00:06:46.900 --> 00:06:49.600
 types of malware such as ransomware like

136
00:06:49.600 --> 00:06:53.200
 Wanna Cry and Peter the compromise any Windows

137
00:06:52.200 --> 00:06:55.600
 operating system that was found vulnerable with

138
00:06:55.600 --> 00:06:56.500
 a security flow.

139
00:06:58.600 --> 00:07:02.100
Let's perform a basic vulnerability

140
00:07:01.100 --> 00:07:05.100
 scan on the target system. Let's have

141
00:07:04.100 --> 00:07:05.600
 a back to Google.

142
00:07:06.500 --> 00:07:09.100
The end map tool contains something called the

143
00:07:09.100 --> 00:07:12.800
 end map scripting engine that's simply allows us a service

144
00:07:12.800 --> 00:07:15.700
 Security Professionals to use additional

145
00:07:15.700 --> 00:07:18.300
 capabilities with nmap by running

146
00:07:18.300 --> 00:07:21.200
 custom scripts that are designed to run within and map itself.

147
00:07:22.200 --> 00:07:25.500
We can simply search and map NSC script

148
00:07:25.500 --> 00:07:26.700
 list like so.

149
00:07:27.500 --> 00:07:30.200
And just scroll down a little bit.

150
00:07:31.400 --> 00:07:35.400
And we go to this link which is and map.org that

151
00:07:34.400 --> 00:07:37.500
 says NSC Docker reference

152
00:07:37.500 --> 00:07:39.500
 portal and a c script and map.

153
00:07:40.100 --> 00:07:41.600
simply click on the URL

154
00:07:42.100 --> 00:07:45.700
and this link is official website that

155
00:07:45.700 --> 00:07:48.200
 has all the scripts that can work

156
00:07:48.200 --> 00:07:52.500
 within a map. However, these scripts are already preloaded within

157
00:07:51.500 --> 00:07:54.300
 Kali Linux. Now this is a

158
00:07:54.300 --> 00:07:56.700
 lot of scripts to go through which is a lot, right?

159
00:07:57.400 --> 00:08:00.400
The cool thing about using the end map scripting engine

160
00:08:00.400 --> 00:08:03.800
 or better notice NSC is that they are categories

161
00:08:03.800 --> 00:08:06.200
 and depending on what you're trying to do. We can

162
00:08:06.200 --> 00:08:10.000
 use ews categories of filter or scripts. For

163
00:08:09.500 --> 00:08:13.300
 instance. We can simply click on view Ln

164
00:08:12.300 --> 00:08:15.400
 like so and this will show us a

165
00:08:15.400 --> 00:08:18.100
 list of vulnerable scripts that can be used

166
00:08:18.100 --> 00:08:21.500
 to test for various security flows within a

167
00:08:21.500 --> 00:08:23.700
 Target system by using the end map tool.

168
00:08:24.300 --> 00:08:28.000
Now, let's press Ctrl + F1 or keyboard. Let's

169
00:08:27.200 --> 00:08:30.800
 switch your ms-17 -

170
00:08:30.800 --> 00:08:33.900
 0 1 0 like so I'm

171
00:08:33.900 --> 00:08:36.700
 great here. We have found an SMB

172
00:08:36.700 --> 00:08:40.000
 script that will attempt to detect if a Microsoft

173
00:08:39.900 --> 00:08:42.600
 SMB version 1 server is

174
00:08:42.600 --> 00:08:44.900
 vulnerable to remove code execution.

175
00:08:46.100 --> 00:08:48.200
And this is better known as Eternal blue.

176
00:08:48.700 --> 00:08:52.000
The vulnerable tea is actively exploited

177
00:08:51.800 --> 00:08:54.300
 by Wanna Cry and Peter on somewhere

178
00:08:54.300 --> 00:08:55.300
 on other malware.

179
00:08:55.800 --> 00:08:58.400
So let's perform this vulnerable vulnerable

180
00:08:58.400 --> 00:08:59.000
 descan.

181
00:08:59.500 --> 00:09:02.000
To do so. Let's copy the name of

182
00:09:02.300 --> 00:09:03.500
 the script like so

183
00:09:04.500 --> 00:09:06.700
that let's head over back to our terminal.

184
00:09:07.500 --> 00:09:08.400
I'm going to clear the screen.

185
00:09:09.300 --> 00:09:10.600
And we'll type sudo.

186
00:09:11.700 --> 00:09:12.200
and map

187
00:09:13.700 --> 00:09:16.200
Dash p to specify the port and the

188
00:09:16.200 --> 00:09:19.600
 port is is 445 like so

189
00:09:20.300 --> 00:09:23.000
and type dash dash script

190
00:09:23.800 --> 00:09:24.500
equals

191
00:09:25.300 --> 00:09:28.500
the name of the script followed by the IEP address

192
00:09:28.500 --> 00:09:29.400
 of our Target

193
00:09:31.200 --> 00:09:34.400
I'm going to hit enter and this scan should not take too

194
00:09:34.400 --> 00:09:37.600
 long. The purpose of the syntax is

195
00:09:37.600 --> 00:09:39.200
 it tells nmap?

196
00:09:40.700 --> 00:09:43.200
Perform a port scan and determine of

197
00:09:43.200 --> 00:09:44.500
 Port 445 is open.

198
00:09:45.400 --> 00:09:48.200
Once it is open then execute a chord

199
00:09:48.200 --> 00:09:49.900
 within the script on our Target.

200
00:09:50.700 --> 00:09:53.500
Currently we can see it perform the port scan determine

201
00:09:53.500 --> 00:09:56.700
 the portrazoupon and now we can see it uses

202
00:09:56.700 --> 00:09:57.000
 script.

203
00:09:57.900 --> 00:10:00.700
It specified a type of security flow but

204
00:10:00.700 --> 00:10:03.300
 most importantly it tells us a steep what it

205
00:10:03.300 --> 00:10:07.000
 is vulnerable or not, and currently it is vulnerable.

206
00:10:06.800 --> 00:10:09.400
 Now, let's have a back to our

207
00:10:09.400 --> 00:10:10.000
 web browser.

208
00:10:10.700 --> 00:10:13.800
All of these scripts are really amazing and there's

209
00:10:13.800 --> 00:10:16.200
 so many different descriptions and there's so

210
00:10:16.200 --> 00:10:19.200
 many security flaws that we could test against a Target.

211
00:10:19.900 --> 00:10:22.400
However, executing all of these scripts one by

212
00:10:22.400 --> 00:10:24.000
 one takes a lot of time.

213
00:10:24.800 --> 00:10:27.300
So what we can do to actually speed up

214
00:10:27.300 --> 00:10:30.800
 this process is we can execute all

215
00:10:30.800 --> 00:10:33.400
 the scripts within the Vu Ln

216
00:10:33.400 --> 00:10:33.800
 category.

217
00:10:34.600 --> 00:10:37.200
One by one, but we can automate the process.

218
00:10:38.100 --> 00:10:41.300
So within the vuln category there's a

219
00:10:41.300 --> 00:10:42.000
 lot of scripts

220
00:10:42.600 --> 00:10:45.000
So let's head over back to our terminal.

221
00:10:45.600 --> 00:10:46.700
Let's clear the screen.

222
00:10:47.300 --> 00:10:50.200
And this time we're going to type sudo.

223
00:10:50.700 --> 00:10:51.300
and map

224
00:10:52.200 --> 00:10:54.100
we're gonna type - task script.

225
00:10:55.200 --> 00:10:55.800
like so

226
00:10:56.800 --> 00:10:58.300
and we could specify.

227
00:10:59.600 --> 00:11:02.300
The categories name we could

228
00:11:02.300 --> 00:11:05.300
 do this with the equal sign with all the equal sign. It's pretty much

229
00:11:05.300 --> 00:11:05.800
 the same.

230
00:11:06.400 --> 00:11:10.100
And next we can specify our Target IP

231
00:11:09.100 --> 00:11:12.900
 address, which is 172 tt1

232
00:11:12.900 --> 00:11:13.900
 the tte.

233
00:11:16.400 --> 00:11:19.400
However, keep in mind that your targets IP address

234
00:11:19.400 --> 00:11:22.200
 might be a little different from mines. This is why we need

235
00:11:22.200 --> 00:11:25.600
 to actually perform the pink scan before performing any

236
00:11:25.600 --> 00:11:28.300
 sort of attacks against this target.

237
00:11:29.100 --> 00:11:32.200
I'm gonna hit enter and this car will take some time to

238
00:11:32.200 --> 00:11:35.100
 complete. So in the meantime, I'm gonna pause the video

239
00:11:35.100 --> 00:11:38.400
 and we'll return when everything is completed.

240
00:11:40.300 --> 00:11:44.000
Great. So after a few minutes to scan completed and

241
00:11:43.900 --> 00:11:46.600
 at this point it actually run all

242
00:11:46.600 --> 00:11:49.300
 the vulnerability scripts that was found within the

243
00:11:49.300 --> 00:11:50.500
 vulnerability category.

244
00:11:51.200 --> 00:11:54.400
Currently we can see the full scripted use was to discover

245
00:11:54.400 --> 00:11:57.000
 some type of broadcasts that me would of course

246
00:11:57.600 --> 00:12:00.700
 18 out of service, but it says hey it's not

247
00:12:00.700 --> 00:12:03.500
 vulnerable and it could not detect any

248
00:12:03.500 --> 00:12:06.900
 sort of cross-site scripting security weaknesses.

249
00:12:06.900 --> 00:12:08.900
 That's cool down a little more.

250
00:12:10.500 --> 00:12:13.600
Another script that was used. This one

251
00:12:13.600 --> 00:12:15.600
 seems to determine.

252
00:12:16.500 --> 00:12:19.400
Whether it was evil to find

253
00:12:19.400 --> 00:12:22.200
 any sort of security weaknesses within a

254
00:12:22.200 --> 00:12:24.000
 deafy Hellman key exchange.

255
00:12:24.800 --> 00:12:27.000
a group shrink and currently

256
00:12:27.800 --> 00:12:30.400
it is vulnerable and you

257
00:12:30.400 --> 00:12:34.100
 can see the state and the description. So that's one

258
00:12:33.100 --> 00:12:37.100
 security flow. We are phone so far by executing

259
00:12:36.100 --> 00:12:39.500
 a group of scripts. Let's scroll down again.

260
00:12:40.700 --> 00:12:43.800
It was able to perform some enumeration some

261
00:12:43.800 --> 00:12:46.700
 each TDP are enumeration

262
00:12:46.700 --> 00:12:49.400
 and it seems a phone

263
00:12:49.400 --> 00:12:53.700
 a possible path traversal directory,

264
00:12:52.700 --> 00:12:54.700
 which is quite interesting.

265
00:12:55.700 --> 00:12:58.900
So while we are fine security weaknesses, we

266
00:12:58.900 --> 00:13:01.200
 also finding things that seems to

267
00:13:01.200 --> 00:13:04.900
 be peeking or interest that might be exploitable. So

268
00:13:04.900 --> 00:13:07.300
 we need to take note of all of these additional things.

269
00:13:09.900 --> 00:13:12.300
It did perform a scan using the

270
00:13:12.300 --> 00:13:15.900
 each TDP slow or

271
00:13:15.900 --> 00:13:18.500
 Shrek and we can see it is most likely

272
00:13:18.500 --> 00:13:19.600
 vulnerable.

273
00:13:20.600 --> 00:13:23.100
To a type of the nanosus attack. So that's

274
00:13:23.100 --> 00:13:24.900
 another security flow. We are found.

275
00:13:31.600 --> 00:13:35.300
There's another one that we found which is using SSL DH

276
00:13:34.300 --> 00:13:37.600
 parameters. And this

277
00:13:37.600 --> 00:13:40.300
 one is vulnerable. I think this one's

278
00:13:40.300 --> 00:13:43.500
 related to this only I found earlier which is

279
00:13:43.500 --> 00:13:46.800
 a difficulty exchange insufficient group

280
00:13:46.800 --> 00:13:49.600
 shrink because the description seems

281
00:13:49.600 --> 00:13:52.700
 to be the same. However, just found on a

282
00:13:52.700 --> 00:13:55.200
 different port. So perhaps you could

283
00:13:55.200 --> 00:13:58.300
 exploit the same system on two different

284
00:13:58.300 --> 00:14:01.000
 ports and set up multiple back to access.

285
00:14:04.500 --> 00:14:07.300
I look there's a two port with the same

286
00:14:07.300 --> 00:14:08.300
 security flow as well.

287
00:14:09.200 --> 00:14:10.400
That is exploitable.

288
00:14:13.800 --> 00:14:17.000
And last but not least. It's still discovered the

289
00:14:16.400 --> 00:14:20.500
 security flow on ms-17010, which

290
00:14:20.500 --> 00:14:21.500
 is eternal blue.

291
00:14:22.300 --> 00:14:25.200
So as you can see, we have found a few

292
00:14:25.200 --> 00:14:26.300
 security weaknesses.

293
00:14:27.200 --> 00:14:30.500
each of these and map tools that the most likely

294
00:14:30.500 --> 00:14:33.200
 or actually vulnerable the cool

295
00:14:33.200 --> 00:14:33.700
 thing is

296
00:14:35.100 --> 00:14:38.800
The security flows were fallen on multiple ports. That means

297
00:14:38.800 --> 00:14:41.300
 we could set up multiple back to access

298
00:14:41.300 --> 00:14:45.000
 so that we could have persistent access whenever

299
00:14:44.200 --> 00:14:47.300
 this vulnerable system is online.

300
00:14:48.400 --> 00:14:51.300
In this video we take a look at using and map to discover

301
00:14:51.300 --> 00:14:54.300
 security weaknesses on a Target system.

302
00:14:55.700 --> 00:14:59.400
In the next video, we will take a look at using nasus to

303
00:14:58.400 --> 00:15:01.700
 discover security weaknesses on

304
00:15:01.700 --> 00:15:04.300
 systems or any network. I hope this video

305
00:15:04.300 --> 00:15:07.100
 has one informative for you and I will see you in the next one.
