WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.500 --> 00:00:11.000
Hello everyone in this lesson. I will talk about the HTTP

1
00:00:10.400 --> 00:00:12.600
 analysis and attacks.

2
00:00:14.600 --> 00:00:18.000
Now firstly let's talk about the HTTP forever.

3
00:00:17.500 --> 00:00:20.500
 The HTTP is a client service

4
00:00:20.500 --> 00:00:23.700
 protocol that is based on clear text. It

5
00:00:23.700 --> 00:00:26.200
 is the typical type of network activity for

6
00:00:26.200 --> 00:00:29.700
 requesting and serving web page and it

7
00:00:29.700 --> 00:00:32.800
 is not prevented by any network boundary by

8
00:00:32.800 --> 00:00:35.500
 default. So HTTP is

9
00:00:35.500 --> 00:00:38.600
 a must-known protocol in traffic analysis, since

10
00:00:38.600 --> 00:00:41.700
 it is unencrypted and serves as

11
00:00:41.700 --> 00:00:45.100
 the backbone of online traffic, so

12
00:00:46.200 --> 00:00:50.100
Now let's talk about the HTTP response codes.

13
00:00:49.100 --> 00:00:52.500
 HTTP response codes are

14
00:00:52.500 --> 00:00:55.700
 important when analyzing Network traffic

15
00:00:55.700 --> 00:00:59.300
 because they provide information about outcome

16
00:00:58.300 --> 00:01:02.200
 of a client's request and the

17
00:01:01.200 --> 00:01:05.000
 status of the communication between the client

18
00:01:04.200 --> 00:01:07.200
 and the server they can

19
00:01:07.200 --> 00:01:10.300
 be used to identify and terrible should issues with

20
00:01:10.300 --> 00:01:13.300
 web applications and such as

21
00:01:13.300 --> 00:01:16.900
 broken links or other indication failures

22
00:01:16.900 --> 00:01:18.400
 and server errors.

23
00:01:19.200 --> 00:01:22.600
For example, if a large number of requests are

24
00:01:22.600 --> 00:01:25.500
 returning 400 for not

25
00:01:25.500 --> 00:01:28.200
 found response, it could indicate that

26
00:01:28.200 --> 00:01:31.300
 a significant number of links on the

27
00:01:31.300 --> 00:01:34.500
 website are broken. So this could be

28
00:01:34.500 --> 00:01:37.600
 a series issue for a user experience and

29
00:01:37.600 --> 00:01:40.900
 some SEO and

30
00:01:40.900 --> 00:01:43.700
 similarly if a

31
00:01:43.700 --> 00:01:46.600
 large number of records are returning

32
00:01:46.600 --> 00:01:50.200
 a 500 internal server

33
00:01:49.200 --> 00:01:52.200
 error. It could indicate that

34
00:01:52.200 --> 00:01:55.500
 there is a problem with the server or the application running

35
00:01:55.500 --> 00:01:56.200
 on it.

36
00:01:57.100 --> 00:02:00.800
And in addition to this HTTP response

37
00:02:00.800 --> 00:02:03.700
 codes can also be used to detect and

38
00:02:03.700 --> 00:02:07.100
 prevent security issues. So

39
00:02:06.100 --> 00:02:09.300
 for example, if a large number of

40
00:02:09.300 --> 00:02:14.700
 requests are returning 401 unauthorized

41
00:02:13.700 --> 00:02:19.000
 or 434 billion

42
00:02:18.400 --> 00:02:21.100
 response, it called indicate that

43
00:02:21.100 --> 00:02:25.000
 an attacker is attempting to to gain

44
00:02:24.500 --> 00:02:27.300
 an authorized access to the application.

45
00:02:28.200 --> 00:02:32.300
Furthermore it is also important to watch for abnormal

46
00:02:31.300 --> 00:02:34.400
 behavior, like a spike in

47
00:02:34.400 --> 00:02:37.600
 certain response codes. It could indicate a

48
00:02:37.600 --> 00:02:41.800
 distributed denial of service DDOS attack

49
00:02:41.800 --> 00:02:45.500
 and or data

50
00:02:44.500 --> 00:02:47.900
 port or script is scrapping

51
00:02:47.900 --> 00:02:50.200
 your website. So in

52
00:02:50.200 --> 00:02:54.500
 summary HTTP Response Code provide valuable

53
00:02:53.500 --> 00:02:57.800
 information, then analyzing

54
00:02:57.800 --> 00:03:00.400
 Network traffic and can use to identify

55
00:03:00.400 --> 00:03:04.600
 and terrible shoot a wide range of issues related

56
00:03:03.600 --> 00:03:06.800
 to web applications and network

57
00:03:06.800 --> 00:03:09.200
 security. Now, let's look at

58
00:03:09.200 --> 00:03:13.100
 how we can make HTTP analysis

59
00:03:12.100 --> 00:03:15.800
 based on response State score values.

60
00:03:45.100 --> 00:03:48.800
And I am typing the first sample filtering expiration.

61
00:04:01.600 --> 00:04:06.700
For example, I'm taking the 403

62
00:04:04.700 --> 00:04:07.600
 as Response

63
00:04:07.600 --> 00:04:08.100
 Code here.

64
00:04:08.900 --> 00:04:11.400
And I am asking it to fetch

65
00:04:11.400 --> 00:04:15.700
 me package with the Response Code value of 403.

66
00:04:14.700 --> 00:04:19.000
 You know that the 403 Response

