WEBVTT - This file was automatically generated by VIMEO

0
00:00:03.900 --> 00:00:06.500
Hello everyone and welcome to this lesson

1
00:00:06.500 --> 00:00:10.500
 in this lesson. We are going to learn about base request

2
00:00:09.500 --> 00:00:12.800
 that I've been used by nuclei from

3
00:00:12.800 --> 00:00:13.800
 the nuclear template.

4
00:00:15.300 --> 00:00:17.800
As we have seen the info in the ID block.

5
00:00:19.200 --> 00:00:21.800
Now we are going to understand about the request block.

6
00:00:23.200 --> 00:00:27.400
So the request block contains request methods now,

7
00:00:26.400 --> 00:00:30.100
 this could be different HTTP methods

8
00:00:29.100 --> 00:00:32.800
 like get post put delete options

9
00:00:32.500 --> 00:00:33.600
 Etc.

10
00:00:35.100 --> 00:00:38.200
You can also specify if you want to redirect to

11
00:00:38.200 --> 00:00:40.600
 happen with the help of redirects.

12
00:00:41.700 --> 00:00:44.200
Each request should be given a path using

13
00:00:44.200 --> 00:00:45.500
 a path column.

14
00:00:47.700 --> 00:00:50.400
There are also Dynamic path variables that

15
00:00:50.400 --> 00:00:53.900
 you should keep in mind while you are going to write a

16
00:00:53.900 --> 00:00:55.300
 custom nuclei template.

17
00:00:56.800 --> 00:00:59.200
As you can see over here on your left here is

18
00:00:59.200 --> 00:01:02.800
 the keyword here is the description for each keyword and

19
00:01:02.800 --> 00:01:04.000
 the example as well.

20
00:01:04.900 --> 00:01:07.700
Let us understand the first one, which is the base URL.

21
00:01:08.500 --> 00:01:11.100
So whenever you see base URL in the

22
00:01:11.100 --> 00:01:14.700
 template, it will replace the base URL

23
00:01:14.700 --> 00:01:17.600
 variable with the input URL that

24
00:01:17.600 --> 00:01:18.400
 you have supplied.

25
00:01:19.100 --> 00:01:21.100
So the example would look something like this.

26
00:01:23.300 --> 00:01:24.800
The second is the root URL.

27
00:01:25.400 --> 00:01:28.500
Which replaces with the root URL that has been

28
00:01:28.500 --> 00:01:31.400
 provided not with the base URL

29
00:01:31.400 --> 00:01:32.300
 or the endpoint?

30
00:01:33.600 --> 00:01:34.900
Next is the host name.

31
00:01:36.800 --> 00:01:39.000
So this replaces with

32
00:01:39.200 --> 00:01:42.600
 the hostname and the port number that you have supplied during the

33
00:01:42.600 --> 00:01:45.200
 scan example would look something like this.

34
00:01:46.400 --> 00:01:49.500
Next is the host which replaces only the

35
00:01:49.500 --> 00:01:50.700
 host name, which is

36
00:01:51.500 --> 00:01:51.800
this

37
00:01:53.200 --> 00:01:56.100
Port replaces the port number which is

38
00:01:56.100 --> 00:01:59.300
 like this path which replaces with the

39
00:01:59.300 --> 00:02:02.900
 path for example slash test a specific

40
00:02:02.900 --> 00:02:06.900
 file for example example.txt or

41
00:02:06.900 --> 00:02:09.600
 if you want to replace or change the scheme, you

42
00:02:09.600 --> 00:02:12.100
 can also do that with this scheme variable.

43
00:02:13.500 --> 00:02:16.500
So it is the Practical time and let's see how we

44
00:02:16.500 --> 00:02:19.700
 can use Dynamic variables in nuclei templates.

45
00:02:21.600 --> 00:02:24.500
So as you can see over here, this is our

46
00:02:24.500 --> 00:02:26.300
 ID and the info block.

47
00:02:26.900 --> 00:02:30.500
In the request block we have specified the

48
00:02:29.500 --> 00:02:32.300
 HTTP method

49
00:02:32.300 --> 00:02:33.200
 as get.

50
00:02:34.200 --> 00:02:37.100
You can also see over here the dynamic path that we have

