id: browserless-swagger-detect

info:
  name: Browserless API Swagger - Detect
  author: theamanrawat
  severity: info
  description: |
    Detects exposed Browserless API Swagger UI interface. Browserless is a headless browser automation service that provides REST APIs for Chrome/Chromium-based browser operations including screenshots, PDFs, and web scraping.
  reference:
    - https://github.com/browserless/browserless
    - https://docs.browserless.io/
  metadata:
    verified: true
    max-request: 4
    shodan-query: "browserless"
  tags: tech,browserless,swagger,api

flow: http(1) && http(2)

http:
  - method: GET
    path:
      - "{{BaseURL}}/docs/swagger-ui-init.js"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "browserless/chrome API"
          - "browserless Swagger documentation"
        condition: and
        internal: true

      - type: status
        status:
          - 200
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}/docs"

    host-redirects: true
    max-redirects: 2
    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "<title>Swagger UI"

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100b27da03e66bd76f6e229499724512b6fceec59293902f132c05d181d99562aa502205e5eb440eb5a5f9da530a5c785f5f964989648c613eed8172de476fa0da9b591:922c64590222798bb761d5b6d8e72950