WEBVTT - This file was automatically generated by VIMEO

0
00:00:08.700 --> 00:00:11.400
Hi, welcome back to Section 8

1
00:00:11.400 --> 00:00:12.900
 web application attack.

2
00:00:13.500 --> 00:00:17.300
In this video you are going to learn how to exploit cryptographic

3
00:00:16.300 --> 00:00:19.000
 failures with any web application.

4
00:00:20.500 --> 00:00:23.100
I hope you excited. So let's dive on and

5
00:00:24.400 --> 00:00:27.800
Cryptographic Filius on a web application simply defines

6
00:00:27.800 --> 00:00:30.200
 a security weaknesses the phone

7
00:00:30.200 --> 00:00:34.000
 with any web app that allows a traductor unethical hacker

8
00:00:33.200 --> 00:00:36.700
 or even a penetration tester to gain

9
00:00:36.700 --> 00:00:39.600
 or notice access to confidential data such

10
00:00:39.600 --> 00:00:43.000
 as users credentials data stored on

11
00:00:42.300 --> 00:00:45.500
 the silver or that is transmitted over Network.

12
00:00:46.200 --> 00:00:49.300
When deploying a web application It's always important

13
00:00:49.300 --> 00:00:52.300
 to ensure best practices are being used

14
00:00:52.300 --> 00:00:55.400
 and especially those practices are

15
00:00:55.400 --> 00:00:58.600
 focuses on cryptographic Solutions such as

16
00:00:58.600 --> 00:01:01.900
 whether you should use much more secure

17
00:01:01.900 --> 00:01:04.100
 encryption algorithms to ensure that

18
00:01:04.100 --> 00:01:07.400
 data motion data in rests and even data

19
00:01:07.400 --> 00:01:10.700
 in use are always kept safe from all authorized

20
00:01:10.700 --> 00:01:11.900
 users such as hackers.

21
00:01:12.600 --> 00:01:16.100
If a developer implements a web application using

22
00:01:15.100 --> 00:01:19.000
 a week or let's say an insecure

23
00:01:18.600 --> 00:01:21.700
 encryption algorithm the thread actor

24
00:01:21.700 --> 00:01:24.800
 can simply discover the type of encryption

25
00:01:24.800 --> 00:01:27.500
 algorithm being used and discover whether

26
00:01:27.500 --> 00:01:30.400
 there are any sort of security flows that exist

27
00:01:30.400 --> 00:01:32.000
 with encryption algorithm.

28
00:01:32.600 --> 00:01:35.400
Once a vulnerabilities found it is simply

29
00:01:35.400 --> 00:01:38.200
 matter of time for that security flow to

30
00:01:38.200 --> 00:01:41.700
 be exploited by a real hacker therefore as

31
00:01:41.700 --> 00:01:44.700
 an ethical hacker or a penetration tester. It's

32
00:01:44.700 --> 00:01:47.400
 really important to understand how to test for

33
00:01:47.400 --> 00:01:50.800
 cryptographic failures only web application as it

34
00:01:50.800 --> 00:01:53.600
 provides valuable skills and knowledge.

35
00:01:54.400 --> 00:01:57.500
To get started simply boot up your Kali Linux

36
00:01:57.500 --> 00:02:00.700
 virtual machine like so let's open the terminal.

37
00:02:01.400 --> 00:02:04.800
next we will actually execute the docker commands

38
00:02:04.800 --> 00:02:07.700
 to run the OS Juice

39
00:02:07.700 --> 00:02:08.200
 Shop like so

40
00:02:08.900 --> 00:02:11.300
simply it enter and this will take

41
00:02:11.300 --> 00:02:14.900
 a few seconds to complete and once it's listening we

42
00:02:14.900 --> 00:02:17.700
 can then proceed by opening our web browser

43
00:02:17.700 --> 00:02:18.100
 like so

44
00:02:19.800 --> 00:02:22.300
When you open the web browser, simply click

45
00:02:22.300 --> 00:02:25.900
 on a foxy proxy web application like so and ensure

