id: redfish-api

info:
  name: Redfish API - Detect
  author: righettod
  severity: info
  description: |
    Redfish API was detected.
  reference:
    - https://en.wikipedia.org/wiki/Redfish_(specification)
    - https://www.dmtf.org/standards/redfish
  metadata:
    verified: true
    max-request: 1
    shodan-query: http.html:"/redfish/v1"
  tags: config,exposure,redfish,api

http:
  - method: GET
    path:
      - "{{BaseURL}}/redfish/v1/"

    matchers:
      - type: dsl
        dsl:
          - 'contains_any(body, "\"@odata.type\":", "/redfish/v1/$metadata#Message")'
          - 'contains(header, "application/json")'
          - 'status_code == 200 || status_code == 502'
        condition: and

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '[a-z]+\.v?([0-9_\.]+)\.'
# digest: 4a0a00473045022100e0e238001ce21bd2fb80e5b2258768eb85745b76f80941fbb8a967f7f5c8586602202b15284bdb30aef6d19e16e104f5e2cfd089115b0de8b4a5700ed4fda4809fef:922c64590222798bb761d5b6d8e72950