55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
id: mysql-show-variables
|
|
|
|
info:
|
|
name: MySQL - Show Variables
|
|
author: DhiyaneshDk
|
|
severity: high
|
|
description: Attempts to show all variables on a MySQL server.
|
|
reference:
|
|
- https://nmap.org/nsedoc/scripts/mysql-variables.html
|
|
metadata:
|
|
max-request: 16
|
|
shodan-query: "port:3306"
|
|
tags: js,mysql,network,enum
|
|
|
|
javascript:
|
|
- pre-condition: |
|
|
isPortOpen(Host,Port);
|
|
code: |
|
|
let m = require('nuclei/mysql');
|
|
let c = m.MySQLClient();
|
|
let response = c.ExecuteQuery(Host,Port,User,Pass,Query);
|
|
Export(response);
|
|
|
|
args:
|
|
Host: "{{Host}}"
|
|
Port: "3306"
|
|
User: "{{usernames}}"
|
|
Pass: "{{passwords}}"
|
|
Query: "show variables;"
|
|
|
|
payloads:
|
|
usernames:
|
|
- root
|
|
- admin
|
|
- mysql
|
|
- test
|
|
passwords:
|
|
- root
|
|
- admin
|
|
- mysql
|
|
- test
|
|
attack: clusterbomb
|
|
|
|
stop-at-first-match: true
|
|
matchers:
|
|
- type: dsl
|
|
dsl:
|
|
- "success == true"
|
|
|
|
extractors:
|
|
- type: json
|
|
part: response
|
|
json:
|
|
- '.Rows[].Variable_name'
|
|
# digest: 4a0a00473045022100dc50eb6ec626073ea417f99bb6d61f8f62fdc9643354c55ae28802a88147c01e022029c394f827e7c03dd02c03fc7c17fc2a4c894c55566bf2b858cc21c8af4067b6:922c64590222798bb761d5b6d8e72950 |