46
00:02:25.900 --> 00:02:28.600
 that a proxy settings. It is currently tuned off

47
00:02:28.600 --> 00:02:31.400
 and it is using the default settings on

48
00:02:31.400 --> 00:02:32.100
 Firefox.

49
00:02:32.800 --> 00:02:35.400
For this exercise. We are not required to

50
00:02:35.400 --> 00:02:38.400
 intercept the communication between the web

51
00:02:38.400 --> 00:02:41.900
 browser and the actual web application

52
00:02:41.900 --> 00:02:42.400
 server.

53
00:02:43.500 --> 00:02:46.300
However, we do need to visit OAS to shop

54
00:02:46.300 --> 00:02:46.700
 like so.

55
00:02:47.400 --> 00:02:50.600
Once you are on Oasis shop, simply

56
00:02:50.600 --> 00:02:53.900
 click this side menu like so let's select

57
00:02:53.900 --> 00:02:54.600
 a scoreboard.

58
00:02:56.900 --> 00:02:59.700
Once you selected a scoreboard simply select

59
00:02:59.700 --> 00:03:02.500
 cryptographic issues. This will simply show

60
00:03:02.500 --> 00:03:05.100
 us all the challenges that are available that are

61
00:03:05.100 --> 00:03:09.700
 related to any sort of data encryption exercises. We

62
00:03:08.700 --> 00:03:11.800
 are going to solve this one, which

63
00:03:11.800 --> 00:03:14.500
 says nested e-stag.

64
00:03:15.200 --> 00:03:18.700
The description is apply some Advanced crypto

65
00:03:18.700 --> 00:03:21.600
 analysis techniques to find the real estate.

66
00:03:21.600 --> 00:03:24.200
 I can see that it is some more challenging for

67
00:03:24.200 --> 00:03:24.600
 us.

68
00:03:25.400 --> 00:03:28.000
Firstly let's try to find any sort of

69
00:03:28.500 --> 00:03:31.400
 hidden directories within our web application.

70
00:03:32.400 --> 00:03:33.100
If you recall.

71
00:03:33.900 --> 00:03:37.000
The URL it's the loopback IP

72
00:03:36.100 --> 00:03:41.200
 address of 127.0.0.1 followed

73
00:03:40.200 --> 00:03:43.300
 by the port number 3000.

74
00:03:44.600 --> 00:03:47.200
so let's minimize this and we can

75
00:03:47.200 --> 00:03:49.600
 open another terminal like so

76
00:03:51.700 --> 00:03:55.700
now we are going to use a tool called the dirb

77
00:03:54.700 --> 00:03:57.500
 derb allows us

78
00:03:57.500 --> 00:03:58.600
 to actually perform.

79
00:03:59.600 --> 00:04:02.800
Active scrolling on a particular website or

80
00:04:02.800 --> 00:04:05.400
 a URL with octave crawling we

81
00:04:05.400 --> 00:04:08.700
 can discover any sort of hidden directories on our

82
00:04:08.700 --> 00:04:11.600
 Target side to get started. We are going to use the

83
00:04:11.600 --> 00:04:14.100
 command dirb followed by

84
00:04:14.100 --> 00:04:18.200
 the URL as you can see. It is HTTP localhost

85
00:04:17.200 --> 00:04:20.700
 colon 3000. Are we

86
00:04:20.700 --> 00:04:23.500
 are going to specify you would list the word

87
00:04:23.500 --> 00:04:26.400
 lists. It's common that exe but it

88
00:04:26.400 --> 00:04:29.800
 is located in the user share with less slash turb

89
00:04:29.800 --> 00:04:32.400
 directory, then we'll specify

90
00:04:32.400 --> 00:04:35.500
 - common R to indicate to Durban

91
00:04:35.500 --> 00:04:38.800
 do not perform any weekly lookup and dash

92
00:04:38.800 --> 00:04:41.700
 capital and simply says to

93
00:04:41.700 --> 00:04:43.300
 ignore any responses.

94
00:04:44.400 --> 00:04:48.100
Well that has an HTTP code of 403 which

