WEBVTT - This file was automatically generated by VIMEO

1
00:00:08.400 --> 00:00:11.300
 Hello everyone. Welcome back. Let's take a look at

2
00:00:11.300 --> 00:00:14.200
 the second of your questions during the session using cookies. And how

3
00:00:14.200 --> 00:00:15.000
 do we secure them?

4
00:00:16.100 --> 00:00:19.400
 If you go back to our first Hands-On under the web section where

5
00:00:19.400 --> 00:00:22.100
 we were able to hijack, the session using a

6
00:00:22.100 --> 00:00:25.700
 feta cross-site scripting attack do for. The reason attack

7
00:00:25.700 --> 00:00:28.200
 was really successful is because of

8
00:00:28.200 --> 00:00:32.200
 the scripts that are being run on the browser capable

9
00:00:31.200 --> 00:00:34.900
 enough to access these cookies in

10
00:00:34.900 --> 00:00:37.400
 practice, even though these are saved in

11
00:00:37.400 --> 00:00:40.900
 the browser. It is a server who really needs them to

12
00:00:40.900 --> 00:00:43.200
 authenticate the session or the use

13
00:00:43.200 --> 00:00:43.500
 of

14
00:00:44.400 --> 00:00:48.100
 That is no role of these scripts reading

15
00:00:47.100 --> 00:00:50.200
 access for any of these cookies.

16
00:00:51.300 --> 00:00:54.500
 One of the way to secure than is by enabling this HTTP

17
00:00:54.500 --> 00:00:57.100
 flag. St. Only flag is

18
00:00:57.100 --> 00:01:00.500
 going to shock. The browser's saying that none of the scripts should have access

19
00:01:00.500 --> 00:01:01.400
 to these cookies.

20
00:01:03.800 --> 00:01:06.600
 Some of the other parameter that

21
00:01:06.600 --> 00:01:08.300
 we are looking at is a secure flag.

22
00:01:09.500 --> 00:01:12.600
 As we have already discussed that is action. ID should be treated as

23
00:01:12.600 --> 00:01:16.400
 passwords. That means these are highly sensitive any

24
00:01:16.400 --> 00:01:20.000
 sensitive information should never be sent in

25
00:01:19.400 --> 00:01:22.500
 plain traffic. That means

26
00:01:22.900 --> 00:01:25.600
 you should always be sent using secure protocols only.

27
00:01:26.900 --> 00:01:29.800
 By enabling this particular flag. We are instructing

28
00:01:29.800 --> 00:01:32.800
 the browser to only send this cookies. Whenever

29
00:01:32.300 --> 00:01:35.400
 the connection between the browser and

30
00:01:35.400 --> 00:01:38.800
 the server is done using HTTP protocol

31
00:01:38.800 --> 00:01:41.800
 by doing. So we are avoiding

32
00:01:41.800 --> 00:01:44.500
 multiple mathml attack and

33
00:01:44.600 --> 00:01:47.800
 the scenarios one really accesses.

34
00:01:47.100 --> 00:01:50.500
 The browser's on Open Wi-Fi

35
00:01:50.500 --> 00:01:51.900
 networks such as Cafe.

36
00:01:53.400 --> 00:01:57.300
 One of the important factor for any cookie. Is that

37
00:01:56.800 --> 00:01:59.700
 how do we expand

38
00:01:59.700 --> 00:02:02.900
 them? This is one particular topic. I

39
00:02:02.900 --> 00:02:04.000
 would like to touch base on.

40
00:02:05.700 --> 00:02:08.400
 Taking a scenario, especially in social media

41
00:02:08.400 --> 00:02:11.600
 websites, where the purse is the session

42
00:02:11.600 --> 00:02:13.100
 for a longer point of time.

43
00:02:14.400 --> 00:02:17.300
 That is because none of the users accessing the social

44
00:02:17.300 --> 00:02:21.100
 media multiple times in a day would want to enter

45
00:02:20.100 --> 00:02:23.900
 the credentials every time you access those. So

46
00:02:23.900 --> 00:02:26.400
 those are those business requirements, but

47
00:02:26.400 --> 00:02:29.700
 now it is about keeping the balance between the

48
00:02:29.700 --> 00:02:32.600
 business use case and Security in

49
00:02:32.600 --> 00:02:35.500
 place. If we have a session expiring for

50
00:02:35.500 --> 00:02:38.200
 a longer duration of time, we do give a

51
00:02:38.200 --> 00:02:41.200
 large amount of window for the attacker to gain

52
00:02:41.200 --> 00:02:42.300
 access to the sessions.

53
00:02:44.200 --> 00:02:48.500
 Could be multiple attack vectors that we looked at for example performing

54
00:02:48.500 --> 00:02:52.000
 brute force or performing very similar attack scenarios

55
00:02:51.200 --> 00:02:53.100
 and getting access.

56
00:02:54.600 --> 00:02:57.300
 The same time, if we Implement a very

57
00:02:57.300 --> 00:03:01.100
 short window of expiring the sessions that

58
00:03:00.100 --> 00:03:03.200
 becomes a trouble for the user to

59
00:03:03.200 --> 00:03:05.700
 always re-authenticate and position.

60
00:03:06.900 --> 00:03:09.200
 Either ways. This is something we need to take

61
00:03:09.200 --> 00:03:13.000
 into consideration and we can use this flag to

62
00:03:12.300 --> 00:03:15.100
 put out a certain window as to

63
00:03:15.100 --> 00:03:18.200
 how much should the session be valid. And that is something we

64
00:03:18.200 --> 00:03:19.800
 always need to enable.

65
00:03:22.300 --> 00:03:25.100
 The last parameter that I would like to talk about is the

66
00:03:25.100 --> 00:03:27.100
 same site and two main parameter.

67
00:03:28.400 --> 00:03:31.300
 So by setting this values, we are instructing saying

68
00:03:31.300 --> 00:03:34.500
 that which particular domains should

69
00:03:34.800 --> 00:03:37.600
 cookie be passed in today's scenario.

70
00:03:37.300 --> 00:03:40.700
 All the websites are quite complex where

71
00:03:40.800 --> 00:03:44.600
 there is a use case of multiple websites, accessing

72
00:03:43.600 --> 00:03:46.000
 the cookies between each other.

73
00:03:47.700 --> 00:03:50.900
 As long as there's a valid business case and always passes,

74
00:03:50.900 --> 00:03:53.400
 cookies, and that is where this particular parameter is

75
00:03:53.400 --> 00:03:54.900
 going to enable security.

76
00:03:55.900 --> 00:03:58.400
 Maybe Define the domains as to

77
00:03:58.800 --> 00:04:01.700
 whom should the cookie impasse to

78
00:04:01.800 --> 00:04:04.400
 and so that they can consume and authenticate the user.

79
00:04:05.900 --> 00:04:07.600
 That's it for this video. Thank you.
