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

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