2022-09-08 13:28:46 +00:00
|
|
|
id: oauth2-detect
|
2022-04-22 10:38:41 +00:00
|
|
|
|
2022-09-08 13:28:46 +00:00
|
|
|
info:
|
|
|
|
name: OAuth 2.0 Authorization Server Detection Template
|
|
|
|
author: righettod
|
|
|
|
severity: info
|
|
|
|
description: Try to detect OAuth 2.0 Authorization Server via the "oauth/token" endpoint
|
|
|
|
tags: tech,oauth
|
2022-04-22 10:38:41 +00:00
|
|
|
|
2022-09-08 13:28:46 +00:00
|
|
|
requests:
|
|
|
|
- method: POST
|
|
|
|
path:
|
|
|
|
- "{{BaseURL}}/oauth/token"
|
|
|
|
|
|
|
|
body: "grant_type=authorization_code&client_id=xxx&redirect_uri=https%3A%2F%2Fprojectdiscovery.io&code=xxx&client_secret=xxx"
|
|
|
|
|
|
|
|
matchers-condition: and
|
|
|
|
matchers:
|
|
|
|
- type: status
|
|
|
|
status:
|
|
|
|
- 401
|
|
|
|
- 400
|
|
|
|
condition: or
|
|
|
|
|
|
|
|
- type: word
|
|
|
|
part: body
|
|
|
|
words:
|
2021-07-10 16:18:38 +00:00
|
|
|
- 'error":"invalid_client"'
|