2024-03-09 14:23:42 +00:00
|
|
|
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:
|
2024-03-23 09:28:19 +00:00
|
|
|
max-request: 16
|
|
|
|
shodan-query: "port:3306"
|
2024-03-22 10:10:06 +00:00
|
|
|
tags: js,mysql,network,enum
|
2024-03-09 14:23:42 +00:00
|
|
|
|
|
|
|
javascript:
|
|
|
|
- code: |
|
|
|
|
let m = require('nuclei/mysql');
|
|
|
|
let c = m.MySQLClient();
|
|
|
|
let response = c.ExecuteQuery(Host,Port,User,Pass,Query);
|
2024-03-09 18:32:19 +00:00
|
|
|
Export(response);
|
2024-03-09 14:23:42 +00:00
|
|
|
|
|
|
|
args:
|
|
|
|
Host: "{{Host}}"
|
|
|
|
Port: "3306"
|
|
|
|
User: "{{usernames}}"
|
|
|
|
Pass: "{{passwords}}"
|
|
|
|
Query: "show variables;"
|
|
|
|
|
|
|
|
payloads:
|
2024-03-22 10:10:06 +00:00
|
|
|
usernames:
|
|
|
|
- root
|
|
|
|
- admin
|
|
|
|
- mysql
|
2024-03-22 14:11:12 +00:00
|
|
|
- test
|
2024-03-22 10:10:06 +00:00
|
|
|
passwords:
|
|
|
|
- root
|
|
|
|
- admin
|
2024-03-22 14:11:12 +00:00
|
|
|
- mysql
|
|
|
|
- test
|
2024-03-22 10:10:06 +00:00
|
|
|
attack: clusterbomb
|
2024-03-09 14:23:42 +00:00
|
|
|
|
2024-03-22 10:10:06 +00:00
|
|
|
stop-at-first-match: true
|
2024-03-09 14:23:42 +00:00
|
|
|
matchers:
|
|
|
|
- type: dsl
|
|
|
|
dsl:
|
|
|
|
- "success == true"
|
|
|
|
|
|
|
|
extractors:
|
|
|
|
- type: json
|
|
|
|
part: response
|
|
|
|
json:
|
2024-03-23 09:23:23 +00:00
|
|
|
- '.Rows[].Variable_name'
|
2024-03-25 11:57:16 +00:00
|
|
|
# digest: 4b0a00483046022100db436fe9a644606ceaf3582c9060b533f3f19ccda67d48c3cda59e170ae1629d022100dcfdda5829b1cc31ff924d1274611b3103cc6360b51fa7885da45c93b06ddd8b:922c64590222798bb761d5b6d8e72950
|