id: mysql-default-login

info:
  name: MySQL - Default Login
  author: DhiyaneshDk,pussycat0x,ritikchaddha
  severity: high
  description: |
    A MySQL service was accessed with easily guessed credentials.
  metadata:
    verified: true
    max-request: 21
    shodan-query: "port:3306"
  tags: js,mysql,default-login,network,fuzz,enum,vuln

javascript:
  - pre-condition: |
      isPortOpen(Host,Port);
    code: |
      var m = require("nuclei/mysql");
      var c = m.MySQLClient();
      c.Connect(Host,Port,User,Pass)

    args:
      Host: "{{Host}}"
      Port: "3306"
      User: "{{usernames}}"
      Pass: "{{passwords}}"

    payloads:
      usernames: helpers/wordlists/mysql-users.txt
      passwords: helpers/wordlists/mysql-passwords.txt
    attack: clusterbomb

    matchers:
      - type: dsl
        dsl:
          - "response == true"
          - "success == true"
        condition: and
# digest: 4a0a00473045022013541efe22c0aad4388b54499544021725653c8c88b5f36050c8dc3667baafdc02210085b983b931edaa3125882de6444bcc33de5920813653e4ef1ead12d7e4f5b762:922c64590222798bb761d5b6d8e72950