95
00:04:47.100 --> 00:04:49.000
 is forbidden.

96
00:04:50.500 --> 00:04:52.600
When you are ready simply hit enter.

97
00:04:53.700 --> 00:04:56.500
This research should take just a few minutes to complete

98
00:04:56.500 --> 00:04:59.800
 as you can see durb is actually testing each

99
00:04:59.800 --> 00:05:02.500
 word from the woodless against our Target.

100
00:05:03.400 --> 00:05:06.500
Currently it has identify that there's a hidden

101
00:05:06.500 --> 00:05:08.000
 URL which is slash assets.

102
00:05:09.200 --> 00:05:10.900
Let's see what else it will find.

103
00:05:14.300 --> 00:05:17.600
I'm going to moment early stop the scan and let's

104
00:05:17.600 --> 00:05:20.300
 take a look at some of these URLs that we have

105
00:05:20.300 --> 00:05:20.400
 found.

106
00:05:21.500 --> 00:05:25.700
Notice that it has found assets FTP profile

107
00:05:24.700 --> 00:05:28.100
 promotion redirect and

108
00:05:27.100 --> 00:05:29.800
 you want a robots.txt file.

109
00:05:30.700 --> 00:05:33.900
What we can do next is visit these directories manually.

110
00:05:34.800 --> 00:05:37.200
So let's head over back to our web browser like

111
00:05:37.200 --> 00:05:37.300
 so

112
00:05:38.300 --> 00:05:39.900
let's change these directories.

113
00:05:42.100 --> 00:05:45.700
The slash FTP URL usually this URL

114
00:05:45.700 --> 00:05:48.600
 or this location or paths directory will

115
00:05:48.600 --> 00:05:51.300
 contain some sensitive files or even

116
00:05:51.300 --> 00:05:53.000
 data. Let's see what exists

117
00:05:54.800 --> 00:05:57.900
and notice we have a lot of files that I

118
00:05:57.900 --> 00:05:58.200
 found here.

119
00:05:59.800 --> 00:06:02.200
We have an acquisition file. We have

120
00:06:02.200 --> 00:06:05.400
 an encrypted file and it seems to be that we

121
00:06:05.400 --> 00:06:07.200
 have the Easter egg file here.

122
00:06:08.700 --> 00:06:11.000
Firstly let's take a look at the acquisition plants.

123
00:06:11.600 --> 00:06:14.000
To do this. Let's click on the

124
00:06:14.800 --> 00:06:16.800
 acquisition dot MD file.

125
00:06:17.600 --> 00:06:20.300
This was simply allow us a download, but we

126
00:06:20.300 --> 00:06:24.100
 could download on even open with mouse pad.

127
00:06:24.500 --> 00:06:25.600
simply click on OK

128
00:06:27.300 --> 00:06:30.300
and notice we have obtained some type

129
00:06:30.300 --> 00:06:31.600
 of confidential data.

130
00:06:32.400 --> 00:06:35.800
It says our company plans to acquire several

131
00:06:35.800 --> 00:06:37.800
 competitors over the next few years.

132
00:06:38.600 --> 00:06:39.600
This is quite interesting.

133
00:06:41.300 --> 00:06:44.900
So as you have seen we are able to find a hidden directory and

134
00:06:44.900 --> 00:06:47.300
 we're able to actually look into the

135
00:06:47.300 --> 00:06:48.300
 contents of these files.

136
00:06:49.300 --> 00:06:51.600
But let's try to solve the e-cig.

137
00:06:53.100 --> 00:06:56.300
If we were to download the e-cig file, which is

138
00:06:56.300 --> 00:06:59.100
 a GG file, we may not be able to

139
00:06:59.100 --> 00:07:00.300
 actually read the contents.

140
00:07:01.400 --> 00:07:02.800
So let's try something unique.

141
00:07:03.500 --> 00:07:05.900
Let's right click on the Easter egg file like so

142
00:07:06.400 --> 00:07:07.800
let's copy link.

143
00:07:08.700 --> 00:07:10.500
We'll open a new tab like so

