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

Create Use-of-Password-Grant-Type.bcheck #236

Merged
merged 13 commits into from
Nov 26, 2024

Conversation

LabMC
Copy link
Contributor

@LabMC LabMC commented Nov 11, 2024

  • Context: The Use-of-Password-Grant-Type file is used to detect for usage of the password grant_type in OAuth within GET & POST HTTP requests' HTTP request bodies.
  • I have additionally added a /OAuth folder within the /other root folder.

BCheck Contributions

  • BCheck compiles and executes as expected
  • BCheck contains appropriate metadata (name, version, author, description and appropriate tags)
  • Only .bcheck files have been added or modified
  • BCheck is in the appropriate folder
  • PR contains single or limited number of BChecks (Multiple PRs are preferred)
  • BCheck attempts to minimize false positives

LabMC added 11 commits November 11, 2024 10:15
- `Use-of-Password-Grant-Type` file is used to detect for the `password` grant_type in OAuth.
- Test to detect for indicators of `password/secret` values within known JavaScript library methods.
Updated regex to use `[-_ ]?` instead of arbitrarily set repeated terms.
The `Use-of-Basic-Auth-Scheme.bcheck` file searches for HTTP requests which possess the `Authorization: Basic` HTTP request header yet was not set with an Internet Protocol/Port that supported TLS encryption.
- Created BCheck searches passively through HTTP methods by detecting whether non-GET/POST HTTP methods appear used in an HTTP request, or if non-GET/POST HTTP methods are present in a `Access-Control-Allow-Methods` HTTP response header value.
…s/httpMethodOverrideCapability.bcheck

- Moved this bcheck file into a dedicated `HTTP Methods` folder.
…/Password in JavaScript Logger.bcheck

- Moved file into JavaScript folder.
- Moved file into `JavaScript` folder.
…mported.bcheck

- Moved file into `JavaScript` folder.
Copy link
Contributor

@Michelle-PortSwigger Michelle-PortSwigger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all your work, it's really good to see how you're using BChecks and that you're happy to share with the wider community :)

We've made a couple of suggestions for small tweaks/enhancements. In the future you might want to send each BCheck as a separate pull request so ones that are ready to go can be merged immediately.

- Updated test to limit scans towards only the `HTML` or `Script` MIME types.
- Updated test to limit scans towards only non-'400s/500s' error responses.
- Updates made to only ignore HTTPS-related ports.
Copy link
Contributor

@Michelle-PortSwigger Michelle-PortSwigger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank your for the updates :)

Copy link
Collaborator

@PortSwiggerWiener PortSwiggerWiener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

Many thanks for your submissions and patience during the review process.

@PortSwiggerWiener PortSwiggerWiener merged commit 5f63176 into PortSwigger:main Nov 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants