id: servicestack-requestlogs

info:
  name: ServiceStack Request Logs - Unauthenticated Access
  author: DhiyaneshDk
  severity: high
  description: |
    Detected ServiceStack Request Logs endpoint was accessible without authentication.
  reference:
    - https://docs.servicestack.net/request-logger
    - https://docs.servicestack.net/admin-ui-profiling
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cwe-id: CWE-200
    cpe: cpe:2.3:a:servicestack:servicestack:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 3
    shodan-query: http.html:"ServiceStack"
    fofa-query: body="ServiceStack"
  tags: servicestack,exposure,misconfig,logs

http:
  - method: GET
    path:
      - "{{BaseURL}}/requestlogs"
      - "{{BaseURL}}/api/requestlogs"
      - "{{BaseURL}}/json/reply/RequestLogs"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"Results":['
          - '"Usage":{'
        condition: and

      - type: word
        part: content_type
        words:
          - "application/json"

      - type: status
        status:
          - 200
# digest: 490a004630440220777cb3163915c8a31e7dfe616b262bfaf91d86379b2ac765741b4dd3af60f426022064f361fb0aaa86141558cb824b4c85866ab63e493e935462ac3b93cc04f4a310:922c64590222798bb761d5b6d8e72950