67
00:04:18.200 --> 00:04:21.900
 Code means that there is no access to

68
00:04:21.900 --> 00:04:25.500
 the requested URL. So 43

69
00:04:24.500 --> 00:04:27.300
 is meaning that the

70
00:04:27.300 --> 00:04:30.300
 Forbidden requested URL and

71
00:04:30.300 --> 00:04:34.000
 no access to the request to URL. There

72
00:04:33.100 --> 00:04:36.100
 are a few possible reasons why you

73
00:04:36.100 --> 00:04:40.400
 might see many 43 forbidden

74
00:04:39.400 --> 00:04:42.000
 packets in an HTTP traffic.

75
00:04:42.800 --> 00:04:45.900
First one is Miss configured access controls

76
00:04:45.900 --> 00:04:48.200
 and the server might be

77
00:04:48.200 --> 00:04:51.800
 configured with strict access controls that

78
00:04:51.800 --> 00:04:54.700
 are blocking legitimate requests. And

79
00:04:54.700 --> 00:04:57.400
 the second one is Brute Force

80
00:04:57.400 --> 00:05:01.000
 attacks. An attacker might be attempting to

81
00:05:01.500 --> 00:05:04.500
 gain unauthorized access to a specific resource by

82
00:05:04.500 --> 00:05:07.800
 repeatedly, trying different credentials or

83
00:05:07.800 --> 00:05:08.500
 methods.

84
00:05:09.200 --> 00:05:13.700
And the third one is application vulnerabilities

85
00:05:12.700 --> 00:05:15.600
 a vulnerability in

86
00:05:15.600 --> 00:05:19.000
 the web application called hello an

87
00:05:18.300 --> 00:05:21.700
 attacker to perform an action that server is

88
00:05:21.700 --> 00:05:22.200
 blocking.

89
00:05:23.100 --> 00:05:26.400
And the other one is web scrapping or

90
00:05:26.400 --> 00:05:29.800
 crawling some web scraping or crawling

91
00:05:29.800 --> 00:05:32.800
 tools might not properly follow the

92
00:05:32.800 --> 00:05:36.700
 rules of you know, robots that txt

93
00:05:35.700 --> 00:05:38.900
 a file and which

94
00:05:38.900 --> 00:05:42.700
 can result in 434bidden errors.

95
00:05:43.400 --> 00:05:46.600
And the last one is D those attack.

96
00:05:47.400 --> 00:05:51.600
A distributed denial of service leaders attack

97
00:05:51.600 --> 00:05:54.700
 could all load the server and cause it

98
00:05:54.700 --> 00:05:57.800
 to return 434-bit and

99
00:05:57.800 --> 00:05:59.100
 for all requests.

100
00:05:59.600 --> 00:06:03.900
So in order to determine if the 4003

101
00:06:02.900 --> 00:06:05.200
 forbidden packets are

102
00:06:05.200 --> 00:06:08.200
 the result of a Cyber attack, you need to

103
00:06:08.200 --> 00:06:11.700
 analyze the traffic in more details such as the source

104
00:06:11.700 --> 00:06:14.400
 IP address the timing and

105
00:06:14.400 --> 00:06:17.600
 the frequency and the target

106
00:06:17.600 --> 00:06:20.800
 URL and the HTTP headers.

107
00:06:20.800 --> 00:06:23.600
 So likewise you can

108
00:06:23.600 --> 00:06:26.700
 examine 400 as

109
00:06:26.700 --> 00:06:30.300
 HTTP Response Code. HTTP

110
00:06:29.300 --> 00:06:32.700
 400 packets are

111
00:06:32.700 --> 00:06:35.700
 packets that stand for bad request.

112
00:06:36.400 --> 00:06:39.500
Furthermore the number frequency and

113
00:06:39.500 --> 00:06:42.400
 Source IP address of these packets can

114
00:06:42.400 --> 00:06:43.600
 be investigated.

115
00:06:44.700 --> 00:06:44.900
and

116
00:06:46.800 --> 00:06:50.800
on the other hand in the same filtering expression.

117
00:06:49.800 --> 00:06:52.700
 It is sufficient to

118
00:06:52.700 --> 00:06:56.000
 set the Response Code value to one

119
00:06:55.000 --> 00:06:57.100
 hundred.

120
00:06:57.900 --> 00:07:02.000
in order to investigate 400 HTTP

121
00:07:00.000 --> 00:07:02.900
 packets

122
00:07:03.400 --> 00:07:06.800
So and another important HTTP code

123
00:07:06.800 --> 00:07:10.400
 is 401. It

124
00:07:09.400 --> 00:07:12.300
 means unauthorized and

125
00:07:12.300 --> 00:07:16.700
 that is server didn't understand the

126
00:07:15.700 --> 00:07:17.400
 request message.

127
00:07:18.100 --> 00:07:22.500
400 HTTP response means server didn't

128
00:07:22.500 --> 00:07:26.700
 understand the request message. Finally. You

129
00:07:25.700 --> 00:07:28.200
 should look at HTTP code for

130
00:07:28.200 --> 00:07:29.300
 405.

131
00:07:30.100 --> 00:07:33.100
And it means method not a lot

132
00:07:33.100 --> 00:07:36.600
 because can attempt to attackers can

133
00:07:36.600 --> 00:07:40.100
 try to attempt different HTTP methods.

134
00:07:40.900 --> 00:07:41.100
and

135
00:07:42.400 --> 00:07:46.500
now let's talk about the user agent heater

