Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4b4f728

Browse files
committed
Updated MySQL active fingerprint payloads
1 parent e8336ec commit 4b4f728

3 files changed

Lines changed: 22 additions & 7 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.2.6.41"
22+
VERSION = "1.2.7.0"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

plugins/dbms/mysql/fingerprint.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,15 @@ def checkDbms(self):
183183
# reading information_schema on some platforms is causing annoying timeout exits
184184
# Reference: http://bugs.mysql.com/bug.php?id=15855
185185

186+
# Determine if it is MySQL >= 8.0.0
187+
if inject.checkBooleanExpression("ISNULL(JSON_STORAGE_FREE(NULL))"):
188+
kb.data.has_information_schema = True
189+
Backend.setVersion(">= 8.0.0")
190+
setDbms("%s 8" % DBMS.MYSQL)
191+
self.getBanner()
192+
186193
# Determine if it is MySQL >= 5.0.0
187-
if inject.checkBooleanExpression("ISNULL(TIMESTAMPADD(MINUTE,[RANDNUM],NULL))"):
194+
elif inject.checkBooleanExpression("ISNULL(TIMESTAMPADD(MINUTE,[RANDNUM],NULL))"):
188195
kb.data.has_information_schema = True
189196
Backend.setVersion(">= 5.0.0")
190197
setDbms("%s 5" % DBMS.MYSQL)
@@ -196,9 +203,17 @@ def checkDbms(self):
196203
infoMsg = "actively fingerprinting %s" % DBMS.MYSQL
197204
logger.info(infoMsg)
198205

199-
# Check if it is MySQL >= 5.5.0
200-
if inject.checkBooleanExpression("TO_SECONDS(950501)>0"):
201-
Backend.setVersion(">= 5.5.0")
206+
# Check if it is MySQL >= 5.7
207+
if inject.checkBooleanExpression("ISNULL(JSON_QUOTE(NULL))"):
208+
Backend.setVersion(">= 5.7")
209+
210+
# Check if it is MySQL >= 5.6
211+
elif inject.checkBooleanExpression("ISNULL(VALIDATE_PASSWORD_STRENGTH(NULL))"):
212+
Backend.setVersion(">= 5.6")
213+
214+
# Check if it is MySQL >= 5.5
215+
elif inject.checkBooleanExpression("TO_SECONDS(950501)>0"):
216+
Backend.setVersion(">= 5.5")
202217

203218
# Check if it is MySQL >= 5.1.2 and < 5.5.0
204219
elif inject.checkBooleanExpression("@@table_open_cache=@@table_open_cache"):

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
4848
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
4949
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5050
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
51-
2aab203a038a8c4d06794a9fdb878229 lib/core/settings.py
51+
9e328a8f6e8e76c8d78779a8041d47c7 lib/core/settings.py
5252
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
5353
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5454
95f04c1c1d8c3998d86e1bdf0e12771c lib/core/target.py
@@ -171,7 +171,7 @@ f25c50a95e5390ecd32be5a011637349 plugins/dbms/mssqlserver/__init__.py
171171
f6e1f3f09f32b9cb2ca11c016d373423 plugins/dbms/mysql/connector.py
172172
445164daf59b890aeacc968af58fcb53 plugins/dbms/mysql/enumeration.py
173173
4578fa29f04d0a75499f9668466ded07 plugins/dbms/mysql/filesystem.py
174-
fcbf7ff279c527b4aca0dac94c28d20c plugins/dbms/mysql/fingerprint.py
174+
4e23494d0a8f41c22ec3861fb404e9f7 plugins/dbms/mysql/fingerprint.py
175175
30065993f8300994e4658634121609e9 plugins/dbms/mysql/__init__.py
176176
0e2adbee217f5b94dcc124d24b8dde99 plugins/dbms/mysql/syntax.py
177177
403591e638b6bfdb840d52bd3138ee56 plugins/dbms/mysql/takeover.py

0 commit comments

Comments
 (0)