id: stem-audio-table-private-keys

info:
  name: Detect Private Key on STEM Audio Table
  author: gy741
  severity: high
  description: Private Key on STEM audio table was detected.
  reference:
    - https://blog.grimm-co.com/2021/06/the-walls-have-ears.html
  metadata:
    max-request: 1
  tags: stem,config,exposure,iot

http:
  - method: GET
    path:
      - "{{BaseURL}}/cgi-bin/privatekey.pem"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "BEGIN RSA PRIVATE KEY"

      - type: status
        status:
          - 200

      - type: dsl
        dsl:
          - '!contains(tolower(body), "<html")'
# digest: 4b0a00483046022100bf2541b0b03249cccaf1c3ef0656b1a6642ad664ab5479527cc7213495241e07022100c693870180871ffacb16a25cadb639a6b53e4bab2355acbdc44024ff51dff4f6:922c64590222798bb761d5b6d8e72950