mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-02-07 03:03:51 +08:00
48 lines
1.0 KiB
YAML
48 lines
1.0 KiB
YAML
id: mysql-user-enum
|
|
|
|
info:
|
|
name: MySQL - User Enumeration
|
|
author: pussycat0x
|
|
severity: high
|
|
description: |
|
|
Attempts to list all users on a MySQL server.
|
|
reference:
|
|
- https://nmap.org/nsedoc/scripts/mysql-users.html
|
|
metadata:
|
|
shodan-query: port:3306
|
|
verified: true
|
|
tags: js,mysql,network,enum,fuzz
|
|
|
|
javascript:
|
|
- code: |
|
|
let m = require('nuclei/mysql');
|
|
let c = m.MySQLClient();
|
|
let response = c.ExecuteQuery(Host,Port,User,Pass,Query);
|
|
to_json(response);
|
|
|
|
args:
|
|
Host: "{{Host}}"
|
|
Port: "3306"
|
|
Query: "SELECT DISTINCT user FROM mysql.user;"
|
|
User: "{{usernames}}"
|
|
Pass: "{{passwords}}"
|
|
|
|
threads: 10
|
|
attack: pitchfork
|
|
|
|
payloads:
|
|
usernames: helpers/wordlists/mysql-users.txt
|
|
passwords: helpers/wordlists/mysql-passwords.txt
|
|
stop-at-first-match: true
|
|
|
|
matchers:
|
|
- type: dsl
|
|
dsl:
|
|
- "success == true"
|
|
|
|
extractors:
|
|
- type: json
|
|
part: response
|
|
json:
|
|
- '.Rows[].user'
|