2021-07-05 17:58:44 +00:00
|
|
|
id: oauth2-detect
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
requests:
|
|
|
|
- method: POST
|
|
|
|
path:
|
|
|
|
- "{{BaseURL}}/oauth/token"
|
2021-07-10 16:18:38 +00:00
|
|
|
|
2021-07-05 17:58:44 +00:00
|
|
|
body: "grant_type=authorization_code&client_id=xxx&redirect_uri=https%3A%2F%2Fprojectdiscovery.io&code=xxx&client_secret=xxx"
|
|
|
|
|
2021-07-10 16:18:38 +00:00
|
|
|
matchers-condition: and
|
2021-07-05 17:58:44 +00:00
|
|
|
matchers:
|
|
|
|
- type: status
|
|
|
|
status:
|
|
|
|
- 401
|
2021-07-10 16:18:38 +00:00
|
|
|
- 400
|
|
|
|
condition: or
|
|
|
|
|
|
|
|
- type: word
|
|
|
|
part: body
|
|
|
|
words:
|
|
|
|
- 'error":"invalid_client"'
|