144
00:07:11.100 --> 00:07:12.300
and PC URL

145
00:07:12.800 --> 00:07:15.000
However, let's make it modification.

146
00:07:16.800 --> 00:07:19.400
To be able to read the contents of this file. We

147
00:07:19.400 --> 00:07:22.400
 need to convert it into a DOT MD file.

148
00:07:23.300 --> 00:07:28.400
To do this. Let's type percent to 500

149
00:07:26.400 --> 00:07:30.800
 dot MD.

150
00:07:31.800 --> 00:07:33.100
Now let's hit enter.

151
00:07:34.200 --> 00:07:36.700
And here we can see we can download the file.

152
00:07:37.300 --> 00:07:40.200
So let's actually see if the files list. Let's click on

153
00:07:40.200 --> 00:07:40.500
 OK.

154
00:07:41.200 --> 00:07:43.900
The file should be saved within our downloads. Hula.

155
00:07:46.600 --> 00:07:49.400
As you can see we have the e-cig file

156
00:07:49.400 --> 00:07:50.600
 that we have downloaded.

157
00:07:53.100 --> 00:07:55.900
Let's right click. Let's open with model spot.

158
00:07:57.700 --> 00:08:00.900
And notice we have found the seg, but

159
00:08:00.900 --> 00:08:03.400
 this isn't all we actually have found

160
00:08:03.400 --> 00:08:06.900
 some type of cryptographic message like

161
00:08:06.900 --> 00:08:07.100
 this.

162
00:08:08.500 --> 00:08:11.600
So what should we do? Well, definitely we have found

163
00:08:11.600 --> 00:08:14.400
 these egg, but we need to solve line 12

164
00:08:14.400 --> 00:08:17.600
 since line 12 ends with these two

165
00:08:17.600 --> 00:08:20.500
 equal sign. This indicates that line

166
00:08:20.500 --> 00:08:23.900
 12 is actually a b64

167
00:08:23.900 --> 00:08:24.400
 encoding

168
00:08:25.100 --> 00:08:26.800
so we can simply decode it.

169
00:08:27.700 --> 00:08:30.300
Let's copy the entire line 12 like so

170
00:08:30.300 --> 00:08:34.600
 and we can head over to both sweep has

171
00:08:33.600 --> 00:08:35.200
 a decoder.

172
00:08:35.900 --> 00:08:37.400
simply open boob Suite

173
00:08:37.900 --> 00:08:39.400
let's click on decoder.

174
00:08:40.300 --> 00:08:44.000
like so we can paste the message like

175
00:08:43.000 --> 00:08:44.500
 so

176
00:08:45.200 --> 00:08:45.900
And great.

177
00:08:46.800 --> 00:08:48.200
Once you have peace a message.

178
00:08:49.200 --> 00:08:50.300
The next thing we need to do.

179
00:08:51.200 --> 00:08:54.500
Is we set the code value as b64?

180
00:08:55.500 --> 00:08:58.600
To decode this simply click the code as

181
00:08:58.600 --> 00:09:01.000
 like so and select b64.

182
00:09:01.700 --> 00:09:04.400
And if you look closely it has converted it.

183
00:09:05.400 --> 00:09:05.800
However

184
00:09:07.300 --> 00:09:10.600
The result looks like some type of URL

185
00:09:10.600 --> 00:09:13.600
 or an extension or a path to a web

186
00:09:13.600 --> 00:09:13.800
 address.

187
00:09:14.700 --> 00:09:17.100
But this web address seems to look a bit unusual.

188
00:09:18.600 --> 00:09:21.100
What we can do next is that we can try

189
00:09:21.100 --> 00:09:22.600
 to decipher.

190
00:09:23.400 --> 00:09:24.400
this URL

191
00:09:24.900 --> 00:09:25.400
to do this

192
00:09:27.300 --> 00:09:30.500
Let's copy this and save this within our

193
00:09:30.500 --> 00:09:30.700
 clipboard.

194
00:09:31.800 --> 00:09:33.800
Let's open a new terminal like so