136
00:07:45.500 --> 00:07:48.600
 parameter, which we

137
00:07:48.600 --> 00:07:50.500
 can see commonly.

138
00:07:51.200 --> 00:07:53.100
in an HTTP message

139
00:07:54.400 --> 00:07:58.800
As you know, the user agent is a string data

140
00:07:57.800 --> 00:08:00.400
 web client for example,

141
00:08:00.400 --> 00:08:03.100
 a web browser and it is a

142
00:08:03.100 --> 00:08:06.500
 header of HTTP protocol.

143
00:08:10.900 --> 00:08:13.900
And you can see the user agent

144
00:08:13.900 --> 00:08:16.500
 like this in an

145
00:08:16.500 --> 00:08:19.700
 HTTP packet and the user

146
00:08:19.700 --> 00:08:20.500
 agent field.

147
00:08:22.500 --> 00:08:25.100
It is critical for a security analyst.

148
00:08:25.900 --> 00:08:28.900
To recognize anomalies indications

149
00:08:28.900 --> 00:08:30.800
 on packet beats and pieces.

150
00:08:31.900 --> 00:08:34.300
And this information can be

151
00:08:34.300 --> 00:08:37.800
 used by the server to tailor its response

152
00:08:37.800 --> 00:08:41.400
 to the specific client or to track which

153
00:08:40.400 --> 00:08:43.800
 types of clients are accessing the

154
00:08:43.800 --> 00:08:46.900
 site. So the user agent

155
00:08:46.900 --> 00:08:49.500
 string typically includes information

156
00:08:49.500 --> 00:08:52.200
 about the client software and the device. It

157
00:08:52.200 --> 00:08:55.800
 is running on such as the browser type and version

158
00:08:55.800 --> 00:08:59.000
 the operating system and the

159
00:08:58.100 --> 00:08:59.500
 device type

160
00:09:00.300 --> 00:09:03.800
and it is critical for a security analysis to

161
00:09:03.800 --> 00:09:06.800
 recognize anomalies indications on

162
00:09:06.800 --> 00:09:09.600
 packet piece and pieces as

163
00:09:09.600 --> 00:09:12.400
 I told before the user agent field

164
00:09:12.400 --> 00:09:16.200
 is a great resource for detecting anomalies

165
00:09:15.200 --> 00:09:17.700
 in HTTP data.

166
00:09:18.200 --> 00:09:23.300
In extraordinary in extraordinary situations

167
00:09:22.300 --> 00:09:25.500
 takers effectively change

168
00:09:25.500 --> 00:09:27.000
 the user agent data.

169
00:09:27.800 --> 00:09:30.600
Making it appear company the

170
00:09:30.600 --> 00:09:34.000
 legitimate. So for example a typical

171
00:09:33.500 --> 00:09:36.700
 user agent string for a web browser

172
00:09:36.700 --> 00:09:39.500
 might look like this. Let

173
00:09:39.500 --> 00:09:39.900
 me show you.

174
00:09:41.200 --> 00:09:42.400
in the PK file

175
00:09:43.200 --> 00:09:45.500
in the washer PK file

176
00:09:46.200 --> 00:09:46.600
and

177
00:09:48.400 --> 00:09:51.700
In order to see only the HTTP packets.

178
00:09:51.700 --> 00:09:54.200
 I'm writing that filter expression.

179
00:09:56.200 --> 00:09:59.200
As HTTP, it is

180
00:09:59.200 --> 00:10:03.000
 enough to only see the HTTP packets

181
00:10:02.200 --> 00:10:04.300
 and click on the enter.

182
00:10:07.400 --> 00:10:07.600
So

183
00:10:09.800 --> 00:10:13.000
and that's it. And now we are seeing only

184
00:10:12.200 --> 00:10:15.500
 the HTTP packets

185
00:10:15.500 --> 00:10:17.800
 as you can see in this window.

186
00:10:19.400 --> 00:10:23.200
and when we look at this packet

187
00:10:25.700 --> 00:10:28.600
the packet number 62

188
00:10:30.200 --> 00:10:30.500
and

189
00:10:33.100 --> 00:10:36.800
let's expand the hypertext transfer protocol

190
00:10:36.800 --> 00:10:38.400
 field in here.

191
00:10:39.400 --> 00:10:43.600
And when we look at the user agent field, you

192
00:10:42.600 --> 00:10:46.200
 can see the some browser

193
00:10:45.200 --> 00:10:49.000
 information about the client

194
00:10:48.000 --> 00:10:49.600
 and

195
00:10:50.600 --> 00:10:53.900
Mozilla and it's version information

196
00:10:53.900 --> 00:10:57.200
 is 5.0 and

197
00:10:56.200 --> 00:11:00.800
 the operating system information such

198
00:10:59.800 --> 00:11:02.900
 information about the

199
00:11:02.900 --> 00:11:06.000
 operating system and the

200
00:11:05.500 --> 00:11:06.700
 browser version.

201
00:11:07.800 --> 00:11:10.700
And usually agent in

202
00:11:10.700 --> 00:11:15.100
 here is an example and this

203
00:11:13.100 --> 00:11:16.400
 user agent makes

204
00:11:16.400 --> 00:11:19.800
 up of Mozilla 5.0.

205
00:11:20.600 --> 00:11:23.800
And some other operating system information

206
00:11:23.800 --> 00:11:26.300
 we have in here. So this

207
00:11:26.300 --> 00:11:30.100
 is a normal and usually usually agent

208
00:11:29.100 --> 00:11:32.300
 example a user agent

