The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

BurpHttpMock - faulty behavior only on installed macos version

mmm | Last updated: Sep 11, 2021 09:56AM UTC

Hello, there's a difference in behavior of the extension between Burp installed through the macos installer and Burp running as jar (both are community version 2021.8.2) When the jar version is running, the extension works as expected - it mocks responses. However, for the installed version the following error is displayed in the browser: "Error Invalid Argument". I'm the author of the extension and I try to analyse the problem. Initially the problem was submitted here: https://github.com/LogicalTrust/BurpHttpMock/issues/4 So far I went through the following steps: 1. The extension properly recognizes mocked entry and issues a new request (to the mocked server) private void handleRequest(IHttpRequestResponse messageInfo, URL url, IInterceptedProxyMessage message) https://github.com/LogicalTrust/BurpHttpMock/blob/9161d59c0a226d6882d29cb11025da25af30f4d6/src/net/logicaltrust/HttpListener.java#L56 2. The mock server receives the request and responds to it https://github.com/LogicalTrust/BurpHttpMock/blob/9161d59c0a226d6882d29cb11025da25af30f4d6/src/net/logicaltrust/server/MockLocalServer.java#L53 3. Here the problem emerges: in the installed version the response from the mock server doesn't reach "processProxyMessage" in the "IProxyListener" https://github.com/LogicalTrust/BurpHttpMock/blob/9161d59c0a226d6882d29cb11025da25af30f4d6/src/net/logicaltrust/HttpListener.java#L27 My question is - why this is happening only in installed version but in jar it works fine? Are there differences in Burp API behavior between platforms / installation methods that extension authors should be aware of? Should I modify the extension to make it work in the installed Burp?

Hannah, PortSwigger Agent | Last updated: Sep 14, 2021 10:20AM UTC

Hi Could you tell me what version of Java you are using locally? You can find this out by running "java -version" on your command-line interface. The main difference between the JAR and the Installer is that the JAR uses your local JAva version, whereas the Installer comes prepackaged with its own JDK. The version of Java that our latest Installer version currently uses is OpenJDK 15.0.2.

mmm | Last updated: Sep 14, 2021 10:57AM UTC

Hi, this is the output: openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

mmm | Last updated: Sep 14, 2021 11:07AM UTC

I tried running jar with OpenJDK 16. The problem with the extension exists in that case. Do you know what was changed in Java that causes such behavior? Is this an issue on the extension side that I should fix or is it in Burp itself?

Hannah, PortSwigger Agent | Last updated: Sep 15, 2021 09:46AM UTC