Before you start
Session cookie authentications can be used to send a specific cookie to the application with every request. This allows you to define one very complex cookie which can then be assigned to the scanner to authenticate to your application.
Adding the authentication
Throughout this example, we will be using
126.96.36.199 where we are hosting our test application, you may use a fully qualified domain name (FQDN) or IP address
To begin, add the target from the Targets page by clicking on the '
Add Target' button and selecting '
Add external web application'. Here you can specify the target, the entrypoint URL, add any tags and then click the '
Add target ->' button.
Then choose the '
Add an authentication' option and click '
Select the '
Session Cookie' option and add the relevant parameters to the configuration:
In this example, we are starting our scan from the
/php/ page of our application (
http://188.8.131.52/php/). Unlike form-based authentication there is no login URL, instead the headers you define are sent with every request.
In our example we specify that there is a Logout URL which we want to exclude from scanning (
http://184.108.40.206/php/logout), this will help us make sure that we don't invalidate the cookie you have set.
We specify a Cookie Name of
PHPSESSIONID with the value
0123456789abcdef0123456789abcdef. and a second cookie name
Source with the value set to
Intruder. You can add multiple cookies if you need to.
Verifying the authentication
Given how nuanced apps are, we don't presume the accuracy of authentication – instead, we show you what the scanner encountered and allow you to decide whether it has worked or not (the screenshot in particular is helpful, as you can use that to gauge if the scanner can access pages behind the login).
You could get any combination of results, here are just a few:
Once you've completed this information you will see the authentication appear under the Authentications tab.
To disable an authentication
... > Disable:
And the modal will update to this:
To re-enable, just click the ellipsis again >