Burp Suite User Forum

Create new post

replace text in websocket operations

Dave | Last updated: Apr 01, 2015 12:38AM UTC

I want to match and replace text in (outgoing) websockets. But it seems that match-and-replace only works on HTTP, not WebSockets. How can I edit WebSockets? Is there a way to do it with Burp that I haven't noticed? Failing that, what would I need to do to make it happen on my own?

PortSwigger Agent | Last updated: Apr 01, 2015 11:29AM UTC

You can't currently configure match/replace rules for WebSockets messages, sorry. But if you enable Proxy interception of WebSockets messages (at Proxy / Options / Intercept WebSockets Messages), then you can edit them as normal in the Intercept window.

Burp User | Last updated: Apr 01, 2015 01:58PM UTC

Could I write a plugin/extension, or does the API not allow for that?

PortSwigger Agent | Last updated: Apr 01, 2015 02:01PM UTC

Sorry, no, the API doesn't currently expose WebSockets messages.

Burp User | Last updated: Apr 14, 2015 01:50PM UTC

Dave, You can check out an extension that I wrote last year: just google on burp+websocket+extension. Part of the provided functionality is to use a custom filter class that is applied to intercepted websocket messages: basically you can select which messages to process and how to modify them. Source code for the extension is provided as well. Enjoy.

Faisal | Last updated: Jul 11, 2022 05:26PM UTC

is there any chance to add this option ?

Hannah, PortSwigger Agent | Last updated: Jul 12, 2022 08:15AM UTC

Hi. We've added your +1 to our ongoing feature request for this functionality. As part of our roadmap this year, we're remaking the Extender API and will later be adding additional functionality to it. We will be further reviewing this feature request as part of that work later this year.

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