From c2f14e57e75d53392a639fe435e26b5d96b4e3dc Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 29 Jun 2014 00:27:23 +0200 Subject: [PATCH] Patch for an Issue #740 --- lib/takeover/web.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/takeover/web.py b/lib/takeover/web.py index e732eb6c1..61f376949 100644 --- a/lib/takeover/web.py +++ b/lib/takeover/web.py @@ -41,6 +41,7 @@ from lib.core.enums import DBMS from lib.core.enums import OS from lib.core.enums import PAYLOAD from lib.core.enums import WEB_API +from lib.core.exception import SqlmapNoneDataException from lib.core.settings import BACKDOOR_RUN_CMD_TIMEOUT from lib.core.settings import EVENTVALIDATION_REGEX from lib.core.settings import VIEWSTATE_REGEX @@ -346,7 +347,11 @@ class Web: testStr = "command execution test" output = self.webBackdoorRunCmd("echo %s" % testStr) - if output and testStr in output: + if output == "0": + warnMsg = "the backdoor has been uploaded but required privileges " + warnMsg += "for running the system commands are missing" + raise SqlmapNoneDataException(warnMsg) + elif output and testStr in output: infoMsg = "the backdoor has been successfully " else: infoMsg = "the backdoor has probably been successfully "