Public Swagger API - Detect
ID: swagger-api
Severity: info
Author: pdteam,c-sh0
Tags: exposure,api,swagger
Description
Section titled “Description”Public Swagger API was detected.
YAML Source
Section titled “YAML Source”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: 59 shodan-query: "http.title:\"swagger\"" tags: exposure,api,swagger
http: - method: GET path: - "{{BaseURL}}{{paths}}" payloads: paths: - "/swagger-ui/swagger-ui.js" - "/swagger/swagger-ui.js" - "/swagger-ui.js" - "/swagger/ui/swagger-ui.js" - "/swagger/ui/index" - "/swagger/index.html" - "/swagger-ui.html" - "/swagger/swagger-ui.html" - "/api/swagger-ui.html" - "/api-docs/swagger.json" - "/api-docs/swagger.yaml" - "/api_docs" - "/swagger.json" - "/swagger.yaml" - "/swagger/v1/swagger.json" - "/swagger/v1/swagger.yaml" - "/api/index.html" - "/api/doc" - "/api/docs/" - "/api/swagger.json" - "/api/swagger.yaml" - "/api/swagger.yml" - "/api/swagger/index.html" - "/api/swagger/swagger-ui.html" - "/api/api-docs/swagger.json" - "/api/api-docs/swagger.yaml" - "/api/swagger-ui/swagger.json" - "/api/swagger-ui/swagger.yaml" - "/api/apidocs/swagger.json" - "/api/apidocs/swagger.yaml" - "/api/swagger-ui/api-docs" - "/api/doc.json" - "/api/api-docs" - "/api/apidocs" - "/api/swagger" - "/api/swagger/static/index.html" - "/api/swagger-resources" - "/api/swagger-resources/restservices/v2/api-docs" - "/api/__swagger__/" - "/api/_swagger_/" - "/api/spec/swagger.json" - "/api/spec/swagger.yaml" - "/api/swagger/ui/index" - "/__swagger__/" - "/_swagger_/" - "/api/v1/swagger-ui/swagger.json" - "/api/v1/swagger-ui/swagger.yaml" - "/swagger-resources/restservices/v2/api-docs" - "/api/swagger_doc.json" - "/docu" - "/docs" - "/docs/" - "/swagger" - "/api-doc" - "/doc/" - "/swagger-ui/springfox.js" - "/swagger-ui/swagger-ui-standalone-preset.js" - "/swagger-ui/swagger-ui/swagger-ui-bundle.js" - "/webjars/swagger-ui/swagger-ui-bundle.js" - "/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: 490a0046304402201645d018e2ed9de3f5bc841114524f439ae06ecf4133025dbee3ee7872ff2e83022062566c01999211c9bf3d58acfb05722e359c0b14375e23ed28791ae4244a3484:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "http/exposures/apis/swagger-api.yaml"