195
00:09:34.700 --> 00:09:36.900
we need to download a very important tool.

196
00:09:38.200 --> 00:09:39.100
Which is called who?

197
00:09:40.200 --> 00:09:43.100
So we'll type sudo up update like

198
00:09:43.100 --> 00:09:43.200
 so.

199
00:09:44.200 --> 00:09:46.300
to update our packages Repository

200
00:09:49.100 --> 00:09:49.700
great.

201
00:09:50.900 --> 00:09:53.900
Next let's type sudo up install

202
00:09:53.900 --> 00:09:54.900
 who?

203
00:09:56.600 --> 00:09:59.400
I actually spell installing correctly. So let

204
00:09:59.400 --> 00:10:00.000
 me fix that.

205
00:10:02.500 --> 00:10:04.600
Great, so who is actually installed?

206
00:10:05.500 --> 00:10:07.600
Let's execute it and see what happens.

207
00:10:12.500 --> 00:10:15.200
To put simply who allows us to actually

208
00:10:15.200 --> 00:10:18.300
 perform raw to 18 decoding on other

209
00:10:18.300 --> 00:10:21.400
 various types of decoding as well. For instance. We

210
00:10:21.400 --> 00:10:25.700
 could have used Hull to actually decode the b64 message

211
00:10:24.700 --> 00:10:27.100
 actually got the result.

212
00:10:28.700 --> 00:10:30.700
To use who let's type each.

213
00:10:32.200 --> 00:10:33.000
URL

214
00:10:35.300 --> 00:10:36.800
Like so Dash it.

215
00:10:38.700 --> 00:10:41.500
followed by open quotations Mark like

216
00:10:41.500 --> 00:10:41.900
 so

217
00:10:42.900 --> 00:10:46.000
and we'll specify the actual message

218
00:10:45.400 --> 00:10:47.100
 that we want to decode.

219
00:10:47.600 --> 00:10:50.500
followed by a close quotation marks like

220
00:10:50.500 --> 00:10:50.800
 so

221
00:10:52.500 --> 00:10:54.500
when you're ready simply enter.

222
00:10:56.400 --> 00:11:00.200
And notice the original string didn't me too much sense, but

223
00:10:59.200 --> 00:11:02.100
 now the corded string.

224
00:11:02.700 --> 00:11:05.700
Is telling us hey, we actually have

225
00:11:05.700 --> 00:11:08.500
 a URL. So let's copy this

226
00:11:08.500 --> 00:11:09.700
 like so.

227
00:11:10.600 --> 00:11:12.800
We'll head over back to our web browser.

228
00:11:14.100 --> 00:11:17.500
and let's enter this new URL or

229
00:11:17.500 --> 00:11:18.900
 this part like so

230
00:11:20.100 --> 00:11:22.100
when you're ready simply hit enter.

231
00:11:24.300 --> 00:11:25.100
And great.

232
00:11:26.300 --> 00:11:29.500
We have solved the challenge and found the e-cig.

233
00:11:30.900 --> 00:11:33.700
Let's head over back to our main directory on

234
00:11:33.700 --> 00:11:34.400
 wasp.

235
00:11:36.100 --> 00:11:39.500
Great, we all solve multiple challenges. But a

236
00:11:39.500 --> 00:11:43.600
 mean one that we wanted to solve was cryptographic and

237
00:11:43.600 --> 00:11:46.500
 security by finding to actually say

238
00:11:48.500 --> 00:11:52.200
During a course of this video you have learned how to discover anyone

239
00:11:51.200 --> 00:11:54.500
 exploit cryptographic vulnerabilities of

240
00:11:54.500 --> 00:11:55.900
 the phone within a web application.

241
00:11:57.200 --> 00:12:00.600
In the next video, you'll learn how to automate SQL injection

242
00:12:00.600 --> 00:12:03.200
 using a tool known as SQL map.

243
00:12:03.200 --> 00:12:06.600
 I hope this video has been informative for you and I

244
00:12:06.600 --> 00:12:07.600
 will see you in the next one.