209
00:11:32.300 --> 00:11:35.600
 string is considered a abnormal if if

210
00:11:35.600 --> 00:11:39.700
 it doesn't conform to the format specified

211
00:11:39.700 --> 00:11:43.200
 in the HTTP 1.1 version

212
00:11:42.200 --> 00:11:45.900
 specification, or if it

213
00:11:45.900 --> 00:11:49.100
 contains unexpected or

214
00:11:48.100 --> 00:11:50.800
 suspicious values.

215
00:11:52.200 --> 00:11:56.100
And for example a user agent string that contains

216
00:11:55.100 --> 00:11:58.500
 some spatial strings

217
00:11:58.500 --> 00:12:02.700
 or white space in unexpected places

218
00:12:02.700 --> 00:12:06.400
 will be considered abnormal additionally

219
00:12:05.400 --> 00:12:08.500
 user agent strings

220
00:12:08.500 --> 00:12:11.400
 that are too long too short

221
00:12:11.400 --> 00:12:15.700
 or are of any unexpected format

222
00:12:14.700 --> 00:12:18.000
 are also considered abnormal.

223
00:12:18.700 --> 00:12:20.200
of keep in mind that

224
00:12:22.800 --> 00:12:26.100
Now, let's look at the filter Expressions

225
00:12:25.100 --> 00:12:29.100
 to find some suspicious

226
00:12:28.100 --> 00:12:29.700
 patterns.

227
00:12:30.600 --> 00:12:33.800
Now with these in mind we can construct

228
00:12:33.800 --> 00:12:36.900
 a filtering expression. Let's suppose

229
00:12:36.900 --> 00:12:39.900
 that the clients in our Network use only

230
00:12:39.900 --> 00:12:41.000
 Mozilla.

231
00:12:42.100 --> 00:12:45.200
As a web processor and in this case,

232
00:12:45.200 --> 00:12:48.500
 we don't expect anything other than

233
00:12:48.500 --> 00:12:49.900
 this web browser.

234
00:12:51.900 --> 00:12:55.100
Other than Mozilla string in

235
00:12:54.100 --> 00:12:57.500
 the user agent theater and we

236
00:12:57.500 --> 00:13:01.100
 can use this string model string to

237
00:13:00.100 --> 00:13:03.600
 find suspicious user agent strings.

238
00:13:04.400 --> 00:13:06.900
and we write filters as

239
00:13:07.900 --> 00:13:08.400
now

240
00:13:10.500 --> 00:13:14.500
to say only to say show only HTTP

241
00:13:13.500 --> 00:13:17.500
 traffic V type http.

242
00:13:18.900 --> 00:13:21.000
And sister will be

243
00:13:21.800 --> 00:13:24.800
 a second statement in this traffic be put

244
00:13:24.800 --> 00:13:26.300
 and operator.

245
00:13:27.200 --> 00:13:27.900
between them

246
00:13:29.200 --> 00:13:32.000
and the second statement is like this.

247
00:13:33.100 --> 00:13:34.000
http

248
00:13:53.900 --> 00:13:56.400
we use the matches filters because

249
00:13:56.400 --> 00:14:00.400
 we don't want to get stuck with the case sensitivity.

250
00:13:59.400 --> 00:14:03.000
 The second statement

251
00:14:02.600 --> 00:14:05.300
 brings us here is

252
00:14:05.300 --> 00:14:09.400
 the second statement in here and we

253
00:14:08.400 --> 00:14:09.600
 can

254
00:14:10.500 --> 00:14:14.300
Make within a parenthesis and

255
00:14:13.300 --> 00:14:17.600
 the second statement in

256
00:14:16.600 --> 00:14:19.400
 here brings us

257
00:14:19.400 --> 00:14:23.300
 packets with Mozilla in the user agent headers.

258
00:14:22.300 --> 00:14:25.500
 And since we want

259
00:14:25.500 --> 00:14:29.800
 to case where the string is not passed

260
00:14:29.800 --> 00:14:32.900
 we put and not operator at

261
00:14:32.900 --> 00:14:35.300
 the beginning of this expression of

262
00:14:35.300 --> 00:14:39.000
 this statement written exclamation point

263
00:14:44.900 --> 00:14:46.000
now like this.

264
00:14:48.400 --> 00:14:52.700
And this is our filter expression filtering expression

265
00:14:52.700 --> 00:14:55.600
 in order to find without.

266
00:14:56.500 --> 00:15:00.200
modulus string in the HTTP user

267
00:14:59.200 --> 00:15:00.500
 agent

268
00:15:01.200 --> 00:15:05.000
So now let's copy this filtering expression

269
00:15:04.300 --> 00:15:07.500
 and apply it to our PK file.

270
00:15:12.100 --> 00:15:12.500
and to

271
00:15:13.400 --> 00:15:17.200
In this display filter field. I'm

272
00:15:18.800 --> 00:15:18.900
wasting it

273
00:15:20.700 --> 00:15:22.900
like this click on the end.

274
00:15:26.300 --> 00:15:29.400
So now we have some packets which is

275
00:15:29.400 --> 00:15:32.800
 associated with our filtering expiration and

276
00:15:32.800 --> 00:15:35.200
 let's take a look at the packets in order.

277
00:15:36.300 --> 00:15:39.100
First one is the packet with the

278
00:15:39.100 --> 00:15:43.000
 number 55 and click

279
00:15:42.200 --> 00:15:43.700
 on this packet.

