I am testing a website that makes heavily use of REST API endpoints. After authentication, the app adds the authentication token as part of every request in the form of:
OPTIONS
https://www.target.com/api/Action/some-action?data=foobar&access_token=THISISTHETOKEN
User-Agent: ...
Accept: */*
..
Host: target.com
Length: 0
How can I force that every request (inside the spider, scanner, etc.) uses this predefined parameter such that I can browser authenticated?
Update:
I tried creating a Http Sender Script but I fail at modifying the http url parameters:
function sendingRequest(msg, initiator, helper) {
var token = org.parosproxy.paros.network.HtmlParameter
token.setType(org.parosproxy.paros.network.HtmlParameter.Type.url)
token.setName('access_token')
token.setValue('foo')
print('token: ' + String(token))
msg.getUrlParams().add(token)
print(msg.getUrlParams())
}