From c2f0ca314c133b38532e9c1037b36c966075ed6a Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 7 May 2025 10:42:51 +0200 Subject: [PATCH] Minor update of fingerprint data for MySQL --- data/txt/sha256sums.txt | 4 ++-- lib/core/settings.py | 2 +- plugins/dbms/mysql/fingerprint.py | 11 +++++++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/data/txt/sha256sums.txt b/data/txt/sha256sums.txt index 071c22de7..783e530e8 100644 --- a/data/txt/sha256sums.txt +++ b/data/txt/sha256sums.txt @@ -188,7 +188,7 @@ c6a182f6b7d3b0ad6f0888ea2a4de4148f0770549038d7de8bc3267b4c6635f7 lib/core/readl 63ae69713c6ea9abfa10e71dfab8f2dcf42432177a38d2c1e98785bf1468674c lib/core/replication.py 5bad5bc7115051cef7b84efa73fbafbf5e1db46eef32a445056b56cda750b66f lib/core/revision.py 0dcb52c9c76a4b0acf2e9038f7d8f08c14543cef3cf7032831c6c0a99376ad24 lib/core/session.py -ca78e928cf421e0e458a2751e902596340d1f740d309850833b2e8e5f3037830 lib/core/settings.py +a6052d9b44717a8cb571cef68baea565551bfbd0d41578e2143b58f29f10ae53 lib/core/settings.py a1e4f2860bffc73bbf2e5db293fa49dcb600ea35f950cda43dc953b3160ab3db lib/core/shell.py 841716e87b90a3b598515910841f7cf8d33bb87c24a27fba1a80e36a831cbcd7 lib/core/subprocessng.py 9731092f195e346716929323ea3c93247b23b9b92b0f32d3fd0acc3adf9876cc lib/core/target.py @@ -399,7 +399,7 @@ f01e26e641fbfb3c3e7620c9cd87739a9a607fc66c56337ca02cc85479fb5f63 plugins/dbms/m 36e706114f64097e185372aa97420f5267f7e1ccfc03968beda899cd6e32f226 plugins/dbms/mysql/connector.py 96126e474f7c4e5581cabccff3e924c4789c8e2dbc74463ab7503ace08a88a3a plugins/dbms/mysql/enumeration.py 4c6af0e2202a080aa94be399a3d60cab97551ac42aa2bcc95581782f3cabc0c3 plugins/dbms/mysql/filesystem.py -997be63891dab617a4abc5312f187c777964c912137a344d80c25a1bafe96e9e plugins/dbms/mysql/fingerprint.py +8f74a5eef2fc69850aec6d89bd30f1caf095c6ad2b09bec54d35c152c9090c22 plugins/dbms/mysql/fingerprint.py 34dfa460e65be6f775b1d81906c97515a435f3dbadda57f5a928f7b87cefd97d plugins/dbms/mysql/__init__.py eb59dd2ce04fa676375166549b532e0a5b6cb4c1666b7b2b780446d615aefb07 plugins/dbms/mysql/syntax.py 05e1586c3a32ee8596adb48bec4588888883727b05a367a48adb6b86abea1188 plugins/dbms/mysql/takeover.py diff --git a/lib/core/settings.py b/lib/core/settings.py index 1e0990b2b..3ac8ad251 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.9.4.2" +VERSION = "1.9.5.0" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/plugins/dbms/mysql/fingerprint.py b/plugins/dbms/mysql/fingerprint.py index c60683f4a..2f2b1a6e5 100644 --- a/plugins/dbms/mysql/fingerprint.py +++ b/plugins/dbms/mysql/fingerprint.py @@ -45,9 +45,10 @@ class Fingerprint(GenericFingerprint): # Reference: https://dev.mysql.com/doc/relnotes/mysql/./en/ versions = ( + (90200, 90202), # MySQL 9.2 (90100, 90102), # MySQL 9.1 (90000, 90002), # MySQL 9.0 - (80400, 80404), # MySQL 8.4 + (80400, 80405), # MySQL 8.4 (80300, 80302), # MySQL 8.3 (80200, 80202), # MySQL 8.2 (80100, 80102), # MySQL 8.1 @@ -207,8 +208,14 @@ class Fingerprint(GenericFingerprint): kb.data.has_information_schema = True + # Determine if it is MySQL >= 9.0.0 + if inject.checkBooleanExpression("ISNULL(VECTOR_DIM(NULL))"): + Backend.setVersion(">= 9.0.0") + setDbms("%s 9" % DBMS.MYSQL) + self.getBanner() + # Determine if it is MySQL >= 8.0.0 - if inject.checkBooleanExpression("ISNULL(JSON_STORAGE_FREE(NULL))"): + elif inject.checkBooleanExpression("ISNULL(JSON_STORAGE_FREE(NULL))"): Backend.setVersion(">= 8.0.0") setDbms("%s 8" % DBMS.MYSQL) self.getBanner()