108 lines
3.6 KiB
YAML
108 lines
3.6 KiB
YAML
id: swagger-api
|
|
|
|
info:
|
|
name: Public Swagger API - Detect
|
|
author: pdteam,c-sh0
|
|
severity: info
|
|
description: Public Swagger API was detected.
|
|
reference: https://swagger.io/
|
|
classification:
|
|
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
|
|
cwe-id: CWE-200
|
|
metadata:
|
|
verified: true
|
|
max-request: 57
|
|
shodan-query: http.title:"swagger"
|
|
tags: exposure,api,swagger
|
|
|
|
http:
|
|
- method: GET
|
|
path:
|
|
- "{{BaseURL}}/swagger-ui/swagger-ui.js"
|
|
- "{{BaseURL}}/swagger/swagger-ui.js"
|
|
- "{{BaseURL}}/swagger-ui.js"
|
|
- "{{BaseURL}}/swagger/ui/swagger-ui.js"
|
|
- "{{BaseURL}}/swagger/ui/index"
|
|
- "{{BaseURL}}/swagger/index.html"
|
|
- "{{BaseURL}}/swagger-ui.html"
|
|
- "{{BaseURL}}/swagger/swagger-ui.html"
|
|
- "{{BaseURL}}/api/swagger-ui.html"
|
|
- "{{BaseURL}}/api-docs/swagger.json"
|
|
- "{{BaseURL}}/api-docs/swagger.yaml"
|
|
- "{{BaseURL}}/api_docs"
|
|
- "{{BaseURL}}/swagger.json"
|
|
- "{{BaseURL}}/swagger.yaml"
|
|
- "{{BaseURL}}/swagger/v1/swagger.json"
|
|
- "{{BaseURL}}/swagger/v1/swagger.yaml"
|
|
- "{{BaseURL}}/api/index.html"
|
|
- "{{BaseURL}}/api/doc"
|
|
- "{{BaseURL}}/api/docs/"
|
|
- "{{BaseURL}}/api/swagger.json"
|
|
- "{{BaseURL}}/api/swagger.yaml"
|
|
- "{{BaseURL}}/api/swagger.yml"
|
|
- "{{BaseURL}}/api/swagger/index.html"
|
|
- "{{BaseURL}}/api/swagger/swagger-ui.html"
|
|
- "{{BaseURL}}/api/api-docs/swagger.json"
|
|
- "{{BaseURL}}/api/api-docs/swagger.yaml"
|
|
- "{{BaseURL}}/api/swagger-ui/swagger.json"
|
|
- "{{BaseURL}}/api/swagger-ui/swagger.yaml"
|
|
- "{{BaseURL}}/api/apidocs/swagger.json"
|
|
- "{{BaseURL}}/api/apidocs/swagger.yaml"
|
|
- "{{BaseURL}}/api/swagger-ui/api-docs"
|
|
- "{{BaseURL}}/api/doc.json"
|
|
- "{{BaseURL}}/api/api-docs"
|
|
- "{{BaseURL}}/api/apidocs"
|
|
- "{{BaseURL}}/api/swagger"
|
|
- "{{BaseURL}}/api/swagger/static/index.html"
|
|
- "{{BaseURL}}/api/swagger-resources"
|
|
- "{{BaseURL}}/api/swagger-resources/restservices/v2/api-docs"
|
|
- "{{BaseURL}}/api/__swagger__/"
|
|
- "{{BaseURL}}/api/_swagger_/"
|
|
- "{{BaseURL}}/api/spec/swagger.json"
|
|
- "{{BaseURL}}/api/spec/swagger.yaml"
|
|
- "{{BaseURL}}/api/swagger/ui/index"
|
|
- "{{BaseURL}}/__swagger__/"
|
|
- "{{BaseURL}}/_swagger_/"
|
|
- "{{BaseURL}}/api/v1/swagger-ui/swagger.json"
|
|
- "{{BaseURL}}/api/v1/swagger-ui/swagger.yaml"
|
|
- "{{BaseURL}}/swagger-resources/restservices/v2/api-docs"
|
|
- "{{BaseURL}}/api/swagger_doc.json"
|
|
- "{{BaseURL}}/docu"
|
|
- "{{BaseURL}}/docs"
|
|
- "{{BaseURL}}/swagger"
|
|
- "{{BaseURL}}/api-doc"
|
|
- "{{BaseURL}}/doc/"
|
|
- "{{BaseURL}}/swagger-ui/springfox.js"
|
|
- "{{BaseURL}}/swagger-ui/swagger-ui-standalone-preset.js"
|
|
- "{{BaseURL}}/swagger-ui/swagger-ui/swagger-ui-bundle.js"
|
|
- "{{BaseURL}}/webjars/swagger-ui/swagger-ui-bundle.js"
|
|
- "{{BaseURL}}/webjars/swagger-ui/index.html"
|
|
|
|
headers:
|
|
Accept: text/html
|
|
stop-at-first-match: true
|
|
|
|
matchers-condition: and
|
|
matchers:
|
|
- type: word
|
|
words:
|
|
- "swagger:"
|
|
- "Swagger 2.0"
|
|
- "\"swagger\":"
|
|
- "Swagger UI"
|
|
- "loadSwaggerUI"
|
|
- "**token**:"
|
|
- "id=\"swagger-ui"
|
|
condition: or
|
|
|
|
- type: status
|
|
status:
|
|
- 200
|
|
|
|
extractors:
|
|
- type: regex
|
|
part: body
|
|
group: 1
|
|
regex:
|
|
- " @version (v[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})"
|
|
# digest: 4a0a00473045022100d3639a8b44e797aa3fc7cca0bb5778f14f0d9d59ab15483940be419fa21321fa02204cbbcd636969871ac6d8cea4cb7aada40b6938b1f3314f3c235d4a80a1550bbd:922c64590222798bb761d5b6d8e72950 |