Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose recorded login API to the 'burpa scan' command #5

Open
tristanlatr opened this issue Jun 22, 2021 · 11 comments
Open

Expose recorded login API to the 'burpa scan' command #5

tristanlatr opened this issue Jun 22, 2021 · 11 comments

Comments

@tristanlatr
Copy link
Owner

It would quite simple to add --recorded-login-label <string> and --recorded-login-script <string or path> that fills the following active scan params:

{
""application_logins":"[
  {
    "label": String,
    "script": String
  }]
}
@ganesh2183
Copy link

Hi @tristanlatr , Can we use 'recorded-login-script' command in Burpa. If so how to use, please share the example to use this.

@tristanlatr
Copy link
Owner Author

Hi @ganesh2183, this feature is not implemented yet.

Any contributions would be appreciated.

Please have a look at the active_scan method there: https://github.com/tristanlatr/burpa/blob/main/burpa/_burp_commander.py#L78 it's a good starting point to implement this feature.

@ganesh2183
Copy link

ganesh2183 commented Nov 15, 2022

@tristanlatr i have tried to add recorded login api in burpa command. when i pass recorded script in command, getting "json.decoder.JSONDecodeError: Invalid \escape: line 10 column 77 (char 560)".

Any idea why getting this error, how to fix this.

@tristanlatr
Copy link
Owner Author

This error means you are constructing an invalid JSON string in the data variable.

@ganesh2183
Copy link

ganesh2183 commented Nov 16, 2022

@tristanlatr i tried again, now i m getting as '400 Client Error: Bad Request...' Response: {"type":"ClientError","error":"could not parse recorded login sequence to JSON"}

Any idea what to do, how to fix this??

Can i share the code with my changes.

@tristanlatr
Copy link
Owner Author

Yes please open a pull request such that I can see your changes. Thanks.

@ganesh2183
Copy link

ganesh2183 commented Nov 20, 2022

This error means you are constructing an invalid JSON string in the data variable.

As you said there is issue with constructing the JSON string, the recorded script provided in command prompt/powershell as input for recorded_login_script argument it is not able to parse JSON string as expected by burp tool. It accepts if i replace in recorded script with triple backslash with double quotes from " to parse JSON. For ex: [{\"name\": \"Burp Suite Navigation Recorder\", \"url\": \"https://example.com/login/index.html#/home\", \"isIframe\": false}]

Also I tried using json.dumps() in code, still it is not working.

Can you help to fix the issue.

@tristanlatr
Copy link
Owner Author

Hello @ganesh2183,

Please read up on contributing with git to open one pull request with your changes, so I can test it and give a better review, and eventually, merge your work into this project.

Also, by looking at the code you proposed, it looks like you replaced the username/password authentication by the recorded login system. If you want to contribute, the changes should be compatible, so both options should be supported. Regarding the JSON parsing, maybe the script should be read from a file, that would be more simple for parsing the JSON ?

@ganesh2183
Copy link

@tristanlatr Do you want me to do pull request again. i will add both authentication method.

I'm very new to python coding. Also can you help me how to add script to read json script file to parse the json. Is it possible to connect ?

@ganesh2183
Copy link

@tristanlatr I have open one pull request with both authentication methods. Please have a look and let me know.

Need your help to add script to read json script fill to parse the json.

@ganesh2183
Copy link

@tristanlatr Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants