mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Heuristic check for WAF/IDS/IPS is now prone to tamper functions (Issue #1145)
This commit is contained in:
parent
9e90e357cf
commit
2e9bf47703
|
@ -1101,22 +1101,17 @@ def checkWaf():
|
|||
logger.debug(dbmMsg)
|
||||
|
||||
retVal = False
|
||||
backup = dict(conf.parameters)
|
||||
payload = "%d %s" % (randomInt(), IDS_WAF_CHECK_PAYLOAD)
|
||||
|
||||
conf.parameters = dict(backup)
|
||||
conf.parameters[PLACE.GET] = "" if not conf.parameters.get(PLACE.GET) else conf.parameters[PLACE.GET] + DEFAULT_GET_POST_DELIMITER
|
||||
conf.parameters[PLACE.GET] += "%s=%s" % (randomStr(), payload)
|
||||
|
||||
logger.log(CUSTOM_LOGGING.PAYLOAD, payload)
|
||||
value = "" if not conf.parameters.get(PLACE.GET) else conf.parameters[PLACE.GET] + DEFAULT_GET_POST_DELIMITER
|
||||
value += agent.addPayloadDelimiters("%s=%s" % (randomStr(), payload))
|
||||
|
||||
try:
|
||||
retVal = Request.queryPage(getRatioValue=True, noteResponseTime=False, silent=True)[1] < IDS_WAF_CHECK_RATIO
|
||||
retVal = Request.queryPage(place=PLACE.GET, value=value, getRatioValue=True, noteResponseTime=False, silent=True)[1] < IDS_WAF_CHECK_RATIO
|
||||
except SqlmapConnectionException:
|
||||
retVal = True
|
||||
finally:
|
||||
kb.matchRatio = None
|
||||
conf.parameters = dict(backup)
|
||||
|
||||
if retVal:
|
||||
warnMsg = "heuristics detected that the target "
|
||||
|
|
Loading…
Reference in New Issue
Block a user