id: netdisco-default-login

info:
  name: Netdisco Admin - Default Login
  author: ritikchaddha
  severity: critical
  description: |
    Detects use of hard-coded credentials in Netdisco.
  impact: |
    Attackers can potentially exploit this vulnerability to gain unauthorized access to sensitive information.
  remediation: |
    Update the application to remove hard-coded credentials and implement secure credential management practices.
  metadata:
    verified: true
    max-request: 1
    shodan-query: title:"Netdisco"
    fofa-query: title="Netdisco"
  tags: netdisco,default-login,vuln

variables:
  username: "netdisco"
  password: "netdisco"

http:
  - raw:
      - |
        POST /login HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        username={{username}}&password={{password}}&return_url=%2Finventory

    host-redirects: true
    max-redirects: 2
    matchers:
      - type: dsl
        dsl:
          - contains_all(body, "User Management", "/admin/discoverall", "Logged in as")
          - status_code == 200
        condition: and
# digest: 4b0a00483046022100b64a904afd89d397c2e5097fb5badb8baacf657be43d4af387811067089a207d0221009b58975906d01d2c92e652d3f3cc61d7ade0cbc704c22e0d1f6fc2c0304dfc07:922c64590222798bb761d5b6d8e72950