Burp Suite User Forum

Create new post

Macro

Peter | Last updated: Nov 01, 2016 12:25PM UTC

Hopefully this question isn't too stupid but, is it possible to run a macro from an extension? I'm trying to set up an automation process where burp will run my extension, the extension will run a login macro and then analyze the results. Thanks

PortSwigger Agent | Last updated: Nov 01, 2016 12:38PM UTC

The way you do this is to configure Burp to run the macro in the normal way, as a session handling action, then configure the action to invoke your extension after the macro. Your extension will receive details of the macro's execution, and so can analyze the results and make whatever changes to the current request are warranted.

Burp User | Last updated: Nov 02, 2016 11:43AM UTC

Thanks - is there a way to execute a rule upon start up? I'm trying to get an automatic test suite up. The first thing that I want to do is open burp, have it run the macro, analyze the results (it's simply logging in and I'm testing to make sure that certain cookie attributes are set, the session token is not being reused, etc). But I want this to be an automatic thing - if possible.

PortSwigger Agent | Last updated: Nov 04, 2016 02:10PM UTC

You can actually make requests on startup of your extension, within the registerExtenderCallbacks method, if that is what you really want to do. You can't force Burp to run a session rule in isolation, but you could hard-code your macro requests into your extension. Alternatively, as a hack, you could make your extension issue a request that is in-scope for the configured session handling rule, so that the macro fires when the request is processed.

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