sqlmapproject/sqlmap · error · SqlmapNotVulnerableException

data retrieval through DNS channel failed

Error message

data retrieval through DNS channel failed

What it means

Raised by dnsTest when a sentinel query exfiltrated over the DNS channel did not round-trip correctly: the generated random integer did not come back, so DNS-based data retrieval is unusable for this target.

Solutions

  1. Verify the DNS domain is authoritative and reachable from the target
  2. Ensure the local resolver can see the authoritative NS responses
  3. Fall back to time-based or boolean-based techniques
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at lib/techniques/dns/test.py:30 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26). Data as JSON: /api/errors/422972f0b01cf1b7. Report an issue: GitHub.

Appendix: source

Thrown at lib/techniques/dns/test.py:30

from lib.core.data import logger
from lib.core.dicts import FROM_DUMMY_TABLE
from lib.core.exception import SqlmapNotVulnerableException
from lib.techniques.dns.use import dnsUse

def dnsTest(payload):
    logger.info("testing for data retrieval through DNS channel")

    randInt = randomInt()
    kb.dnsTest = dnsUse(payload, "SELECT %d%s" % (randInt, FROM_DUMMY_TABLE.get(Backend.getIdentifiedDbms(), ""))) == str(randInt)

    if not kb.dnsTest:
        errMsg = "data retrieval through DNS channel failed"
        if not conf.forceDns:
            conf.dnsDomain = None
            errMsg += ". Turning off DNS exfiltration support"
            logger.error(errMsg)
        else:
            raise SqlmapNotVulnerableException(errMsg)
    else:
        infoMsg = "data retrieval through DNS channel was successful"
        logger.info(infoMsg)

View on GitHub (pinned to 0a35b20e39)