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
|
2023-04-28 08:11:21 +00:00
|
|
|
metadata:
|
|
|
|
max-request: 1
|
2023-10-14 11:27:55 +00:00
|
|
|
tags: tech,oauth
|
2022-04-22 10:38:41 +00:00
|
|
|
|
2023-04-27 04:28:59 +00:00
|
|
|
http:
|
2022-09-08 13:28:46 +00:00
|
|
|
- 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:
|
2023-10-14 11:27:55 +00:00
|
|
|
- 'error":"invalid_client"'
|
2023-10-20 11:41:13 +00:00
|
|
|
|
|
|
|
# digest: 4a0a004730450221008920ab1a64cea625f9fa75cc16e79ea29a580cb37f3022bf6321140996d686b9022043339df3882017519713f41f22be4855e384f6505b79983592ada49c83ab4ea1:922c64590222798bb761d5b6d8e72950
|