Burp Suite User Forum

Create new post

ISessionHandling - use toolflags to find out where the request comes from

NazarMedeiros | Last updated: Nov 02, 2016 01:22PM UTC

Hello, something really cool is, that the IHttpListener interface provides a method: " processHttpMessage(int toolFlag, boolean messageIsRequest, IHttpRequestResponse messageInfo) " where you can use the toolFlag variable to find out where the request comes from (Proxy,Repeater etc.) I was wondering if I could use this (toolFlags) somehow in the peformAction()-Method? Is it possible to analyze the request "source" maybe in another way? Best regards, Nazar

PortSwigger Agent | Last updated: Nov 04, 2016 02:27PM UTC

There isn't a way to identify the invoking tool when processing a session handling action, sorry.

Burp User | Last updated: Nov 07, 2016 07:54AM UTC

That is absolutely ok. I tried another way, which was to use the processHttpMessage()-method from the IHttpListener to manipulate each request. Using the toolFlag, it is an easy way to exclude the requests which come from the Proxy tool. So far so good.. The manipulation works in the same way using " messageInfo.setCurrentRequest()". The only thing whoch does not work, is to make the updated values visible in the Repeater tab. In my logs I can see that the request is updated ,but it is not visible. When I used currentRequest.setRequest() within the performAction()-method, I could see the updated values directly in the Repeater tab. Can I do something to solve this problem? Thanks in advance! Best regards, Nazar

PortSwigger Agent | Last updated: Nov 07, 2016 08:56AM UTC

When you use an IHttpListener, the request is modified just before it hits the wire, and after it has "left" the invoking tool, so the Repeater tool does not know that the request was modified. Another possible option would be for you to revert to use a session handling action, and in the UI configure the rule to the only in scope for the Repeater tool. Then your code can modify every request on the assumption that it must have been issued by Repeater.

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.