Git Product home page Git Product logo

bountyplz's Introduction

bountyplz – automated security reporting from markdown templates

description

This is a project created by Frans Rosén. The idea is to be able to submit a report without any interaction. It's taking advantage of all features the existing site has, such as attachments, inline images, assets, weaknesses and severity.

bountyplz supports submitting to HackerOne and Bugcrowd.

bountyplz will sign in to HackerOne or Bugcrowd and keep the session, create a draft and submit the report, all in one step. It also supports 2FA, if this is enabled on your HackerOne- or Bugcrowd-account.

HackerOne:

Bugcrowd:

install

brew install jq
brew install gnu-sed
brew install coreutils

ln -fs "$(pwd)/bountyplz" /usr/local/bin/bountyplz

usage HackerOne h1

Place .env with HACKERONE_USERNAME and HACKERONE_PASSWORD next to the binary.

bountyplz h1 <program> <markdown-file>

-p for preview
-d for draft-only
-f for force

usage Bugcrowd bc

Place .env with BUGCROWD_USERNAME and BUGCROWD_PASSWORD next to the binary.

bountyplz bc <program> <markdown-file>

-p for preview
-d for draft-only (will upload files but not save any draft as this is currently not supported on Bugcrowd)
-f for force

howto

Write report in markdown, use frontmatter for attributes for the report. The title of the report will be taken from the content's first #-header.

---
severity: high
weakness: xss reflected
asset: example.com
---

# Report title

Report description

The following attributes are currently supported:

key type desc
asset string will be matched against the list of assets for the program
weakness string will be matched against the list of weaknesses for the program.
attachments json-array list of files that should be attached. ["test.jpg","test2.jpg"]
if images and videos are used inline, these does not need to be in this list
url string bug URL (BugCrowd only, not required)
severity string none, low, medium, high, crical (HackerOne only)

When the report is submitted, an additional report-attribute will be added to the markdown with the reference URL for the report. This is to make sure the same report is not submitted twice.

asset and weakness will try to match against the list of available options. If multiple results are found, a list will be shown to select the right one:

impact

For HackerOne, if any header with the word impact exist in the report, the report will be split in half and the content after Impact will be inserted in the Impact-field. If no Impact exists in the report, the Impact field will only contain a # rendering it empty.

---
asset: example.com
---

# Report title

Report description

### impact

This will be in the impact field.

For Bugcrowd, the whole report will be inside the Description-field.

inline attachments

When referring to images or videos inside the report, use this format: <img upload src="x.jpg" />

Every image or video element containing <img|video upload will be extracted from the report and uploaded automatically. The location of the file referenced will always be relative to the markdown-file, and the preview before submitting will make sure all files exists.

preview -p

You can preview the report before sending it using:

bountyplz h1 yahoo -p test/report1.md

This will not submit the report, but show you how the report was parsed.

draft-only -d

You can submit the report as a draft only using:

bountyplz h1 yahoo -d test/report1.md

Please note that Asset and Severity are not currently possible to save in the draft on HackerOne.

force -f

Whenever a file has been reported, the markdown-file is being modified to add a reference to the report-URL inside the frontmatter called report: URL. This is to prevent the report from being submitted again. By using -f you can force the report to be submitted, even if it has a report:-entry in the frontmatter. Use with caution to prevent duplicate reports.

batch

This command will run all markdown files and report them. If a report already has a "report: "-reference in it, the report will not be sent.

find . -name "*.md" \( -exec bountyplz h1 <program> {} \; -o -quit \)

bountyplz's People

Contributors

fransr avatar rubyroobs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bountyplz's Issues

Titles submitted with Markdown header # symbol.

Hey Frans,

When submitting a report, I noticed that the title contains the Markdown header symbol # as seen below. For some reason, the title in your screenshot is different to mine.

image

--- attributes:
title: # Unauthenticated reflected XSS in example.com via the p parameter.
program: utopia-test
weakness: xss reflected
inline-attachments: img1.png,file2.png,file3.png,file4.png,ok.mp4
---

Steps to reproduce

  1. Create a Markdown report with the following contents:
---
weakness: "xss reflected"
---

# Unauthenticated reflected XSS in example.com via the p parameter.

This is cool!

# Another title

```
Testing 1234
```

## Impact

This is the impact, go for it!
  1. Submit the report;
$ bountyplz h1 program report.md
  1. Navigate to the submitted report.

Setup

I am running this tool on Ubuntu 17.10.

jq invalid char (weakness)

Hi @fransr,

First of all, thank you for your script that will help me to automatize some tasks ;)

I've some issue when i try to use your script on bugcrowd.

command used

./bountyplz bc some_private test.md

and the error appears when parsing the weakness forms to display:

error: Invalid character
.options[] as $root | $root.children[]? as $parent | $parent.children[]? as $child | {root: $root, parent: $parent, child: $child} | {name: (.root.name + " / " + .parent.name + " / " + .child.name), id: (.root.id + "." + .parent.id + "." + .child.id)}
                                      ^
error: Invalid character
.options[] as $root | $root.children[]? as $parent | $parent.children[]? as $child | {root: $root, parent: $parent, child: $child} | {name: (.root.name + " / " + .parent.name + " / " + .child.name), id: (.root.id + "." + .parent.id + "." + .child.id)}
                                                                       ^
2 compile errors

Here are the informations on my md file:

---
weakness: Sensitive Data Exposure
asset: other
url: https://rblabla
---

I'm not very fluent with jq syntax so if you can help me, thank you in advance ;)

Best regards,

Nicknam3

Bugcrowd Issue

Hello

When I try to submit a report via H1 all good but from BC I have this error
/usr/local/bin/bountyplz: line 70: _scope: unbound variable

Best regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.