sqlmapproject/sqlmap · error · SqlmapUnsupportedFeatureException
unable to proceed without xp_cmdshell
Error message
unable to proceed without xp_cmdshell
What it means
Final availability check in xpCmdshellInit: every enable/recreate strategy for xp_cmdshell (including the sp_OACreate fallback path shown above) has failed, so OS command execution via xp_cmdshell is not possible on this target and the takeover is aborted.
Solutions
- Manually enable xp_cmdshell via sp_configure as a sysadmin and rerun
- Try '--os-cmd' with sp_OACreate-based execution instead
- Supply DBA credentials with '--dbms-cred' to allow reconfiguration
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at lib/takeover/xp_cmdshell.py:292 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/61593429256a5e3a.
Report an issue: GitHub.
Appendix: source
Thrown at lib/takeover/xp_cmdshell.py:292
logger.info("creating xp_cmdshell with sp_OACreate")
self._xpCmdshellConfigure(0)
self._xpCmdshellCreate()
if self._xpCmdshellCheck():
logger.info("xp_cmdshell created successfully")
kb.xpCmdshellAvailable = True
else:
warnMsg = "xp_cmdshell creation failed, probably "
warnMsg += "because sp_OACreate is disabled"
logger.warning(warnMsg)
hashDBWrite(HASHDB_KEYS.KB_XP_CMDSHELL_AVAILABLE, kb.xpCmdshellAvailable)
if not kb.xpCmdshellAvailable:
errMsg = "unable to proceed without xp_cmdshell"
raise SqlmapUnsupportedFeatureException(errMsg)
debugMsg = "creating a support table to write commands standard "
debugMsg += "output to"
logger.debug(debugMsg)
# TEXT can't be used here because in error technique you get:
# "The text, ntext, and image data types cannot be compared or sorted"
self.createSupportTbl(self.cmdTblName, self.tblField, "NVARCHAR(4000)")
self._xpCmdshellTest()
View on GitHub (pinned to 0a35b20e39)