Burp Suite User Forum

Create new post

Modifying message before intercepting

Specialty | Last updated: Jul 25, 2016 06:23PM UTC

Hi, I'm writing an extension which uses processProxyMessage() to modify the targets and bodies of various requests in various ways. For certain requests, I use message.setInterceptAction(ACTION_DO_INTERCEPT) to have the request intercepted by Burp's proxy gui. My issue is that when the request appears in Burp's proxy gui, it is being sent to the original target, rather than my modified target. So let's say I have a request going to foo.com. I have code similar to the following: service = HttpService.new("bar.com") message.getMessageInfo.setHttpService(service) message.setInterceptAction(IInterceptedProxyMessage.ACTION_DO_INTERCEPT) But instead of being sent to bar.com, the message in proxy is still going to foo.com. Note: I have used setHttpService() in other situations to change the target successfully. It only poses a problem when I use it in conjunction with setInterceptAction() Note also: I manipulate the request's body as well as the target (using setRequest). The manipulations to the body are present in the proxy gui once the request is intercepted. It's only the target that gets reverted. Thank you

PortSwigger Agent | Last updated: Jul 26, 2016 07:56AM UTC

Thanks for this report. We've reproduced this problem and will get it fixed.

PortSwigger Agent | Last updated: Aug 22, 2016 03:38PM UTC

Just to let you know that we've fixed this issue in today's release, 1.7.05. Thanks again for your feedback and let us know if you run into any other problems.

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