Burp Suite User Forum

Create new post

How do I replace the content of a whole file?

R. | Last updated: Feb 05, 2015 10:18AM UTC

Hi, a web app I am testing is requesting jar files from a web server. I want to replace the jar file the server sends back with a modified version. I can of course intercept the response and manually replace the response content, but this is error prone and takes time. I have certain timing issues that make manually pasting the jar file not an option. So, how do I replace the whole response body with something else? Thank you very much, R.

PortSwigger Agent | Last updated: Feb 05, 2015 12:24PM UTC

You can use the "Paste from file" option on the context menu to paste binary content from a file.

Burp User | Last updated: Feb 05, 2015 12:52PM UTC

Hello Dafydd, thank you very much for the fast reply. Sadly, there are certain timing constraints which prevent me from manually pasting the file. Is there a built-in way of automating this, or would I need to write an extension for this?

PortSwigger Agent | Last updated: Feb 05, 2015 02:25PM UTC

Ok, if the timing issues mean it's not feasible to do any quick manual operations on an intercepted message, then you'll need to write an extension. You can register an IHttpListener or IProxyListener and modify relevant requests before they are sent.

Ronin | Last updated: Dec 20, 2023 09:47AM UTC

Hey I like your response but what if I wanted to patch a download from play store or merge a download with my payload in order to get a back door? That's where I'm at that's what I need I know the TLS hand shake can be modified and SSL stripping is kind of an unstable foundation for that but that's where I'm at

Michelle, PortSwigger Agent | Last updated: Dec 20, 2023 11:49AM UTC

Hi Thanks for getting in touch. Can you tell us more about the issues you're having and what you need to achieve? Are you able to use any of the previous suggestions and achieve what you need manually, or are there also timing issues in your scenario?

Ronin | Last updated: Dec 26, 2023 08:43AM UTC

Well in mitmproxy I can replace downloads by modifying the http get url from https://originalurl/originaldownload To http://myurl/mydownload And retrieve my modified download in place of the original but In burpsuite I have a get and host option not a single http get url I want to know what label I need to modify in order to replace the downloads

Michelle, PortSwigger Agent | Last updated: Dec 27, 2023 10:01AM UTC

Can you send an email with screenshots of the steps you're taking in mitmproxy so we can let you know what the equivalent steps would be in Burp? This will help us make sure we have correctly understood what you need to achieve.

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