diff --git a/lib/core/settings.py b/lib/core/settings.py index 87d58759d..d69b4f988 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -251,4 +251,4 @@ URI_INJECTION_MARK_CHAR = '*' MYSQL_ERROR_TRIM_LENGTH = 100 # Do not unescape the injected statement if it contains any of the following SQL words -EXCLUDE_UNESCAPE = ("WAITFOR DELAY ", " INTO DUMPFILE ", " INTO OUTFILE ", "CREATE ", "BULK ") +EXCLUDE_UNESCAPE = ("WAITFOR DELAY ", " INTO DUMPFILE ", " INTO OUTFILE ", "CREATE ", "BULK ", "EXEC ", "RECONFIGURE ", "DECLARE ") diff --git a/lib/takeover/xp_cmdshell.py b/lib/takeover/xp_cmdshell.py index 3b12cf4db..b0de43ff4 100644 --- a/lib/takeover/xp_cmdshell.py +++ b/lib/takeover/xp_cmdshell.py @@ -93,7 +93,12 @@ class xp_cmdshell: inject.goStacked(cmd) - return wasLastRequestDelayed() + delayed = wasLastRequestDelayed() + + if isinstance(delayed, bool): + return delayed + else: + return None def xpCmdshellForgeCmd(self, cmd): self.__randStr = randomStr(lowercase=True)