280
00:15:44.300 --> 00:15:47.300
And when we look at this packet in this

281
00:15:47.300 --> 00:15:51.000
 packet, there is no user agent field and

282
00:15:50.400 --> 00:15:52.500
 let's jump to the next one.

283
00:15:54.400 --> 00:15:54.800
So

284
00:15:55.900 --> 00:15:58.800
there is also no user

285
00:15:58.800 --> 00:16:02.000
 agent field agent header

286
00:16:01.000 --> 00:16:02.500
 and

287
00:16:04.300 --> 00:16:05.200
to the next one.

288
00:16:08.500 --> 00:16:12.000
or there is a user agent as you can see and

289
00:16:13.500 --> 00:16:16.500
And its value python request if you

290
00:16:16.500 --> 00:16:19.800
 see a string like python records

291
00:16:19.800 --> 00:16:22.500
 in the user agent either it may

292
00:16:22.500 --> 00:16:25.200
 indicate that the client software making the request is

293
00:16:25.200 --> 00:16:29.000
 using the Python programming language and

294
00:16:28.700 --> 00:16:31.700
 the records library to make

295
00:16:31.700 --> 00:16:34.700
 the HTTP request and this

296
00:16:34.700 --> 00:16:37.300
 isn't suspicious finding by

297
00:16:37.300 --> 00:16:41.200
 itself as many developers use the

298
00:16:40.200 --> 00:16:44.100
 Python programming language

299
00:16:43.100 --> 00:16:46.400
 and request library to write

300
00:16:46.400 --> 00:16:50.100
 scripts some script and applications that

301
00:16:49.100 --> 00:16:52.700
 make HTTP requests.

302
00:16:53.100 --> 00:16:56.600
However, it is important to consider the

303
00:16:56.600 --> 00:16:59.700
 context and other information available to

304
00:16:59.700 --> 00:17:02.700
 determine if the request is malicious or

305
00:17:02.700 --> 00:17:02.800
 not.

306
00:17:03.600 --> 00:17:06.300
For example, if the request is being made to

307
00:17:06.300 --> 00:17:10.600
 a server that shouldn't be receiving characters

308
00:17:09.600 --> 00:17:12.500
 from Python scripts or

309
00:17:12.500 --> 00:17:15.900
 if the request is attempting to

310
00:17:15.900 --> 00:17:19.100
 access sensitive information. It may

311
00:17:18.100 --> 00:17:21.600
 be more likely that the request is

312
00:17:21.600 --> 00:17:22.300
 malicious.

313
00:17:22.900 --> 00:17:25.900
The it depends on another some

314
00:17:25.900 --> 00:17:28.100
 parameters and theater information.

315
00:17:29.700 --> 00:17:32.100
Additionally, you can check the IP address

316
00:17:32.100 --> 00:17:35.500
 of the client the timing and frequency of

317
00:17:35.500 --> 00:17:38.200
 the requests and if the request is

318
00:17:38.200 --> 00:17:41.500
 part of a large a larger pattern

319
00:17:41.500 --> 00:17:43.300
 of suspicious activity

320
00:17:44.100 --> 00:17:44.300
and

321
00:17:45.400 --> 00:17:48.700
it is also important to check the heaters as

322
00:17:48.700 --> 00:17:52.100
 I told you the payload and parameters

323
00:17:51.100 --> 00:17:54.200
 of the request to see if they

324
00:17:54.200 --> 00:17:57.300
 contain any signs of malicious activities.

325
00:17:58.700 --> 00:18:02.800
So now let's talk about the common a

326
00:18:01.800 --> 00:18:04.700
 common common detector type as

327
00:18:04.700 --> 00:18:08.200
 log 4G attacks. Let's

328
00:18:07.200 --> 00:18:11.000
 talk about the log 4G effects

329
00:18:10.700 --> 00:18:14.300
 and log4j attack quickly

330
00:18:13.300 --> 00:18:16.400
 starts with a post request.

331
00:18:17.100 --> 00:18:20.700
The HTTP method would be

332
00:18:20.700 --> 00:18:24.200
 a post message would

333
00:18:23.200 --> 00:18:26.500
 be paused. So it is useful

334
00:18:26.500 --> 00:18:29.800
 to investigate post packets packets to

335
00:18:29.800 --> 00:18:31.800
 detect such attacks.

336
00:18:32.500 --> 00:18:35.800
I mean this type in here

337
00:18:35.800 --> 00:18:36.600
 like this.

338
00:18:38.100 --> 00:18:42.300
this type packets post packets and

339
00:18:43.900 --> 00:18:46.700
there are known clear text patterns.

340
00:18:48.200 --> 00:18:52.000
Which indicates the lock 4G attacks

341
00:18:51.400 --> 00:18:55.100
 and these clear text

342
00:18:54.100 --> 00:18:57.800
 patterns like this. I want

343
00:18:57.800 --> 00:18:58.400
 to show you.

344
00:18:59.900 --> 00:19:03.200
for example, it can be J and

345
00:19:02.200 --> 00:19:04.200
 the I

346
00:19:05.400 --> 00:19:07.100
and call them.

347
00:19:08.800 --> 00:19:09.100
and

348
00:19:10.500 --> 00:19:11.300
have that

349
00:19:13.300 --> 00:19:17.300
if you see the patterns like this, this is

350
00:19:17.300 --> 00:19:18.200
 a sign of

351
00:19:19.700 --> 00:19:20.600
log 4G attack

352
00:19:21.500 --> 00:19:25.100
And therefore if you want to directly access packets

