jrmdev / mitm_relay

Hackish way to intercept and modify non-HTTP protocols through Burp & others.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Burp Repeater support

gao-hui opened this issue · comments

If it is possible to add something for mitm_relay to support Burp Repeater, where I can use my crafted SIP message? (maybe, Burp Repeater -> mitm_web_server -> ... -> SIP endpoint).
As in the description of intercept procedure in your README, ,we can use Burp Proxy to intercept and modify messages. (like, thick client -> listeners ->Burp Proxy -> web sever -> ... -> endpoint).

Or, say it, like Burp Proxy procedure (intercept and modify messages, then send it to dummy web sever... then to endpoint through mitm_relay), is it possible to do similar thing using Burp Repeater (send crafted messages directly to dummy web sever... then to endpoint through mitm_relay).

I thought about this and it's not going to be entirely possible.

Although it is possible to make the dummy webserver get the requests from the repeater, and to make the webserver forward the repeater's request to the endpoint server, it won't be possible to get the server's reply in burp repeater's "response" pane. The reason is that the endpoint server will send it's reply to the webserver, not to the repeater.

At this point, if we add a recv() call inside the webserver handler (to try to forward the reponse back to the repeater), it will break the asyncrhonous nature of the tool (plus if the server doesn't reply, the tool will hang forever). This is because the webserver code is completely outside of the relay code.

However, what is potentially doable, is to forward the repeater's request to the endpoint server, and not care for any reply. The repeater response will just see an echo-back of the request. Any endpoint server response will be forwarded back to the proxy history as normal. Let me know if there is interest for this as it shouldn't be too hard to implement.