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,vuln

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: 4b0a00483046022100d56bf376dc894edaac0f530e33ff578a491b9585f04c1a3ba377c6c1e0ea51a8022100f1085f247c120cee9b248d6af8dff0c8494d604c34f0721bf66690f597145a17:922c64590222798bb761d5b6d8e72950