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

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:
        - root
        - admin
        - mysql
        - test
      passwords:
        - root
        - admin
        - mysql
        - test
        -
    attack: clusterbomb

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