51
00:02:37.100 --> 00:02:40.700
 provided. The first is the base URL second is

52
00:02:40.700 --> 00:02:43.900
 the root URL then HTTP colon

53
00:02:43.900 --> 00:02:47.100
 slash slash hostname host base

54
00:02:46.100 --> 00:02:50.300
 URL cooling Port https. Colon

55
00:02:49.300 --> 00:02:52.500
 slash slash hacktify.in path.

56
00:02:53.200 --> 00:02:55.600
And then hacktify dot in slash file.

57
00:02:56.500 --> 00:02:59.800
What we are going to do right now is for demonstration.

58
00:02:59.800 --> 00:03:02.400
 I have hosted a file

59
00:03:02.400 --> 00:03:05.700
 called as file 1.txt inside a

60
00:03:05.700 --> 00:03:08.900
 nuclei path on bug bounty hunter.org.

61
00:03:09.600 --> 00:03:13.000
So you can also use this for practicing while

62
00:03:12.500 --> 00:03:15.800
 you're creating your custom templates to validate

63
00:03:15.800 --> 00:03:18.500
 if your custom templates are working correctly or

64
00:03:18.500 --> 00:03:18.800
 no?

65
00:03:20.500 --> 00:03:24.500
Alright, so we are going to test against this target against file

66
00:03:24.500 --> 00:03:28.100
 1.txt file and path nuclei.

67
00:03:29.100 --> 00:03:32.600
I'm going to quickly go to my terminal and I'm going

68
00:03:32.600 --> 00:03:33.600
 to say eco.

69
00:03:34.300 --> 00:03:34.500
and

70
00:03:35.800 --> 00:03:39.200
the target with the path in

71
00:03:38.200 --> 00:03:41.200
 the file both. I'm going

72
00:03:41.200 --> 00:03:44.600
 to provide this as a standard input to nuclei and

73
00:03:44.600 --> 00:03:47.200
 I'm going to run a template that we have

74
00:03:47.200 --> 00:03:51.300
 created just now which is request.yml, which

75
00:03:50.300 --> 00:03:52.600
 is this template.

76
00:03:55.600 --> 00:03:58.900
Now, let's provide this template to nuclei and

77
00:03:58.900 --> 00:04:01.900
 add - viveen V

78
00:04:01.900 --> 00:04:04.500
 stats for verbose which means we will

79
00:04:04.500 --> 00:04:07.300
 be able to see what exactly is happening currently.

80
00:04:08.700 --> 00:04:11.600
Once we hit enter you can see the first request has

81
00:04:11.600 --> 00:04:14.600
 been sent correctly to this endpoint at

82
00:04:14.600 --> 00:04:17.600
 file.txt. Let's open the request

83
00:04:17.600 --> 00:04:20.800
 blocks as well and the terminal

84
00:04:20.800 --> 00:04:21.200
 both

85
00:04:22.800 --> 00:04:25.600
you can see the second request that was sent

86
00:04:25.600 --> 00:04:28.100
 like this, which is for the first

87
00:04:28.100 --> 00:04:31.700
 one was the base URL second is the root URL. Next

88
00:04:31.700 --> 00:04:33.800
 is the host name that was provided.

89
00:04:35.500 --> 00:04:38.300
Next is the host which was provided

90
00:04:38.300 --> 00:04:41.700
 as can be seen over here. The next is the port

91
00:04:41.700 --> 00:04:44.200
 number path and file. So let us see

92
00:04:44.200 --> 00:04:45.100
 this as well.

93
00:04:45.900 --> 00:04:48.900
So this is the port number which automatically got

94
00:04:48.900 --> 00:04:52.400
 added. This is the file path

95
00:04:51.400 --> 00:04:54.600
 and this is the file

96
00:04:54.600 --> 00:04:57.200
 itself. So I hope

97
00:04:57.200 --> 00:05:00.900
 you are in clear idea of dynamic variables

98
00:05:00.900 --> 00:05:03.300
 of how it has been used while you can

99
00:05:03.300 --> 00:05:07.100
 create the same thing in your nuclei template.

100
00:05:08.200 --> 00:05:08.600
Thank you.