353
00:19:24.100 --> 00:19:27.400
 containing the work 4G

354
00:19:27.400 --> 00:19:31.400
 attacks, you can use the following the like

355
00:19:30.400 --> 00:19:33.300
 this building expression.

356
00:19:34.400 --> 00:19:38.200
Since the log4j attack

357
00:19:37.200 --> 00:19:40.400
 technical starts with a post request first.

358
00:19:40.400 --> 00:19:43.500
 We should type A filter expiration

359
00:19:43.500 --> 00:19:47.300
 to perfect the

360
00:19:47.300 --> 00:19:50.600
 post packets and you can

361
00:19:50.600 --> 00:19:53.500
 write this HTTP Dot

362
00:19:54.300 --> 00:19:55.000
request

363
00:19:57.300 --> 00:19:58.800
that method

364
00:20:00.300 --> 00:20:05.100
because we want to see the postmet packets.

365
00:20:06.100 --> 00:20:06.900
is equal to

366
00:20:08.400 --> 00:20:08.900
cost

367
00:20:12.400 --> 00:20:15.400
This is our first statement that we want

368
00:20:15.400 --> 00:20:15.800
 to see.

369
00:20:17.700 --> 00:20:18.400
and the

370
00:20:19.400 --> 00:20:23.400
Second for for the second statement. We

371
00:20:22.400 --> 00:20:26.000
 should put a put an operator and

372
00:20:27.100 --> 00:20:30.800
And then we can write the second statement

373
00:20:30.800 --> 00:20:33.800
 that we want to filter out and

374
00:20:33.800 --> 00:20:36.100
 the second statement we are

375
00:20:36.100 --> 00:20:39.800
 looking for is because there are packets that

376
00:20:39.800 --> 00:20:42.600
 pass the JJ and

377
00:20:42.600 --> 00:20:46.100
 d i l depth pattern string

378
00:20:45.100 --> 00:20:48.900
 in the user agent. We should

379
00:20:48.900 --> 00:20:50.600
 type this filter.

380
00:20:51.300 --> 00:20:51.900
expression

381
00:20:53.100 --> 00:20:54.100
http

382
00:20:56.000 --> 00:20:57.500
.useragent

383
00:21:01.500 --> 00:21:02.300
matches

384
00:21:06.600 --> 00:21:08.300
J and the I

385
00:21:09.800 --> 00:21:10.900
and the column

386
00:21:11.900 --> 00:21:12.400
symbol

387
00:21:14.300 --> 00:21:15.200
and L

388
00:21:16.900 --> 00:21:17.200
so

389
00:21:17.800 --> 00:21:18.700
let's look at this.

390
00:21:21.300 --> 00:21:21.900
This is our

391
00:21:23.500 --> 00:21:26.700
filtering expression in here

392
00:21:31.100 --> 00:21:35.400
so you can use this filtering expression to directly

393
00:21:34.400 --> 00:21:38.400
 find the some log 4G

394
00:21:37.400 --> 00:21:40.800
 attack packets and

395
00:21:40.800 --> 00:21:43.400
 the result. Let's look

396
00:21:43.400 --> 00:21:46.800
 at the result of this building expiration and

397
00:21:46.800 --> 00:21:50.100
 I'm copying this filtering expression

398
00:21:49.100 --> 00:21:53.000
 to use in Russia.

399
00:21:55.500 --> 00:21:55.800
now

400
00:21:57.700 --> 00:21:58.900
let's put in this field.

401
00:22:00.100 --> 00:22:01.300
the filtering expression

402
00:22:02.700 --> 00:22:06.600
And now you can click on enter to

403
00:22:05.600 --> 00:22:07.500
 see the result.

404
00:22:10.100 --> 00:22:12.300
So the result is great.

405
00:22:13.200 --> 00:22:18.100
We found the packet we were looking for directly and

406
00:22:17.100 --> 00:22:20.700
 the attack packet. It became

407
00:22:20.700 --> 00:22:23.400
 really pinpoint. Let's take a

408
00:22:23.400 --> 00:22:26.100
 closer look at the unusual and

409
00:22:27.300 --> 00:22:28.500
some unexpected

410
00:22:30.800 --> 00:22:32.000
patterns in here

411
00:22:33.400 --> 00:22:37.700
then we look at the user agent. We are seeing

412
00:22:37.700 --> 00:22:42.500
 the unusual and unexpected characters

413
00:22:40.500 --> 00:22:44.600
 and some

414
00:22:43.600 --> 00:22:47.700
 special strings

415
00:22:46.700 --> 00:22:49.300
 in here as you

416
00:22:49.300 --> 00:22:54.300
 can see. This is unusual and extraordinary statement.

417
00:22:55.300 --> 00:22:58.400
But and this is a typical lock for

418
00:22:58.400 --> 00:23:02.100
 G attack pattern and the sign

419
00:23:01.100 --> 00:23:05.200
 you can see in the user agent

420
00:23:04.200 --> 00:23:07.600
 field. And with this expression

421
00:23:07.600 --> 00:23:10.900
 with this filtering expression. We

422
00:23:10.900 --> 00:23:13.800
 have found the packet and

423
00:23:13.800 --> 00:23:16.700
 directly and in an effective

424
00:23:16.700 --> 00:23:17.100
 way.

425
00:23:17.900 --> 00:23:20.700
So let's take a closer. Look

426
00:23:20.700 --> 00:23:24.900
 at the look at the unusual and

