From 14bf1e4ce7fae8c3466fed4f9632f1a52aeccf44 Mon Sep 17 00:00:00 2001 From: gweeperx Date: Mon, 29 Apr 2019 11:58:12 +0300 Subject: [PATCH] Add INFERENCE_EQUALS_CHAR during the check for false positives (#3609) * Update checks.py * Update checks.py --- lib/controller/checks.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 34eb41b5f..231ce55bc 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -99,6 +99,7 @@ from lib.core.settings import SUPPORTED_DBMS from lib.core.settings import UNICODE_ENCODING from lib.core.settings import URI_HTTP_HEADER from lib.core.settings import UPPER_RATIO_BOUND +from lib.core.settings import INFERENCE_EQUALS_CHAR from lib.core.threads import getCurrentThreadData from lib.request.connect import Connect as Request from lib.request.comparison import comparison @@ -915,23 +916,23 @@ def checkFalsePositives(injection): if randInt3 > randInt2 > randInt1: break - if not checkBooleanExpression("%d=%d" % (randInt1, randInt1)): + if not checkBooleanExpression("%d%s%d" % (randInt1,INFERENCE_EQUALS_CHAR, randInt1)): retVal = False break # Just in case if DBMS hasn't properly recovered from previous delayed request if PAYLOAD.TECHNIQUE.BOOLEAN not in injection.data: - checkBooleanExpression("%d=%d" % (randInt1, randInt2)) + checkBooleanExpression("%d%s%d" % (randInt1, INFERENCE_EQUALS_CHAR, randInt2)) - if checkBooleanExpression("%d=%d" % (randInt1, randInt3)): # this must not be evaluated to True + if checkBooleanExpression("%d%s%d" % (randInt1, INFERENCE_EQUALS_CHAR, randInt3)): # this must not be evaluated to True retVal = False break - elif checkBooleanExpression("%d=%d" % (randInt3, randInt2)): # this must not be evaluated to True + elif checkBooleanExpression("%d%s%d" % (randInt3, INFERENCE_EQUALS_CHAR, randInt2)): # this must not be evaluated to True retVal = False break - elif not checkBooleanExpression("%d=%d" % (randInt2, randInt2)): # this must be evaluated to True + elif not checkBooleanExpression("%d%s%d" % (randInt2, INFERENCE_EQUALS_CHAR, randInt2)): # this must be evaluated to True retVal = False break