Hi, so in this lesson we
are going to understand about headers.
How we can specify nuclei templates
to use custom headers that you want that
you need to send along with your HTTP traffic
while you are running nuclei onto any
bug Bounty program.
So headers can be defined using headers
colon.
They are placed in a key value format. That
means example header
should look something like this, which is user agent
colon some random user
agent. You can specify as many
as headers you want in a specific
request.
And we know that while we are testing for specific vulnerabilities
modifying these headers can
be super useful as well.
So it's the Practical line and let's see how you
can do it.
I have written a template which is headers.yml that
you can use.
If you look carefully in this template, we
have a ID block which says nuclei head
is block. We have information block, which
says name as nuclei head is block and other
basic information.
The request block says the method as get the path
is the base URL that will be
taken from the input that we will supply to neatly
as a Target.
Now this is the important part which is
the headers.
You can see I have specified the user
agent as hackedify X forwarded host
as hackify not in Cache control
as no transform and I have also
applied a custom header, which is test header as
hello world.
Let's save this template that we have just created and pass
it to nuclear.
This time we are not going to use these.
Old template but instead we are
going to use the Headless template that we have created.
So I'm going to drop this template over here, and I'm
going to hit enter.
When I do that the request will pass through
the proxy as we have already configured the proxy with
nuclei. So let's go in book and see
the second request that might have been received that
we executed just now.
Let me go to the proxy Tab and HTTP history.
You can see this is the second request that we have sent just
now.
If you look carefully.
Here, this is the request that we have received with
the get.
method
you can also see the headers that we
supplied.
You can see X forwarded host as hacktified.in
test header as hello world
and cash control as no transform.
This is exactly the same headers that we
have written in our headers.yml file
as a custom template that has
been sent to the server.
I hope you guys understood this. Thank you.