427
00:23:24.900 --> 00:23:27.800
 unexpected the strings in

428
00:23:27.800 --> 00:23:30.700
 this attack because this can

429
00:23:30.700 --> 00:23:34.200
 be a remote called execution and

430
00:23:33.200 --> 00:23:36.500
 our CE attempt and

431
00:23:36.500 --> 00:23:37.900
 you can use

432
00:23:39.100 --> 00:23:43.000
the windows tool to look

433
00:23:42.000 --> 00:23:43.000
 at

434
00:23:44.700 --> 00:23:45.000
in details

435
00:23:46.100 --> 00:23:49.500
and you can choose the show packed bytes.

436
00:23:51.100 --> 00:23:53.700
And as you can see in here.

437
00:23:55.100 --> 00:23:57.900
Are user agent strings?

438
00:23:58.600 --> 00:24:02.100
And this is really interesting pattern

439
00:24:01.100 --> 00:24:04.900
 and in this step

440
00:24:04.900 --> 00:24:08.000
 you can use any converter tool

441
00:24:07.200 --> 00:24:11.000
 to convert these special characters into

442
00:24:10.800 --> 00:24:14.100
 human readable format. When I

443
00:24:13.100 --> 00:24:16.900
 because I have converted

444
00:24:16.900 --> 00:24:19.500
 before this special

445
00:24:19.500 --> 00:24:23.000
 characters from Days 64

446
00:24:23.900 --> 00:24:26.400
very 64 type to a

447
00:24:26.400 --> 00:24:29.100
 readable text format and I will show you

448
00:24:29.100 --> 00:24:32.500
 a directly the result of this.

449
00:24:33.800 --> 00:24:36.400
Special characters and I have

450
00:24:36.400 --> 00:24:39.500
 converted these special characters to

451
00:24:39.500 --> 00:24:43.000
 readable format before the lesson

452
00:24:42.400 --> 00:24:44.500
 and I have used it.

453
00:24:45.800 --> 00:24:49.100
Common tool in order to do this and

454
00:24:48.100 --> 00:24:52.000
 you can use any converter tool to

455
00:24:51.200 --> 00:24:56.000
 convert is special characters

456
00:24:54.500 --> 00:24:57.300
 and you should

457
00:24:57.300 --> 00:25:01.000
 take this part only to convert

458
00:25:00.500 --> 00:25:04.400
 because you need to this part.

459
00:25:05.500 --> 00:25:09.200
To convert a plane text to

460
00:25:08.200 --> 00:25:12.100
 convert a human readable

461
00:25:11.100 --> 00:25:14.900
 format and this part.

462
00:25:16.300 --> 00:25:19.000
is in base 64

463
00:25:20.200 --> 00:25:23.100
type and you can take

464
00:25:24.100 --> 00:25:24.700
exactly

465
00:25:25.700 --> 00:25:27.000
this part

466
00:25:28.200 --> 00:25:32.400
and you can convert with any converting

467
00:25:31.400 --> 00:25:34.900
 tool to a plain text.

468
00:25:35.700 --> 00:25:38.500
Okay. Now I will show you the result

469
00:25:38.500 --> 00:25:41.200
 of converting this part of

470
00:25:41.200 --> 00:25:43.300
 a strings and

471
00:25:45.100 --> 00:25:48.300
This part of strings corresponds to

472
00:25:48.300 --> 00:25:51.000
 this plane text part.

473
00:25:52.300 --> 00:25:55.900
But this is the result of converting now.

474
00:25:55.900 --> 00:25:57.800
 I am pasting in here.

475
00:25:59.100 --> 00:26:03.900
And this is the converted situation

476
00:26:02.900 --> 00:26:07.200
 of those special

477
00:26:06.200 --> 00:26:09.600
 characters. I want

478
00:26:09.600 --> 00:26:12.100
 to type in again.

479
00:26:13.200 --> 00:26:13.900
the special

480
00:26:16.300 --> 00:26:16.800
characters

481
00:26:18.700 --> 00:26:19.500
so you can

482
00:26:20.500 --> 00:26:20.900
take this

483
00:26:24.300 --> 00:26:27.800
but these special characters.

484
00:26:28.900 --> 00:26:30.000
corresponds to the

485
00:26:31.300 --> 00:26:32.000
this code

486
00:26:33.300 --> 00:26:34.700
When you convert this.

487
00:26:35.800 --> 00:26:38.900
Special character part you will

488
00:26:38.900 --> 00:26:42.200
 obtain this code corresponding as

489
00:26:41.200 --> 00:26:45.000
 corresponding situation. So

490
00:26:44.800 --> 00:26:47.800
 this code when it

491
00:26:47.800 --> 00:26:51.700
 is executed will download file.

492
00:26:52.600 --> 00:26:55.300
will download a file which is called

493
00:26:55.300 --> 00:26:59.400
 LH and Dot sh and

494
00:27:00.800 --> 00:27:03.500
Will download this file and

495
00:27:03.500 --> 00:27:07.000
 from the specified URL as

496
00:27:06.300 --> 00:27:08.000
 you can see in here.

497
00:27:08.900 --> 00:27:11.500
Change and it will change

498
00:27:11.500 --> 00:27:14.900
 with this chord plus

499
00:27:14.900 --> 00:27:17.300
 X comment. It will change

500
00:27:17.300 --> 00:27:21.900
 its permissions to make it executable to

501
00:27:20.900 --> 00:27:23.600
 make it executable it

502
00:27:23.600 --> 00:27:27.700
 execute the plus X parameter

503
00:27:26.700 --> 00:27:30.400
 and then run

504
00:27:29.400 --> 00:27:30.500
 it.

505
00:27:31.100 --> 00:27:33.900
run this script file

506
00:27:34.700 --> 00:27:37.800
So this command is like the art

507
00:27:37.800 --> 00:27:40.600
 of a log4j attack pattern which

508
00:27:40.600 --> 00:27:43.700
 is a type of attack that exploits a vulnerability

509
00:27:43.700 --> 00:27:46.300
 in the log4j library to

510
00:27:46.300 --> 00:27:50.300
 inject malicious code into some applications.

511
00:27:51.400 --> 00:27:54.700
In this case, the attacker is

512
00:27:54.700 --> 00:27:57.500
 using the command download a

513
00:27:57.500 --> 00:28:01.100
 shared secret like this and from

514
00:28:00.100 --> 00:28:03.300
 a remote server.

515
00:28:04.100 --> 00:28:07.800
The attacker is using the command to download a

516
00:28:07.800 --> 00:28:11.000
 shot script from a remote server and

517
00:28:10.500 --> 00:28:13.500
 10 execute it on the

518
00:28:13.500 --> 00:28:16.100
 compromised system on the

519
00:28:16.100 --> 00:28:19.700
 compromised system. So this child script

520
00:28:19.700 --> 00:28:24.200
 may contain some rice malicious

521
00:28:22.200 --> 00:28:26.500
 payloads some malicious

522
00:28:25.500 --> 00:28:27.300
 payloads such as

523
00:28:28.100 --> 00:28:32.100
And that can be first first download

524
00:28:31.100 --> 00:28:34.900
 and execute additional malware

525
00:28:34.900 --> 00:28:37.800
 or it may contain in order

526
00:28:37.800 --> 00:28:41.000
 to connect to a command

527
00:28:40.200 --> 00:28:44.500
 and control server and it

528
00:28:43.500 --> 00:28:47.000
 may contain that opening a

529
00:28:46.700 --> 00:28:49.100
 reverse shell to allow the

530
00:28:49.100 --> 00:28:53.100
 attacker control the compromise system or it

531
00:28:52.100 --> 00:28:56.400
 may contain also that performing

532
00:28:55.400 --> 00:28:59.600
 Adidas attack or download

533
00:28:58.600 --> 00:29:01.300
 and execute other

534
00:29:01.300 --> 00:29:05.300
 scripts or to collect some sensitive information

535
00:29:05.300 --> 00:29:09.100
 and it is important not this

536
00:29:08.100 --> 00:29:11.900
 specific command, maybe changed and

537
00:29:11.900 --> 00:29:14.400
 URL maybe different but the

538
00:29:14.400 --> 00:29:15.900
 purpose is still the same.

539
00:29:16.500 --> 00:29:20.000
And as this is a malicious command, it

540
00:29:19.100 --> 00:29:22.400
 is important to take action as soon

541
00:29:22.400 --> 00:29:26.000
 as possible to prevent further harm and

542
00:29:25.600 --> 00:29:28.600
 is called include disconnecting the

543
00:29:28.600 --> 00:29:32.200
 compromise system from the network analyzing

544
00:29:31.200 --> 00:29:34.800
 the system at the downloaded file and

545
00:29:34.800 --> 00:29:37.400
 blocking the IP address from which the

546
00:29:37.400 --> 00:29:38.400
 command was download.

547
00:29:39.200 --> 00:29:42.900
And yes, this command can be considered an

548
00:29:42.900 --> 00:29:45.400
 example of remote code execution.

549
00:29:46.200 --> 00:29:49.400
And remote code execution is a type

550
00:29:49.400 --> 00:29:52.700
 of attack, you know that allows

551
00:29:52.700 --> 00:29:55.500
 an attacker to execute some codes

552
00:29:55.500 --> 00:29:58.600
 on a remote system. And the command

553
00:29:58.600 --> 00:30:02.100
 in question is being or the

554
00:30:01.100 --> 00:30:04.500
 command in here is being used

555
00:30:04.500 --> 00:30:08.700
 to download and execute code

556
00:30:08.700 --> 00:30:11.500
 on the compromise system. So in

557
00:30:11.500 --> 00:30:11.700
 this case,

558
00:30:13.100 --> 00:30:16.700
So as a result in this case, the attacker

559
00:30:16.700 --> 00:30:20.300
 is exploiting a log 4G vulnerability

560
00:30:19.300 --> 00:30:23.000
 to inject the command into

561
00:30:22.300 --> 00:30:26.000
 a application and then executed

562
00:30:25.900 --> 00:30:28.800
 on the compromise system and

563
00:30:28.800 --> 00:30:31.200
 the command downloads a shell script

564
00:30:31.200 --> 00:30:34.100
 from a remote server and then runs it

565
00:30:34.100 --> 00:30:38.000
 on the compromis system potentially allowing

566
00:30:37.100 --> 00:30:39.600
 the attacker to execute.

567
00:30:40.700 --> 00:30:44.100
They're they're called and gain control

568
00:30:43.100 --> 00:30:45.000
 of the system.

569
00:30:45.800 --> 00:30:46.000
so

570
00:30:47.300 --> 00:30:50.800
That's all about log 4G attack.

571
00:30:50.800 --> 00:30:54.800
 And this was an example of log4j attack.

572
00:30:59.200 --> 00:31:02.200
That's all for now. See you on the next video.
